Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Engel Simulator 2020
Engel Simulator 2020
Commits
b588643f
Commit
b588643f
authored
Dec 29, 2020
by
Grisu
Committed by
Rahix
Dec 29, 2020
Browse files
Obstacles insanity
parent
c59aef14
Changes
17
Hide whitespace changes
Inline
Side-by-side
src/angel_shifts/bottle_angel.rs
View file @
b588643f
...
...
@@ -142,6 +142,6 @@ pub fn update_bottle_shift(
.unwrap
();
player
.collected_hours
+=
*
hours_to_award
as
u32
;
*
hours_to_award
=
0
;
game_manager
.request_return_to_heaven
();
game_manager
.request_return_to_heaven
(
false
);
}
}
src/angel_shifts/network_switch.rs
View file @
b588643f
...
...
@@ -139,6 +139,6 @@ pub fn update_network_switch_shift(
.unwrap
();
player
.collected_hours
+=
*
hours_to_award
as
u32
;
*
hours_to_award
=
0
;
game_manager
.request_return_to_heaven
();
game_manager
.request_return_to_heaven
(
false
);
}
}
src/components/mod.rs
View file @
b588643f
...
...
@@ -17,7 +17,7 @@ pub use movable::Movable;
pub
use
network_switch
::
NetworkSwitch
;
pub
use
node
::
Node
;
pub
use
node
::{
draw_nodes_system
,
update_nodes_system
};
pub
use
obstacle
::
Obstacle
;
pub
use
obstacle
::
{
Obstacle
Barrier
,
ObstacleInsanity
}
;
pub
use
orbitbody
::{
update_gravity_system
,
update_movement_system
};
pub
use
orbitbody
::{
Gravity
,
OrbitBody
};
pub
use
player
::
Player
;
...
...
src/components/obstacle.rs
View file @
b588643f
#[derive(Clone,
Copy)]
pub
struct
Obstacle
{
pub
struct
Obstacle
Barrier
{
w
:
f32
,
h
:
f32
,
// TODO replace with angle (we can have rotated colliders now)
pub
orientation
:
bool
,
// true means horizontal, false vertical
}
impl
Obstacle
{
pub
fn
new
(
orientation
:
bool
)
->
Obstacle
{
Obstacle
{
#[derive(Clone,
Copy)]
pub
struct
ObstacleInsanity
{
pub
r
:
f32
,
}
impl
ObstacleInsanity
{
pub
fn
new
()
->
ObstacleInsanity
{
ObstacleInsanity
{
r
:
150.0
}
}
}
impl
ObstacleBarrier
{
pub
fn
new
(
orientation
:
bool
)
->
ObstacleBarrier
{
ObstacleBarrier
{
w
:
200.0
,
h
:
20.0
,
orientation
:
orientation
,
...
...
src/components/player.rs
View file @
b588643f
...
...
@@ -11,4 +11,9 @@ impl Player {
collected_hours
:
0
,
}
}
pub
fn
reset
(
&
mut
self
)
{
self
.sanity
=
1.0
;
self
.collected_hours
=
0
;
}
}
src/entities/mod.rs
View file @
b588643f
...
...
@@ -2,6 +2,7 @@ mod matebottledrop;
mod
network_switch
;
mod
obstacle
;
mod
player
;
pub
use
matebottledrop
::
create_drop_points
;
pub
use
network_switch
::
create_network_switches
;
pub
use
obstacle
::
create_stationary_obstacles
;
...
...
src/entities/obstacle.rs
View file @
b588643f
use
crate
::
colliders
;
use
crate
::
components
;
use
crate
::
sprites
;
use
crate
::
svg_loader
;
use
rand
::
seq
::
SliceRandom
;
pub
fn
create_stationary_obstacles
(
world
:
&
mut
legion
::
World
,
level
:
&
svg_loader
::
SvgLevel
)
{
let
spawn_locations
=
level
let
spawn_locations
_barriers
=
level
.spawnpoints
.get
(
"stationary_obstacle_type_1"
)
.map_or
(
&
[][
..
],
|
x
|
&
x
[
..
]);
for
obs
in
spawn_locations
.choose_multiple
(
&
mut
rand
::
thread_rng
(),
3
)
{
for
obs
in
spawn_locations
_barriers
.choose_multiple
(
&
mut
rand
::
thread_rng
(),
3
)
{
let
orientation
=
*
[
true
,
false
]
.choose
(
&
mut
rand
::
thread_rng
())
.unwrap
();
let
new_obs
=
components
::
Obstacle
::
new
(
orientation
);
let
new_obs
=
components
::
Obstacle
Barrier
::
new
(
orientation
);
world
.push
((
new_obs
,
components
::
Position
::
new
(
obs
.x
,
obs
.y
),
colliders
::
Collider
::
new_static_rect
(
new_obs
.width
(),
new_obs
.height
()),
));
}
let
spawn_locations_insanity
=
level
.spawnpoints
.get
(
"stationary_obstacle_type_2"
)
.map_or
(
&
[][
..
],
|
x
|
&
x
[
..
]);
for
obs
in
spawn_locations_insanity
.choose_multiple
(
&
mut
rand
::
thread_rng
(),
1
)
{
let
new_obs
=
components
::
ObstacleInsanity
::
new
();
world
.push
((
new_obs
,
components
::
Position
::
new
(
obs
.x
,
obs
.y
),
colliders
::
Collider
::
new_sensor_circle
(
new_obs
.r
),
components
::
Sprite
::
new
(
sprites
::
Sprite
::
TrojanHorse
),
));
}
}
src/resources/game_manager.rs
View file @
b588643f
pub
struct
GameManager
{
pub
return_timeout
:
Option
<
f64
>
,
pub
return_timestamp
:
Option
<
f64
>
,
pub
game_over
:
bool
,
}
impl
GameManager
{
...
...
@@ -8,10 +9,12 @@ impl GameManager {
GameManager
{
return_timeout
:
None
,
return_timestamp
:
None
,
game_over
:
false
,
}
}
pub
fn
request_return_to_heaven
(
&
mut
self
)
{
pub
fn
request_return_to_heaven
(
&
mut
self
,
game_over
:
bool
)
{
self
.game_over
=
game_over
;
self
.return_timeout
.get_or_insert
(
0.0
);
}
...
...
src/sprites.rs
View file @
b588643f
...
...
@@ -6,6 +6,7 @@ pub enum Sprite {
Player
,
BottleDropPointFull
,
BottleDropPointEmpty
,
TrojanHorse
,
NetworkSwitchConnected
,
NetworkSwitchDisconnected
,
}
...
...
@@ -16,6 +17,7 @@ impl Sprite {
Sprite
::
Player
=>
"player.svg"
,
Sprite
::
BottleDropPointFull
=>
"droppoint-full.svg"
,
Sprite
::
BottleDropPointEmpty
=>
"droppoint-empty.svg"
,
Sprite
::
TrojanHorse
=>
"trojan-horse.svg"
,
Sprite
::
NetworkSwitchConnected
=>
"switch-connected.svg"
,
Sprite
::
NetworkSwitchDisconnected
=>
"switch-disconnected.svg"
,
}
...
...
@@ -39,6 +41,7 @@ impl Sprite {
Sprite
::
Player
,
Sprite
::
BottleDropPointFull
,
Sprite
::
BottleDropPointEmpty
,
Sprite
::
TrojanHorse
,
Sprite
::
NetworkSwitchConnected
,
Sprite
::
NetworkSwitchDisconnected
,
]
{
...
...
src/states/ingame.rs
View file @
b588643f
...
...
@@ -59,6 +59,8 @@ impl InGameState {
schedule_builder
.flush
()
.add_thread_local
(
systems
::
reduce_sanity_obstacle_system
())
.add_thread_local
(
systems
::
player_sanity_check_system
())
.add_thread_local
(
systems
::
update_game_manager_system
())
.add_thread_local
(
systems
::
move_camera_to_player_system
())
.add_thread_local
(
systems
::
camera_system
())
...
...
@@ -66,7 +68,7 @@ impl InGameState {
.add_thread_local
(
systems
::
draw_level_layer_system
(
background
))
.add_thread_local
(
systems
::
draw_sprites_system
())
.add_thread_local
(
systems
::
draw_level_layer_system
(
foreground
))
.add_thread_local
(
systems
::
draw_tmp_stationary_obstacles_system
())
.add_thread_local
(
systems
::
draw_tmp_stationary_obstacles_
barrier_
system
())
// .add_thread_local(systems::draw_debug_colliders_system())
;
let
schedule
=
schedule_builder
.build
();
...
...
@@ -161,16 +163,15 @@ impl gamestate::State for InGameState {
}
self
.schedule
.execute
(
&
mut
self
.world
,
&
mut
self
.resources
);
if
self
.resources
.get
::
<
resources
::
GameManager
>
()
.unwrap
()
.wants_return_to_heaven
()
{
let
game_manager
=
self
.resources.get
::
<
resources
::
GameManager
>
()
.unwrap
();
if
game_manager
.wants_return_to_heaven
()
{
let
player_ent
=
self
.resources.get
::
<
resources
::
Player
>
()
.unwrap
()
.0
.clone
();
let
player
=
<&
components
::
Player
>
::
query
()
.get
(
&
self
.world
,
player_ent
)
let
player
=
<&
mut
components
::
Player
>
::
query
()
.get
_mut
(
&
mut
self
.world
,
player_ent
)
.unwrap
();
if
game_manager
.game_over
{
player
.reset
();
}
gamestate
::
Transition
::
replace
(
states
::
HeavenState
::
new
(
Some
(
player
.clone
())))
}
else
{
gamestate
::
Transition
::
Loop
...
...
src/systems/game_manager.rs
View file @
b588643f
...
...
@@ -7,8 +7,12 @@ pub fn update_game_manager(
#[resource]
game_manager
:
&
mut
resources
::
GameManager
,
)
{
if
let
Some
(
timeout
)
=
game_manager
.return_timeout
.as_mut
()
{
let
popup
=
match
game_manager
.game_over
{
true
=>
"ingame-game-over"
,
false
=>
"ingame-return-to-heaven"
,
};
if
game_manager
.return_timestamp
.is_none
()
{
utils
::
get_element_by_id
::
<
web_sys
::
SvgElement
>
(
"ingame-return-to-heaven"
)
utils
::
get_element_by_id
::
<
web_sys
::
SvgElement
>
(
popup
)
.unwrap
()
.style
()
.set_property
(
"display"
,
"block"
)
...
...
@@ -25,7 +29,7 @@ pub fn update_game_manager(
.set_inner_html
(
&
format!
(
"{:.0}"
,
(
3.0
-
*
timeout
)
.ceil
()));
if
game_manager
.wants_return_to_heaven
()
{
utils
::
get_element_by_id
::
<
web_sys
::
SvgElement
>
(
"ingame-return-to-heaven"
)
utils
::
get_element_by_id
::
<
web_sys
::
SvgElement
>
(
popup
)
.unwrap
()
.style
()
.set_property
(
"display"
,
"none"
)
...
...
src/systems/mod.rs
View file @
b588643f
...
...
@@ -12,6 +12,10 @@ pub use draw_colliders::draw_debug_colliders_system;
pub
use
game_manager
::
update_game_manager_system
;
pub
use
level
::
draw_level_layer_system
;
pub
use
moving
::{
move_camera_to_player_system
,
move_movable_system
};
pub
use
player
::{
sanity_goes_up_and_down_system
,
update_sanity_bar_system
};
pub
use
player
::{
player_sanity_check_system
,
sanity_goes_up_and_down_system
,
update_sanity_bar_system
,
};
pub
use
sprite
::
draw_sprites_system
;
pub
use
tmp_stationary_obstacles
::
draw_tmp_stationary_obstacles_system
;
pub
use
tmp_stationary_obstacles
::{
draw_tmp_stationary_obstacles_barrier_system
,
reduce_sanity_obstacle_system
,
};
src/systems/player.rs
View file @
b588643f
...
...
@@ -26,3 +26,19 @@ pub fn update_sanity_bar(
.set_attribute
(
"width"
,
&
(
player
.sanity
*
1000.0
)
.to_string
())
.unwrap
();
}
#[legion::system]
#[write_component(components::Player)]
pub
fn
player_sanity_check
(
world
:
&
mut
legion
::
world
::
SubWorld
,
#[resource]
player
:
&
resources
::
Player
,
#[resource]
game_manager
:
&
mut
resources
::
GameManager
,
)
{
let
mut
players
=
<&
mut
components
::
Player
>
::
query
();
let
player
=
players
.get_mut
(
world
,
player
.0
)
.unwrap
();
if
player
.sanity
<=
0.0
{
// TODO: Game Over Screen
game_manager
.request_return_to_heaven
(
true
);
}
}
src/systems/tmp_stationary_obstacles.rs
View file @
b588643f
use
crate
::
colliders
;
use
crate
::
colors
;
use
crate
::
components
;
use
crate
::
resources
;
#[legion::system(for_each)]
pub
fn
draw_tmp_stationary_obstacles
(
obstacle
:
&
components
::
Obstacle
,
pub
fn
draw_tmp_stationary_obstacles
_barrier
(
obstacle
:
&
components
::
Obstacle
Barrier
,
pos
:
&
components
::
Position
,
#[resource]
rendering
:
&
mut
resources
::
Rendering
,
)
{
...
...
@@ -16,3 +17,36 @@ pub fn draw_tmp_stationary_obstacles(
rendering
.fill_rect
(
pos
.0
.x
as
f64
-
w
/
2.0
,
pos
.0
.y
as
f64
-
h
/
2.0
,
w
,
h
);
rendering
.fill
();
}
#[legion::system]
#[read_component(colliders::Collider)]
#[read_component(components::ObstacleInsanity)]
#[write_component(components::Player)]
pub
fn
reduce_sanity_obstacle
(
world
:
&
mut
legion
::
world
::
SubWorld
,
#[resource]
player
:
&
mut
resources
::
Player
,
#[resource]
clock
:
&
resources
::
Clock
,
#[resource]
collision_world
:
&
colliders
::
CollisionWorld
,
)
{
use
legion
::
IntoQuery
;
let
collider
=
<&
colliders
::
Collider
>
::
query
()
.get
(
world
,
player
.0
)
.unwrap
();
let
mut
obs_insanity
=
<&
components
::
ObstacleInsanity
>
::
query
();
for
pair
in
collision_world
.world
.proximities_with
(
collider
.handle
.unwrap
(),
false
)
.unwrap
()
{
if
pair
.3
!=
ncollide2d
::
query
::
Proximity
::
Intersecting
{
continue
;
}
let
entity
=
*
collision_world
.world.objects
.get
(
pair
.1
)
.unwrap
()
.data
();
if
obs_insanity
.get
(
world
,
entity
)
.is_ok
()
{
let
player
=
<&
mut
components
::
Player
>
::
query
()
.get_mut
(
world
,
player
.0
)
.unwrap
();
player
.sanity
-=
0.15
*
clock
.frame_delta
();
}
}
}
www/resources/levels/assembly-hall-1.svg
View file @
b588643f
...
...
@@ -249,8 +249,8 @@
inkscape:pageopacity=
"0.0"
inkscape:pageshadow=
"2"
inkscape:zoom=
"0.30241212"
inkscape:cx=
"
1623.7449
"
inkscape:cy=
"1
146.818
1"
inkscape:cx=
"
2713.0684
"
inkscape:cy=
"1
668.971
1"
inkscape:document-units=
"px"
inkscape:current-layer=
"layer4"
inkscape:document-rotation=
"0"
...
...
@@ -1362,6 +1362,48 @@
id=
"tspan1142-2-3-6-9"
x=
"1912.5994"
y=
"794.81024"
>
switch
</tspan></text>
<text
xml:space=
"preserve"
style=
"font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:40px;line-height:1.25;font-family:monospace;-inkscape-font-specification:monospace;letter-spacing:0px;word-spacing:0px;fill:#ffffff;fill-opacity:1;stroke:none"
x=
"959.70618"
y=
"561.16406"
id=
"text242"
><tspan
sodipodi:role=
"line"
id=
"tspan240"
x=
"959.70618"
y=
"561.16406"
>
stationary_obstacle_type_2
</tspan><tspan
sodipodi:role=
"line"
x=
"959.70618"
y=
"611.16406"
id=
"tspan244"
/></text>
<text
xml:space=
"preserve"
style=
"font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:40px;line-height:1.25;font-family:monospace;-inkscape-font-specification:monospace;letter-spacing:0px;word-spacing:0px;fill:#ffffff;fill-opacity:1;stroke:none"
x=
"2089.3142"
y=
"2151.9082"
id=
"text250"
><tspan
sodipodi:role=
"line"
id=
"tspan246"
x=
"2089.3142"
y=
"2151.9082"
>
stationary_obstacle_type_2
</tspan><tspan
sodipodi:role=
"line"
x=
"2089.3142"
y=
"2201.9082"
id=
"tspan248"
/></text>
<text
xml:space=
"preserve"
style=
"font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:40px;line-height:1.25;font-family:monospace;-inkscape-font-specification:monospace;letter-spacing:0px;word-spacing:0px;fill:#ffffff;fill-opacity:1;stroke:none"
x=
"2659.6702"
y=
"1373.1604"
id=
"text256"
><tspan
sodipodi:role=
"line"
id=
"tspan252"
x=
"2659.6702"
y=
"1373.1604"
>
stationary_obstacle_type_2
</tspan><tspan
sodipodi:role=
"line"
x=
"2659.6702"
y=
"1423.1604"
id=
"tspan254"
/></text>
</g>
<g
inkscape:label=
"foreground"
...
...
www/resources/sprites/trojan-horse.svg
0 → 100644
View file @
b588643f
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc=
"http://purl.org/dc/elements/1.1/"
xmlns:cc=
"http://creativecommons.org/ns#"
xmlns:rdf=
"http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg=
"http://www.w3.org/2000/svg"
xmlns=
"http://www.w3.org/2000/svg"
xmlns:sodipodi=
"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape=
"http://www.inkscape.org/namespaces/inkscape"
width=
"26.458334mm"
height=
"21.631525mm"
viewBox=
"0 0 26.458334 21.631525"
version=
"1.1"
id=
"svg8"
sodipodi:docname=
"trojan-horse.svg"
inkscape:version=
"1.0.1 (3bc2e813f5, 2020-09-07)"
>
<defs
id=
"defs2"
>
<inkscape:path-effect
effect=
"bspline"
id=
"path-effect46"
is_visible=
"true"
lpeversion=
"1"
weight=
"33.333333"
steps=
"2"
helper_size=
"0"
apply_no_weight=
"true"
apply_with_weight=
"true"
only_selected=
"false"
/>
<inkscape:path-effect
effect=
"bspline"
id=
"path-effect34"
is_visible=
"true"
lpeversion=
"1"
weight=
"33.333333"
steps=
"2"
helper_size=
"0"
apply_no_weight=
"true"
apply_with_weight=
"true"
only_selected=
"false"
/>
</defs>
<sodipodi:namedview
id=
"base"
pagecolor=
"#ffffff"
bordercolor=
"#666666"
borderopacity=
"1.0"
inkscape:pageopacity=
"0.0"
inkscape:pageshadow=
"2"
inkscape:zoom=
"0.7"
inkscape:cx=
"308.24199"
inkscape:cy=
"165.95159"
inkscape:document-units=
"mm"
inkscape:current-layer=
"layer1"
inkscape:document-rotation=
"0"
showgrid=
"false"
inkscape:window-width=
"1276"
inkscape:window-height=
"685"
inkscape:window-x=
"0"
inkscape:window-y=
"16"
inkscape:window-maximized=
"0"
fit-margin-top=
"0"
fit-margin-left=
"0"
fit-margin-right=
"0"
fit-margin-bottom=
"0"
/>
<metadata
id=
"metadata5"
>
<rdf:RDF>
<cc:Work
rdf:about=
""
>
<dc:format>
image/svg+xml
</dc:format>
<dc:type
rdf:resource=
"http://purl.org/dc/dcmitype/StillImage"
/>
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label=
"Layer 1"
inkscape:groupmode=
"layer"
id=
"layer1"
transform=
"translate(-0.65412778,-43.026499)"
>
<rect
style=
"fill:#05b9ec;stroke-width:0.304886"
id=
"rect10"
width=
"26.458334"
height=
"1.0853986"
x=
"0.65412778"
y=
"63.572624"
/>
<path
style=
"fill:#b239ff;stroke:#000000;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d=
"M 5.1644604,62.30309 C 5.3178956,61.173589 5.6247715,58.914549 5.5740261,57.658893 5.5232808,56.403237 5.1148758,56.15098 4.7847323,55.494951 4.4545888,54.838923 4.202766,53.779148 4.3095451,52.873265 c 0.1067791,-0.905882 0.572168,-1.657787 2.8259427,-2.007669 2.2537747,-0.349883 6.2957112,-0.297721 9.0149642,-0.938532 2.719253,-0.640811 4.115732,-1.974541 4.762188,-2.76636 0.646456,-0.791819 0.542844,-1.041748 0.431167,-1.264535 -0.111678,-0.222787 -0.231425,-0.418418 -0.128067,-0.716748 0.103358,-0.29833 0.429847,-0.69929 0.64411,-1.126142 0.214263,-0.426851 0.316293,-0.879593 0.427318,-0.894199 0.111025,-0.01461 0.231015,0.408897 0.846444,0.750693 0.615429,0.341795 1.726214,0.601904 2.469946,0.902355 0.743732,0.300451 1.120382,0.641197 1.273753,1.047358 0.153372,0.40616 0.08351,0.877715 -0.103099,1.257116 -0.186612,0.379402 -0.489969,0.666666 -0.986479,0.704115 -0.496511,0.03745 -1.186193,-0.174932 -2.094655,0.5369 -0.908463,0.711833 -2.035586,2.347831 -2.729537,3.242436 -0.69395,0.894606 -0.954718,1.047799 -1.124224,1.519217 -0.169507,0.471417 -0.24773,1.260981 -0.491649,1.976292 -0.243919,0.715311 -0.653514,1.356362 -0.779357,2.730821 -0.125844,1.374459 0.03205,3.482193 0.06803,4.522862 0.03598,1.040669 -0.05002,1.014255 -0.347219,1.00104 -0.2972,-0.01322 -0.805578,-0.01322 -1.04354,-0.05982 -0.237962,-0.0466 -0.205445,-0.139842 -0.304499,-1.225108 -0.09905,-1.085266 -0.329685,-3.162502 -0.75657,-4.188139 -0.426885,-1.025638 -1.050029,-0.999585 -2.395817,-0.996371 -1.345788,0.0032 -3.414124,-0.01641 -4.4856278,-0.01134 -1.0715043,0.0051 -1.1461124,0.03484 -1.3386101,1.108616 -0.1924977,1.07378 -0.5028397,3.191438 -0.6902774,4.263927 -0.1874377,1.072488 -0.2519891,1.099811 -0.48347,1.120614 -0.2314809,0.0208 -0.6298944,0.03507 -0.9543297,0.04564 -0.3244353,0.01057 -0.5748754,0.01743 -0.7001197,0.02086 -0.1252442,0.0034 -0.1252392,0.0034 0.028196,-1.126067 z"
id=
"path32"
inkscape:path-effect=
"#path-effect34"
inkscape:original-d=
"M 5.0110251,63.43259 C 5.3179464,61.173596 5.6248221,58.914556 5.9316522,56.655473 5.5232746,56.403247 5.1148685,56.150992 4.7064086,55.898685 4.4546214,54.838915 4.202799,53.77914 3.9509263,52.719302 c 0.4654515,-0.751886 0.9308398,-1.503791 1.3961915,-2.255754 4.0421441,0.05221 8.0840802,0.104371 12.1260512,0.15649 1.39658,-1.333739 2.79306,-2.667468 4.189519,-4.001268 -0.10357,-0.249894 -0.207182,-0.499823 -0.310838,-0.7498 -0.119708,-0.195596 -0.239455,-0.391227 -0.35925,-0.586907 0.326548,-0.400932 0.653035,-0.801893 0.979486,-1.202906 0.10208,-0.452717 0.204109,-0.905459 0.306097,-1.358255 0.12004,0.423564 0.24003,0.847067 0.359978,1.270535 1.110873,0.260163 2.221658,0.520272 3.332419,0.780342 0.376707,0.340803 0.753358,0.681548 1.12997,1.022256 -0.06982,0.471618 -0.139676,0.943173 -0.209581,1.414694 -0.303326,0.28732 -0.606682,0.574585 -0.910091,0.861811 -0.689665,-0.212346 -1.379346,-0.424728 -2.06909,-0.637159 -1.127121,1.636105 -2.254245,3.272102 -3.381437,4.908089 -0.26073,0.153241 -0.521496,0.306436 -0.782311,0.459585 -0.07818,0.789637 -0.156405,1.579201 -0.234674,2.368734 -0.409564,0.641118 -0.819161,1.282167 -1.228807,1.923185 0.15795,2.107865 0.315848,4.215599 0.473705,6.323336 -0.08595,-0.02637 -0.171949,-0.05278 -0.257991,-0.07924 -0.508348,4.3e-5 -1.016726,4.3e-5 -1.525158,0 0.03257,-0.09319 0.06508,-0.186429 0.09755,-0.279706 -0.230595,-2.077278 -0.461224,-4.154514 -0.691904,-6.231837 -0.623128,0.0261 -1.246272,0.05215 -1.869477,0.07816 -2.068373,-0.01958 -4.136709,-0.03921 -6.2051313,-0.05888 -0.074566,0.02981 -0.1491739,0.05958 -0.2238294,0.08931 -0.3103089,2.117787 -0.6206511,4.235445 -0.9310448,6.353101 -0.064509,0.02737 -0.1290615,0.05469 -0.1936601,0.08197 -0.3983839,0.01432 -0.7967975,0.02859 -1.1952643,0.04282 -0.2504043,0.0069 -0.5008441,0.01377 -0.751334,0.02058 z"
/>
<ellipse
style=
"fill:#b239ff;stroke-width:0.264583"
id=
"path36"
cx=
"18.053875"
cy=
"61.123299"
rx=
"3.0351038"
ry=
"2.9617829"
/>
<ellipse
style=
"fill:#b239ff;stroke-width:0.264583"
id=
"circle38"
cx=
"6.2421403"
cy=
"61.015858"
rx=
"3.0351038"
ry=
"2.9617829"
/>
<path
style=
"fill:#b239ff;stroke:#000000;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d=
"m 4.5115291,51.846329 c 0,0 0,0 -0.2478303,-0.01615 -0.2478302,-0.01615 -0.7435189,-0.04846 -1.0716554,0.188313 -0.3281364,0.236771 -0.4886467,0.742572 -0.6080348,1.717365 -0.1193881,0.974792 -0.1976538,2.418492 -0.1025304,3.151238 0.095123,0.732746 0.3635752,0.754546 0.6034661,0.765444 0.2398909,0.0109 0.451211,0.0109 0.5642598,-0.449574 C 3.7622529,56.742491 3.777072,55.82154 3.7861892,55.15993 3.7953064,54.49832 3.798721,54.096083 3.9627391,53.896272 4.1267572,53.696461 4.451319,53.699128 4.5695297,53.391224 4.6877403,53.08332 4.5996391,52.464856 4.5555842,52.155593 4.5115292,51.84633 4.5115291,51.846329 4.5115291,51.846329 Z"
id=
"path44"
inkscape:path-effect=
"#path-effect46"
inkscape:original-d=
"m 4.5115291,51.846329 c 4.52e-5,4.5e-5 4.52e-5,4.5e-5 0,0 -0.4956634,-0.03226 -0.9913518,-0.06457 -1.4870958,-0.09692 -0.160472,0.505869 -0.3209825,1.01167 -0.4815415,1.517437 -0.078224,1.443804 -0.1564895,2.887504 -0.2348021,4.331189 0.2685083,0.02185 0.53696,0.04365 0.8053716,0.0654 0.2113739,4.4e-5 0.422694,4.4e-5 0.6339727,0 0.014865,-0.920943 0.029684,-1.841894 0.044458,-2.762907 0.00346,-0.402208 0.00688,-0.804445 0.010244,-1.206734 0.3246209,0.0027 0.6491833,0.0053 0.9737069,0.008 -0.08806,-0.61848 -0.1761635,-1.236944 -0.2643137,-1.855464 z"
/>
<path
style=
"fill:#b239ff;stroke-width:0.264583"
id=
"path48"
d=
"m 4.3075021,53.540103 c 0.2333719,-0.0081 0.4669204,-4.98e-4 0.7002699,-0.0084 0.3444952,0.01871 0.020885,0.0072 0.7847381,-0.558842 0,0 -0.7995331,0.530262 -0.7995331,0.530262 v 0 c 0.8197106,-0.548738 1.0954663,-0.70238 0.7841385,-0.527865 -0.229384,0.03422 -0.4623342,0.01609 -0.6934351,0.01458 0,0 -0.7761783,0.550302 -0.7761783,0.550302 z"
/>
<ellipse
id=
"path50"
style=
"fill:#b239ff;stroke:#000000;stroke-width:0.264583"
cx=
"4.6710758"
cy=
"53.214783"
rx=
"0.0085707344"
ry=
"0.0083636865"
/>
<ellipse
id=
"path52"
style=
"fill:#b239ff;stroke:#000000;stroke-width:0.264583"
cx=
"4.613553"
cy=
"52.981926"
rx=
"0.0085707344"
ry=
"0.0083636865"
/>
<path
style=
"fill:#b239ff;stroke-width:0.264583"
id=
"path54"
d=
"m 4.1887519,53.304503 c 0.075906,0.01162 0.4060984,0.02386 0.4459027,0.07936 -0.3202952,-0.154258 -0.445316,0.208328 0.7167447,-0.473355 0.013543,-0.008 -0.030509,0.0086 -0.046222,0.0103 -0.042406,0.0045 -0.05352,-0.0011 -0.093484,-0.0097 -0.1289453,-0.08494 -0.092926,-0.339013 -0.081053,-0.467203 0.026988,-0.142581 0.028616,-0.293226 0.073448,-0.432568 0.00361,-0.01122 0.027339,-0.03665 0.01656,-0.03138 -0.2906522,0.142104 -0.5747951,0.296545 -0.8621933,0.444819 -0.017174,0.123706 -0.028523,0.247992 -0.035798,0.372595 -0.0098,0.05699 -0.015869,0.11919 -0.053095,0.167054 -0.00694,0.0089 -0.035816,0.02783 -0.025975,0.02206 0.8172961,-0.478972 0.6179684,-0.723824 0.8275638,-0.43931 -0.012873,-0.131165 0.032814,-0.265197 0.059831,-0.393716 0,0 -0.8557311,0.405375 -0.8557311,0.405375 v 0 c -0.028865,0.151634 -0.08756,0.308356 -0.040552,0.461402 0.018783,0.02814 0.025232,0.09875 0.056347,0.08441 0.6161284,-0.28395 0.8414503,-0.265819 0.8877175,-0.726181 0.00969,-0.130642 0.029076,-0.260317 0.037063,-0.390963 -0.2891561,0.131765 -0.5829849,0.254178 -0.8674682,0.395295 -0.011439,0.0057 -0.00291,0.02488 -0.0046,0.0373 -0.00328,0.02407 -0.00695,0.0481 -0.010292,0.07216 -0.01678,0.120874 -0.033532,0.24177 -0.047179,0.363025 -0.014885,0.196018 -0.032727,0.436507 0.128884,0.581816 0.3927196,0.171623 0.6224008,-0.177093 1.0480257,-0.422891 0.014551,-0.0084 0.014782,-0.03084 0.01482,-0.04734 4.52e-5,-0.02257 -0.00971,-0.04412 -0.014566,-0.06618 -0.012933,-0.01557 -0.021866,-0.03536 -0.038799,-0.0467 -0.09879,-0.06615 -0.3340319,-0.06728 -0.4523617,-0.09038 0,0 -0.7835321,0.540931 -0.7835322,0.540931 z"
/>
<path
style=
"fill:#b239ff;stroke-width:0.264583"
id=
"path56"
d=
"m 4.0866134,53.775233 c 0.026849,0.01353 0.053699,0.02707 0.080548,0.0406 0,0 0.798843,-0.510485 0.798843,-0.510485 v 0 c -0.023293,-0.01228 -0.046587,-0.02455 -0.06988,-0.03683 0,0 -0.8095115,0.506715 -0.809511,0.506715 z"
/>
<path
style=
"fill:#b239ff;stroke-width:0.264583"
id=
"path58"
d=
"m 4.2247525,52.516301 c 0.1189918,0.0015 0.2370402,-0.01283 0.3549524,-0.02626 0,0 0.7648339,-0.555954 0.7648339,-0.555954 v 0 c -0.1132458,0.01353 -0.22705,0.03546 -0.3413899,0.03034 0,0 -0.7783964,0.551875 -0.7783964,0.551875 z"
/>
<path
style=
"fill:#b239ff;stroke-width:0.264583"
id=
"path60"
d=
"m 4.0753279,52.516934 c 0.2560861,-9.98e-4 0.509844,-0.0308 0.7581928,-0.09083 0.1408278,-0.0398 0.072511,-0.01865 0.2050921,-0.06302 0,0 0.7487162,-0.572444 0.7487162,-0.572444 v 0 c -0.1301799,0.05298 -0.06236,0.02842 -0.2037859,0.0728 -0.2364308,0.0711 -0.4821986,0.110739 -0.7302674,0.101933 0,0 -0.7779478,0.551559 -0.7779478,0.551559 z"
/>
<path
style=
"fill:#b239ff;stroke-width:0.264583"
id=
"path62"
d=
"m 4.8047966,51.97501 c 0.276414,-0.195268 0.8234367,-0.478515 -0.5330333,0.289459 0,0 0.7427629,-0.5827 0.7427629,-0.5827 v 0 c -0.3731852,0.207977 -0.7577996,0.39273 -1.1060251,0.637416 0,0 0.8962955,-0.344175 0.8962955,-0.344175 z"
/>
<path
style=
"fill:#b239ff;stroke-width:0.264583"
id=
"path64"
d=
"m 5.2211203,52.020594 c 0.095632,-0.05256 0.045964,-0.02385 0.1485777,-0.08683 0,0 -0.8879442,0.336139 -0.8879442,0.336139 v 0 c -0.1077619,0.06544 -0.056497,0.03255 -0.1541165,0.09821 0,0 0.893483,-0.347523 0.893483,-0.347523 z"
/>
<path
style=
"fill:#b239ff;stroke-width:0.264583"
id=
"path66"
d=
"m 4.2058765,52.290979 c 0.1180298,-0.003 0.2361147,-0.0022 0.3541728,-0.0026 0,0 0.7708709,-0.546541 0.7708709,-0.546541 v 0 c -0.1156172,-2.49e-4 -0.231265,4.99e-4 -0.3468525,-0.0026 0,0 -0.7781912,0.551731 -0.7781912,0.551731 z"
/>
<path
style=
"fill:#b239ff;stroke-width:0.264583"
id=
"path68"
d=
"m 4.3437719,52.181777 c 0.1246349,-0.01873 0.060145,-0.01004 0.193527,-0.02564 0,0 0.7635006,-0.553492 0.7635006,-0.553492 v 0 c -0.1301726,0.01181 -0.067688,0.0064 -0.1874449,0.01653 0,0 -0.7695827,0.562604 -0.7695827,0.562604 z"
/>
</g>
</svg>
www/src/index.html
View file @
b588643f
...
...
@@ -39,6 +39,18 @@
...
</text>
</g>
<g
id=
"ingame-game-over"
style=
"display: none"
>
<defs>
<filter
id=
"blur-game-over"
>
<feGaussianBlur
in=
"SourceGraphic"
stdDeviation=
"15"
/>
</filter>
</defs>
<rect
x=
"160"
y=
"190"
width=
"1600"
height=
"160"
class=
"overlay-backdrop"
filter=
"url(#blur-game-over)"
/>
<text
x=
"960"
y=
"300"
class=
"header"
>
GAME OVER!
</text>
</g>
</svg>
<svg
id=
"heaven-ui"
class=
"game-gui"
viewBox=
"0 0 1920 1080"
style=
"display: none"
>
<!-- GUI for the "heaven" -->
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment