From d5197ea39e04f7ed4459525539181097ceac6f4f Mon Sep 17 00:00:00 2001 From: Jakob Feldmann Date: Sun, 12 Mar 2023 22:45:00 +0100 Subject: [PATCH] =?UTF-8?q?=C3=9Cberholtes=20Management=20Level=20State=20?= =?UTF-8?q?und=20Signals?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/contraption/Coin.gd | 10 -- assets/contraption/FlyingLaserCutter.aseprite | Bin 9462 -> 9560 bytes .../contraption}/FlyingLaserCutter.png | Bin .../contraption/FlyingLaserCutter.png.import | 35 ++++++ .../contraption/FlyingLaserCutterShaded.png | Bin 0 -> 2054 bytes .../FlyingLaserCutterShaded.png.import | 35 ++++++ assets/contraption/FlyingPlatformClean.png | Bin 370 -> 425 bytes project.godot | 10 +- src/Actors/{Player.gd => Actor.gd} | 6 +- src/Actors/Blobby/Blobby.gd | 18 ++- src/Actors/Blobby/Blobby.tscn | 10 +- src/Actors/Blobby/BlobbyStateMachine.gd | 3 +- src/Actors/BlobbyCam.gd | 14 ++- src/Actors/BlobbyCam.tscn | 54 ++++++++- src/Actors/Enemies/Beings/Caterpillar.gd | 6 +- src/Actors/Enemies/Beings/DartingEnemy.gd | 8 +- src/Actors/Enemies/Beings/Enemy.gd | 6 +- src/Actors/Enemies/Beings/Flyer.gd | 5 +- src/Actors/Enemies/Beings/Flyer.tscn | 1 + src/Actors/Enemies/Beings/SimpleEnemy.gd | 6 +- src/Actors/Enemies/Beings/SmortEnemy.gd | 6 +- src/Actors/Enemies/Beings/WhatAreFrog.gd | 5 +- src/Actors/Enemies/Beings/WhatAreFrog.tscn | 2 +- src/Autoload/GlobalState.gd | 26 ----- src/Autoload/GlobalState.tscn | 6 - .../Platform/FlyingLaserCutter.tscn | 13 +-- src/Contraptions/Platform/FlyingPlatform.tscn | 2 +- .../Platform/FlyingPlatformClean.tscn | 2 +- src/Contraptions/Platform/Spring.tscn | 2 +- src/Contraptions/Triggers/ElevatorButton.gd | 2 +- src/Contraptions/Triggers/ElevatorButton.tscn | 2 - src/Levels/01 Level.tscn | 22 ++-- src/Levels/02 Level.tscn | 22 ++-- src/Levels/03 Level.tscn | 23 ++-- src/Levels/Enemy Test Level.tscn | 11 +- src/Levels/Flyer Test Level.tscn | 24 ++-- src/Levels/Froggy Test Level.tscn | 31 ++---- src/Levels/Grass Test Level.tscn | 23 ++-- src/Levels/LevelTemplate.tscn | 103 ++++++++++++++++++ src/NeutralObjects/Coin.gd | 11 ++ src/NeutralObjects/Coin.tscn | 4 +- src/StateMachines/StateMachine.gd | 4 + src/UserInterface/Buttons/RetryButton.gd | 3 +- src/UserInterface/Buttons/StatsLabel.gd | 4 +- src/UserInterface/Buttons/StatsLabel.tscn | 4 +- src/UserInterface/Screens/HUD.gd | 15 ++- src/UserInterface/Screens/HUD.tscn | 44 +++++--- src/UserInterface/Screens/PauseScreen.gd | 4 +- src/Utilities/GameplaySignalManager.gd | 31 ------ src/Utilities/LevelState.gd | 34 ++++++ src/Utilities/LevelState.tscn | 6 + src/Utilities/SignalManager.gd | 11 ++ src/Utilities/SignalManager.tscn | 7 ++ 53 files changed, 489 insertions(+), 247 deletions(-) delete mode 100644 assets/contraption/Coin.gd rename {src/Contraptions/Platform => assets/contraption}/FlyingLaserCutter.png (100%) create mode 100644 assets/contraption/FlyingLaserCutter.png.import create mode 100644 assets/contraption/FlyingLaserCutterShaded.png create mode 100644 assets/contraption/FlyingLaserCutterShaded.png.import rename src/Actors/{Player.gd => Actor.gd} (85%) delete mode 100644 src/Autoload/GlobalState.gd delete mode 100644 src/Autoload/GlobalState.tscn create mode 100644 src/Levels/LevelTemplate.tscn create mode 100644 src/NeutralObjects/Coin.gd delete mode 100644 src/Utilities/GameplaySignalManager.gd create mode 100644 src/Utilities/LevelState.gd create mode 100644 src/Utilities/LevelState.tscn create mode 100644 src/Utilities/SignalManager.gd create mode 100644 src/Utilities/SignalManager.tscn diff --git a/assets/contraption/Coin.gd b/assets/contraption/Coin.gd deleted file mode 100644 index 7776a10..0000000 --- a/assets/contraption/Coin.gd +++ /dev/null @@ -1,10 +0,0 @@ -extends Area2D - -onready var anim_player: AnimationPlayer = get_node("AnimationPlayer") - -export var scoreValue: = 100 - -func _on_body_entered(body: Node) -> void: - GlobalState.score += scoreValue - anim_player.play("fade_out") - queue_free() diff --git a/assets/contraption/FlyingLaserCutter.aseprite b/assets/contraption/FlyingLaserCutter.aseprite index 0a7adf38089dfd389afe916ee8c8d3182c55a6bd..17c51b0d988a52447f866efa0e3db9e8607bcd69 100644 GIT binary patch delta 7036 zcmb7}dpwhk-^WQ>?l8AX%3;bW<&ZFhjojUZSf%cSTAGqr3+0g6lxiI?teg*((80N= zkvS#iw2GW_W=_j&4jVf>*L44$-|yAyex9f2zw6qc@9XpZd_SM>7VWz1*SKiLuEB{f z#@>jKDsROX3}WTVp7FyMpli-Iv?_Re6Iw z66^18VJf_qcP|T^mRxHvCiQTW>W9Q;jY*f_=BwG&Hjaz&t)tf*YEnjSdbw&Uk8Jb_Qz84~zZzn}v z29d{Wn{Oo%qIC=*&+y>xymn(qHrUGjq6Z8HuWH{;H}`KjNOVi&J}!LLj`a-;-=nK? zq!+7rCre_q_?|pls?NZCeB`&#OW6o_oZ45cOOk9G;j-#=vwa1wV2e-%##dsy;ccq00uzvDb#8(;N3QkefnIq}cZEg9U$Opu2syC_L!@0JVD zGL_L}un~Ua1=W4oAFwen&$q|gu!*qwD^G57IXp3ELMpw%1Y&jBV?3fJ?ijnMTfC<5 zsx_MJp%^b4)1+nJti7pnG?BP_=0y_Bk9*@d+vEJc!;rF&2|w#-u3DtKlYC?ODDdSZ zkSf-`+{h;Exn`|wT(yGW)|A1qKH&FNQk(t*)hemG?UENscokh>kXoeH7|Pv7TPw+J zMqK|S`~J6K#|?6ulnNhMNvT?emWWqxD+M_e-fVCS-V>eFLd)MkbPOb6v`C(D!;4pM zKdJX;s=vzn3SRg&>1)p(gF}>PD`x&n(^=c~q8JDxUcBw97?h&Pw z>IGK;rfd3RRiH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*+9{_*I`kSW+jpnre)}E*0u8mZ7y9_;!dJl$_tuOXU0v~XtAA> z==2nXh|!?pK2TsNgm=K4GAcBbxZ@$I{X*;XY}SPliKIUX;2_;S&4y=M3vwttZbMsGw$@os&Q&u{KR;F#Ys1$Lyb$o9D~Ju z$M3*q<`U|IQ;zl6Rci;!f?EmJTOnl4%@V4mj6~HtOOsKdf`+d1X8FA~Mb%W!^+(#e z@=CQobCC#y71H6eduMAc`G9X9^E@$`J?~paJGr})C0cuHRqu<>leK6-PkzF28!bk| zc>(kNh~>rF=e@)Cp*vo4ZqnuL(iWXbg-Ohs|DbArk>SV4Bq%3kVTvMAK z*D2gH2?nB7JLMVPbyWhun&a}AtB67@%Gk@Is9LLG4oj_5LJFTC53cujOaborn zD5|n6DN}TTJvb9f@dKNP^(M_-8ozLAu*$}hV|2j+#n5E(po1IFbO~Z9t3ThjB&OAdVGe$#9SO@DJRLKDm4y0^n6EiqqkY|-5A)oYHpX6^VT%B5dl7+h*3^z6O`B4c;TUfMG}GY4 z*Cdw<>0k~1hF0&b7{NlG-#u!vDRY0>M(Ny@m+~N#_YcEQG6<00P)EgV-==eK&VVipc%82Q8sE-hm5df$O>itAm;-eaFO f#`?Lx$^$^6pRK3z+_xQ((8mtoFei>e+LQP<@N_5E literal 0 HcmV?d00001 diff --git a/assets/contraption/FlyingLaserCutterShaded.png.import b/assets/contraption/FlyingLaserCutterShaded.png.import new file mode 100644 index 0000000..d09739d --- /dev/null +++ b/assets/contraption/FlyingLaserCutterShaded.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/FlyingLaserCutterShaded.png-bdace770643648214f1e8737a3432eb7.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/contraption/FlyingLaserCutterShaded.png" +dest_files=[ "res://.import/FlyingLaserCutterShaded.png-bdace770643648214f1e8737a3432eb7.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=false +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=false +svg/scale=1.0 diff --git a/assets/contraption/FlyingPlatformClean.png b/assets/contraption/FlyingPlatformClean.png index 8077823300c89bf0f7535487a05472c3d6609b02..fd3bf88749ac34ee6cd7941f2aa9788e92b9699a 100644 GIT binary patch delta 385 zcmV-{0e=4S0;vO#F@Ix8L_t(YiPe?AYQj(yhrd**iw-GBA+agq;9}Y(f_(rLoH`Yu zQ=g&F(Pwb#UOEWXM~F)i3PQ7J6R3h2>|(K|Lz(1x#wQtp?>55 zT-!1Lcik=k=dD(vYvb}1fYR+_Y(LKnK&WUnr@D9rpto3(G=Gg;CZfg7<9W7~)uw>K z+eaX1XpUng@uSL0;@(%~B6{x7Ex@+M90+N&Y$_6%R9C!HOTy2zEM!SSloZmQI5fv- zVlg!OdB^K>3*)qkLr7b(axs;n?~+*$pe0aaGevMD+vgF^NKfXsWH z<$fOk!y5f;DwVeu`(%uGF-=Yi$24*o+M*e}LgByQzvBN#gz#jqr!(#c`qnq~8%lW* fwR#4)PcpzKtC*Z*pj1Rr00000NkvXXu0mjfR2R92 delta 330 zcmV-Q0k!_A1M&ipF@G#cL_t(YiPe)mPQySDg}+4>X`oo72(S}3DQFVW1SuRKAf=+B z;TW95XW$BmA`;{XrbCJp2{#Gr!jbHPDkzGn{1ZE(hz&Te+L>LwnfG=^JolR+zLywgD1X;2l{~@&&@oH^j)caW zD#t8C*8vg%=_Dl1mEoEnE@M7FRbyME&DOG)Qa7=r0+s;Sfmyg9fDKqu73Ry1drknr z^=KxNXjZ7;8gD_qcDEO1b9>vjQw{9AfZPbJygBclpZlsRpjDSN3}Y=93phSG1z void: - if(GlobalState.is_dead): + if(levelState.is_dead): return var snap = Vector2.DOWN * 128 var center_floor_rot = 0 @@ -408,8 +410,8 @@ func calculate_slope_rotation(onfloor: bool) -> float: func die() -> void: z_index = 1 - GlobalState.is_dead = true - GlobalState.deaths += 1 + levelState.is_dead = true + levelState.deaths += 1 $BlobbySprite/AnimationTree.active = false $BlobbySprite/BlobbymationPlayer.play("dying3") @@ -433,10 +435,6 @@ func _on_Blobby_got_grounded() -> void: air_strafe_charges = air_strafe_charges + 1 if max_air_strafe_charges > air_strafe_charges else 0 -func _on_GameplaySignalManager_getback_timer_up() -> void: - die() - - func _on_BlobbySkin_body_exited(body:Node) -> void: # This is for drop through platforms if body.get_collision_mask_bit(7): diff --git a/src/Actors/Blobby/Blobby.tscn b/src/Actors/Blobby/Blobby.tscn index a978df6..b003aaa 100644 --- a/src/Actors/Blobby/Blobby.tscn +++ b/src/Actors/Blobby/Blobby.tscn @@ -4514,6 +4514,7 @@ size = Vector2( 128, 128 ) transparent_bg = true [node name="IridescenceBall" parent="BubbleShieldViewport" instance=ExtResource( 6 )] +visible = false [node name="BlobbySprite" type="Sprite" parent="."] position = Vector2( 0, -16 ) @@ -4609,7 +4610,6 @@ position = Vector2( 0.0392303, -10.002 ) shape = SubResource( 1 ) [node name="WallRaycasts" type="Node2D" parent="."] -visible = false position = Vector2( 0, -1 ) [node name="LeftWallRaycast" type="Node2D" parent="WallRaycasts"] @@ -4618,13 +4618,13 @@ position = Vector2( 0, -1 ) position = Vector2( -11.9763, -5 ) enabled = true cast_to = Vector2( -1.5, 0 ) -collision_mask = 56 +collision_mask = 40 [node name="Left_Wallcast2" type="RayCast2D" parent="WallRaycasts/LeftWallRaycast"] position = Vector2( -11.9763, 5 ) enabled = true cast_to = Vector2( -1.5, 0 ) -collision_mask = 56 +collision_mask = 40 [node name="RightWallRaycast" type="Node2D" parent="WallRaycasts"] @@ -4633,14 +4633,14 @@ position = Vector2( 12.0551, -5 ) enabled = true exclude_parent = false cast_to = Vector2( 1.5, 0 ) -collision_mask = 56 +collision_mask = 40 [node name="Right_Wallcast2" type="RayCast2D" parent="WallRaycasts/RightWallRaycast"] position = Vector2( 12.0551, 5 ) enabled = true exclude_parent = false cast_to = Vector2( 1.5, 0 ) -collision_mask = 56 +collision_mask = 40 [node name="SlopeRaycastLeft" type="RayCast2D" parent="."] visible = false diff --git a/src/Actors/Blobby/BlobbyStateMachine.gd b/src/Actors/Blobby/BlobbyStateMachine.gd index a0f105f..de34b0a 100644 --- a/src/Actors/Blobby/BlobbyStateMachine.gd +++ b/src/Actors/Blobby/BlobbyStateMachine.gd @@ -18,6 +18,7 @@ var didTurn # Adds the intial states func _ready(): + signalManager.connect("getback_timer_up", parent, "die") add_state("idle") add_state("duck") add_state("run") @@ -26,7 +27,7 @@ func _ready(): add_state("fall") add_state("wallslide") state = states.idle - GlobalState.is_dead = false + levelState.is_dead = false set_state(states.idle) diff --git a/src/Actors/BlobbyCam.gd b/src/Actors/BlobbyCam.gd index 33fab4a..cc4c79e 100644 --- a/src/Actors/BlobbyCam.gd +++ b/src/Actors/BlobbyCam.gd @@ -17,6 +17,8 @@ export var camera_horizontal_shift = 60 export var offset_reset_seconds := 1 export var offset_adapt_seconds := 1 +onready var levelState := $"%LevelState" +onready var signalManager := $"%SignalManager" onready var shiftLeft = $CameraAnimationPlayer.get_animation("shiftingLeft") onready var shiftRight = $CameraAnimationPlayer.get_animation("shiftingRight") onready var shiftCenter = $CameraAnimationPlayer.get_animation("shiftingCenter") @@ -42,7 +44,12 @@ func _ready(): # get_node("LightAnimationPlayer").play("Pulsing") func _physics_process(delta: float) -> void: - if(!GlobalState.is_dead): + if(!levelState.is_dead): + if(anim_player.is_playing()): + position = blobby.position + prev_pos = position + _update_lighting_shader() + return var player_vel = (blobby.position - prev_pos)/delta # TODO Take average of velocity here if(abs(player_vel.x) >= blobby.max_velocity["walk"] * 0.97 @@ -61,8 +68,7 @@ func _physics_process(delta: float) -> void: left_move_time = max(0, left_move_time - delta) right_move_time = max(0, right_move_time - delta) - if(!anim_player.is_playing()): - _adapt_to_movement(player_vel) + _adapt_to_movement(player_vel) position = blobby.position prev_pos = position #TODO Do this via a event or let it be to track blobbies movement better @@ -104,8 +110,6 @@ func _adapt_to_movement(velocity: Vector2) -> void: var center = get_camera_screen_center() var left_edge_pos = center.x - screen_rect.x/2 + camera_horizontal_shift var right_edge_pos = center.x + screen_rect.x/2 - camera_horizontal_shift - # TODO: Blobby can go off screen, when shifting camera at level edge and returning i - # n the opposite direction slowly if(left_move_time >= offset_adapt_seconds && !anim_player.is_playing()): left_move_time = 0 target_offset.x = -camera_horizontal_shift diff --git a/src/Actors/BlobbyCam.tscn b/src/Actors/BlobbyCam.tscn index d6f7a30..bcf9b50 100644 --- a/src/Actors/BlobbyCam.tscn +++ b/src/Actors/BlobbyCam.tscn @@ -366,6 +366,30 @@ tracks/4/keys = { "update": 0, "values": [ 10000000, 10000000 ] } +tracks/5/type = "value" +tracks/5/path = NodePath(".:drag_margin_left") +tracks/5/interp = 1 +tracks/5/loop_wrap = true +tracks/5/imported = false +tracks/5/enabled = true +tracks/5/keys = { +"times": PoolRealArray( 0, 0.6 ), +"transitions": PoolRealArray( 1, 0.5 ), +"update": 0, +"values": [ 0.2, 0.05 ] +} +tracks/6/type = "value" +tracks/6/path = NodePath(".:drag_margin_right") +tracks/6/interp = 1 +tracks/6/loop_wrap = true +tracks/6/imported = false +tracks/6/enabled = true +tracks/6/keys = { +"times": PoolRealArray( 0, 0.6 ), +"transitions": PoolRealArray( 1, 0.5 ), +"update": 0, +"values": [ 0.2, 0.05 ] +} [sub_resource type="Animation" id=12] resource_name = "shiftingLeft" @@ -394,6 +418,18 @@ tracks/1/keys = { "update": 0, "values": [ -10000000, -10000000 ] } +tracks/2/type = "value" +tracks/2/path = NodePath(".:drag_margin_left") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/imported = false +tracks/2/enabled = false +tracks/2/keys = { +"times": PoolRealArray( 0, 0.6 ), +"transitions": PoolRealArray( 1, 1 ), +"update": 0, +"values": [ 0.2, 0.05 ] +} [sub_resource type="Animation" id=13] resource_name = "shiftingRight" @@ -422,6 +458,18 @@ tracks/1/keys = { "update": 0, "values": [ 10000000, 10000000 ] } +tracks/2/type = "value" +tracks/2/path = NodePath(".:drag_margin_right") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/imported = false +tracks/2/enabled = false +tracks/2/keys = { +"times": PoolRealArray( 0, 0.6 ), +"transitions": PoolRealArray( 1, 1 ), +"update": 0, +"values": [ 0.2, 0.05 ] +} [sub_resource type="Animation" id=9] resource_name = "Pulsing" @@ -529,9 +577,7 @@ zoom = Vector2( 0.75, 0.75 ) limit_smoothed = true drag_margin_h_enabled = true drag_margin_v_enabled = true -drag_margin_left = 0.05 drag_margin_top = 0.0 -drag_margin_right = 0.05 drag_margin_bottom = 0.0 editor_draw_drag_margin = true script = ExtResource( 1 ) @@ -633,10 +679,10 @@ texture = ExtResource( 8 ) [node name="AnimatedSprite" type="AnimatedSprite" parent="ParallaxBackground/ParallaxLayer5"] visible = false frames = SubResource( 7 ) -frame = 4 +frame = 13 playing = true [node name="AnimatedSprite2" type="AnimatedSprite" parent="ParallaxBackground/ParallaxLayer5"] frames = SubResource( 8 ) -frame = 9 +frame = 4 playing = true diff --git a/src/Actors/Enemies/Beings/Caterpillar.gd b/src/Actors/Enemies/Beings/Caterpillar.gd index bc2c755..2067978 100644 --- a/src/Actors/Enemies/Beings/Caterpillar.gd +++ b/src/Actors/Enemies/Beings/Caterpillar.gd @@ -1,6 +1,4 @@ -extends Player - -export var score := 100 +extends Actor onready var left_src = $SlopeRaycastLeft onready var right_src = $SlopeRaycastRight @@ -39,7 +37,7 @@ func _physics_process(delta: float) -> void: func die() -> void: queue_free() - GlobalState.score += score + levelState.kills += 1 func _on_EnemySkin_area_entered(area:Area2D) -> void: if area.is_in_group("harmful"): diff --git a/src/Actors/Enemies/Beings/DartingEnemy.gd b/src/Actors/Enemies/Beings/DartingEnemy.gd index 72221b9..21cde0a 100644 --- a/src/Actors/Enemies/Beings/DartingEnemy.gd +++ b/src/Actors/Enemies/Beings/DartingEnemy.gd @@ -1,12 +1,8 @@ -extends Player - -export var score := 100 - +extends Actor func _ready() -> void: set_physics_process(false) - # TODO adapt to groups func _on_StompDetector_body_entered(body: Node) -> void: if body.global_position.y > get_node("StompDetector").global_position.y: @@ -30,7 +26,7 @@ func player_on_floor_direction(): func die() -> void: queue_free() - GlobalState.score += score + levelState.kills += 1 func _on_EnemySkin_area_entered(area:Area2D) -> void: if area.is_in_group("harmful"): diff --git a/src/Actors/Enemies/Beings/Enemy.gd b/src/Actors/Enemies/Beings/Enemy.gd index 91c4d25..9a55523 100644 --- a/src/Actors/Enemies/Beings/Enemy.gd +++ b/src/Actors/Enemies/Beings/Enemy.gd @@ -1,6 +1,4 @@ -extends Player - -export var score := 100 +extends Actor func _ready() -> void: @@ -26,7 +24,7 @@ func _physics_process(delta: float) -> void: func die() -> void: queue_free() - GlobalState.score += score + levelState.kills += 1 func _on_EnemySkin_area_entered(area:Area2D) -> void: diff --git a/src/Actors/Enemies/Beings/Flyer.gd b/src/Actors/Enemies/Beings/Flyer.gd index 2c71357..21b96b5 100644 --- a/src/Actors/Enemies/Beings/Flyer.gd +++ b/src/Actors/Enemies/Beings/Flyer.gd @@ -1,4 +1,4 @@ -extends Player +extends Actor const PhysicsFunc = preload("res://src/Utilities/Physic/PhysicsFunc.gd") onready var players = get_tree().get_nodes_in_group("player") @@ -12,7 +12,6 @@ onready var target_lost_timer: Timer onready var update_navigation_timer: Timer onready var rng = RandomNumberGenerator.new() -export var score := 100 # Is given in blocks export var vision_distance := 6.0 export var blindspot_angle := 20 @@ -155,7 +154,7 @@ func update_navigation() -> void: nav_agent.set_target_location(next_waypoint) func die() -> void: - GlobalState.score += score + levelState.kills += 1 queue_free() func get_facing_direction() -> float: diff --git a/src/Actors/Enemies/Beings/Flyer.tscn b/src/Actors/Enemies/Beings/Flyer.tscn index c65079a..69e9360 100644 --- a/src/Actors/Enemies/Beings/Flyer.tscn +++ b/src/Actors/Enemies/Beings/Flyer.tscn @@ -219,6 +219,7 @@ valign = 1 [node name="FlyerSprite" type="Sprite" parent="."] unique_name_in_owner = true +scale = Vector2( -1, 1 ) texture = ExtResource( 4 ) hframes = 2 diff --git a/src/Actors/Enemies/Beings/SimpleEnemy.gd b/src/Actors/Enemies/Beings/SimpleEnemy.gd index 129f46d..7aa031b 100644 --- a/src/Actors/Enemies/Beings/SimpleEnemy.gd +++ b/src/Actors/Enemies/Beings/SimpleEnemy.gd @@ -1,6 +1,4 @@ -extends Player - -export var score := 100 +extends Actor func _ready() -> void: @@ -30,7 +28,7 @@ func is_at_ledge(): func die() -> void: queue_free() - GlobalState.score += score + levelState.kills += 1 func _on_EnemySkin_area_entered(area:Area2D) -> void: diff --git a/src/Actors/Enemies/Beings/SmortEnemy.gd b/src/Actors/Enemies/Beings/SmortEnemy.gd index 635afaa..8968b5d 100644 --- a/src/Actors/Enemies/Beings/SmortEnemy.gd +++ b/src/Actors/Enemies/Beings/SmortEnemy.gd @@ -1,6 +1,4 @@ -extends Player - -export var score := 100 +extends Actor func _ready() -> void: @@ -31,7 +29,7 @@ func is_safe_drop(): func die() -> void: queue_free() - GlobalState.score += score + levelState.kills += 1 func _on_EnemySkin_area_entered(area:Area2D) -> void: if area.is_in_group("harmful"): diff --git a/src/Actors/Enemies/Beings/WhatAreFrog.gd b/src/Actors/Enemies/Beings/WhatAreFrog.gd index 97ce07c..fcff03e 100644 --- a/src/Actors/Enemies/Beings/WhatAreFrog.gd +++ b/src/Actors/Enemies/Beings/WhatAreFrog.gd @@ -1,4 +1,4 @@ -extends Player +extends Actor const PhysicsFunc = preload("res://src/Utilities/Physic/PhysicsFunc.gd") onready var players = get_tree().get_nodes_in_group("player") @@ -13,7 +13,6 @@ onready var jump_timer: Timer onready var target_lost_timer: Timer onready var rng = RandomNumberGenerator.new() -export var score := 100 # Is given in blocks export var vision_distance := 6.0 export var attack_jump_range := 6.0 @@ -98,7 +97,7 @@ func execute_movement(delta: float) -> void: func die() -> void: - GlobalState.score += score + levelState.kills += 1 queue_free() diff --git a/src/Actors/Enemies/Beings/WhatAreFrog.tscn b/src/Actors/Enemies/Beings/WhatAreFrog.tscn index 066ea1e..3e1dc6b 100644 --- a/src/Actors/Enemies/Beings/WhatAreFrog.tscn +++ b/src/Actors/Enemies/Beings/WhatAreFrog.tscn @@ -350,7 +350,7 @@ extents = Vector2( 18.2143, 13.5955 ) [node name="WhatAreFrog" type="KinematicBody2D" groups=["harmful"]] collision_layer = 2 -collision_mask = 9 +collision_mask = 57 collision/safe_margin = 0.001 script = ExtResource( 2 ) diff --git a/src/Autoload/GlobalState.gd b/src/Autoload/GlobalState.gd deleted file mode 100644 index 45518ec..0000000 --- a/src/Autoload/GlobalState.gd +++ /dev/null @@ -1,26 +0,0 @@ -extends Node - -signal score_updated -signal player_died - -#TODO Easteregg pls -var score: = 0 setget set_score -var deaths: = 0 setget set_deaths -var is_dead: = false setget set_dead - - -func reset() -> void: - score = 0 - deaths = 0 - -#TODO Remove score -func set_score(value: int) -> void: - score = value - emit_signal("score_updated") - -func set_deaths(value: int) -> void: - deaths = value - #emit_signal("player_died") - -func set_dead(value: bool) -> void: - is_dead = value \ No newline at end of file diff --git a/src/Autoload/GlobalState.tscn b/src/Autoload/GlobalState.tscn deleted file mode 100644 index f107903..0000000 --- a/src/Autoload/GlobalState.tscn +++ /dev/null @@ -1,6 +0,0 @@ -[gd_scene load_steps=2 format=2] - -[ext_resource path="res://src/Autoload/GlobalState.gd" type="Script" id=1] - -[node name="GlobalState" type="Node"] -script = ExtResource( 1 ) diff --git a/src/Contraptions/Platform/FlyingLaserCutter.tscn b/src/Contraptions/Platform/FlyingLaserCutter.tscn index 23cfad4..e664274 100644 --- a/src/Contraptions/Platform/FlyingLaserCutter.tscn +++ b/src/Contraptions/Platform/FlyingLaserCutter.tscn @@ -1,9 +1,7 @@ [gd_scene load_steps=6 format=2] [ext_resource path="res://src/Contraptions/Platform/FlyingLaserCutter.gd" type="Script" id=1] - -[sub_resource type="StreamTexture" id=5] -load_path = "res://.import/FlyingLaserCutter.png-9cf80385a79c58041216f8c2509a5bab.stex" +[ext_resource path="res://assets/contraption/FlyingLaserCutterShaded.png" type="Texture" id=2] [sub_resource type="Animation" id=2] length = 2.4 @@ -25,7 +23,7 @@ tracks/0/keys = { extents = Vector2( 11.4921, 11.9129 ) [sub_resource type="RectangleShape2D" id=4] -extents = Vector2( 3.06672, 10.9923 ) +extents = Vector2( 3.067, 10.5 ) [node name="FlyingLaserCutter" type="Node2D"] script = ExtResource( 1 ) @@ -36,7 +34,7 @@ collision_mask = 57 collision/safe_margin = 0.001 [node name="Sprite" type="Sprite" parent="FlyingLaserCutterBody"] -texture = SubResource( 5 ) +texture = ExtResource( 2 ) hframes = 5 vframes = 5 frame = 21 @@ -48,20 +46,17 @@ __meta__ = { anims/default = SubResource( 2 ) [node name="CollisionShape2D" type="CollisionShape2D" parent="FlyingLaserCutterBody"] -visible = false position = Vector2( -0.461, 0 ) shape = SubResource( 3 ) [node name="LaserArea" type="Area2D" parent="FlyingLaserCutterBody" groups=["harmful"]] process_priority = -1 -visible = false collision_layer = 32 collision_mask = 3 [node name="PainZone" type="CollisionShape2D" parent="FlyingLaserCutterBody/LaserArea" groups=["harmful"]] process_priority = -1 -visible = false -position = Vector2( 9.64728, 0.0077219 ) +position = Vector2( 9.647, 0 ) shape = SubResource( 4 ) [node name="Triggers" type="Node2D" parent="FlyingLaserCutterBody"] diff --git a/src/Contraptions/Platform/FlyingPlatform.tscn b/src/Contraptions/Platform/FlyingPlatform.tscn index e23c41c..df5e432 100644 --- a/src/Contraptions/Platform/FlyingPlatform.tscn +++ b/src/Contraptions/Platform/FlyingPlatform.tscn @@ -27,7 +27,7 @@ tracks/0/keys = { script = ExtResource( 2 ) [node name="KinematicBody2D" type="KinematicBody2D" parent="."] -collision_layer = 8 +collision_layer = 16 collision_mask = 0 motion/sync_to_physics = true diff --git a/src/Contraptions/Platform/FlyingPlatformClean.tscn b/src/Contraptions/Platform/FlyingPlatformClean.tscn index ff1e9ab..6cb4ad4 100644 --- a/src/Contraptions/Platform/FlyingPlatformClean.tscn +++ b/src/Contraptions/Platform/FlyingPlatformClean.tscn @@ -27,7 +27,7 @@ tracks/0/keys = { script = ExtResource( 2 ) [node name="KinematicBody2D" type="KinematicBody2D" parent="."] -collision_layer = 8 +collision_layer = 16 collision_mask = 0 motion/sync_to_physics = true diff --git a/src/Contraptions/Platform/Spring.tscn b/src/Contraptions/Platform/Spring.tscn index 6b7e5a0..1a8e73f 100644 --- a/src/Contraptions/Platform/Spring.tscn +++ b/src/Contraptions/Platform/Spring.tscn @@ -50,5 +50,5 @@ animations = [ { position = Vector2( 0, 1.5 ) z_index = -1 frames = SubResource( 1 ) -frame = 19 +frame = 11 playing = true diff --git a/src/Contraptions/Triggers/ElevatorButton.gd b/src/Contraptions/Triggers/ElevatorButton.gd index b231e9f..4e957e3 100644 --- a/src/Contraptions/Triggers/ElevatorButton.gd +++ b/src/Contraptions/Triggers/ElevatorButton.gd @@ -4,7 +4,7 @@ onready var buttonPlayer = $"%ButtonPlayer" onready var activatorArea = $"%ActivatorArea" onready var indicatorPlayer = $"%IndicatorPlayer" onready var elevator = get_node("./Portal") -onready var signalManager = get_node("../GameplaySignalManager") +onready var signalManager = $"%SignalManager" func selfActivate(): diff --git a/src/Contraptions/Triggers/ElevatorButton.tscn b/src/Contraptions/Triggers/ElevatorButton.tscn index c26c253..7d63132 100644 --- a/src/Contraptions/Triggers/ElevatorButton.tscn +++ b/src/Contraptions/Triggers/ElevatorButton.tscn @@ -3,7 +3,6 @@ [ext_resource path="res://src/Contraptions/Triggers/ElevatorButton.gd" type="Script" id=1] [sub_resource type="StreamTexture" id=1] -load_path = "res://.import/button.png-6b06252879983e2da39a6ce37483d567.stex" [sub_resource type="Animation" id=2] resource_name = "pushing" @@ -22,7 +21,6 @@ tracks/0/keys = { } [sub_resource type="StreamTexture" id=17] -load_path = "res://.import/buttonStateIndicator.png-4ad4dfff1d6add183d62f1b602452b7a.stex" [sub_resource type="Animation" id=10] length = 0.1 diff --git a/src/Levels/01 Level.tscn b/src/Levels/01 Level.tscn index 56ce0bd..f2020f2 100644 --- a/src/Levels/01 Level.tscn +++ b/src/Levels/01 Level.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=12 format=2] +[gd_scene load_steps=14 format=2] [ext_resource path="res://src/Environment/AlienShipTileSet.tres" type="TileSet" id=1] [ext_resource path="res://src/Actors/Blobby/Blobby.tscn" type="PackedScene" id=2] @@ -7,7 +7,9 @@ [ext_resource path="res://src/Contraptions/Portal/Portal.tscn" type="PackedScene" id=5] [ext_resource path="res://src/NeutralObjects/Coin.tscn" type="PackedScene" id=6] [ext_resource path="res://src/UserInterface/UserInterface.tscn" type="PackedScene" id=7] -[ext_resource path="res://src/Utilities/GameplaySignalManager.gd" type="Script" id=10] +[ext_resource path="res://src/Utilities/SignalManager.tscn" type="PackedScene" id=8] +[ext_resource path="res://src/Utilities/LevelState.tscn" type="PackedScene" id=9] +[ext_resource path="res://src/Utilities/LevelState.gd" type="Script" id=10] [ext_resource path="res://src/Actors/BlobbyCam.tscn" type="PackedScene" id=12] [ext_resource path="res://src/Environment/ShaderGrass.tscn" type="PackedScene" id=13] @@ -19,6 +21,12 @@ __meta__ = { "_edit_vertical_guides_": [ 2880.0 ] } +[node name="SignalManager" parent="." instance=ExtResource( 8 )] + +[node name="LevelState" parent="." instance=ExtResource( 9 )] +unique_name_in_owner = true +script = ExtResource( 10 ) + [node name="UserInterface" parent="." instance=ExtResource( 7 )] [node name="Timer" parent="UserInterface/HUD/HUDOverlay/GetBackTimer" index="0"] @@ -28,10 +36,10 @@ wait_time = 20.0 drag_margin_bottom = 0.3 [node name="AnimatedSprite" parent="BlobbyCam/ParallaxBackground/ParallaxLayer5" index="4"] -frame = 4 +frame = 1 [node name="AnimatedSprite2" parent="BlobbyCam/ParallaxBackground/ParallaxLayer5" index="5"] -frame = 12 +frame = 5 [node name="Blobby" parent="." instance=ExtResource( 2 )] unique_name_in_owner = true @@ -131,17 +139,11 @@ rotation = 1.57079 position = Vector2( 684, 12 ) rotation = 1.57079 -[node name="GameplaySignalManager" type="Node2D" parent="."] -script = ExtResource( 10 ) - [node name="Portal" parent="." instance=ExtResource( 5 )] position = Vector2( 1488, -120 ) next_scene = ExtResource( 4 ) -[connection signal="timeout" from="UserInterface/HUD/HUDOverlay/GetBackTimer/Timer" to="GameplaySignalManager" method="_on_Timer_timeout"] [connection signal="body_exited" from="Blobby/BlobbySkin" to="Blobby" method="_on_BlobbySkin_body_exited"] -[connection signal="getback_timer_up" from="GameplaySignalManager" to="Blobby" method="_on_GameplaySignalManager_getback_timer_up"] -[connection signal="terminal_activated" from="GameplaySignalManager" to="UserInterface/HUD" method="_on_SignalManager_terminal_activated"] [editable path="UserInterface"] [editable path="UserInterface/HUD"] diff --git a/src/Levels/02 Level.tscn b/src/Levels/02 Level.tscn index a2d499c..788a4ef 100644 --- a/src/Levels/02 Level.tscn +++ b/src/Levels/02 Level.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=16 format=2] +[gd_scene load_steps=18 format=2] [ext_resource path="res://src/Environment/AlienShipTileSet.tres" type="TileSet" id=1] [ext_resource path="res://src/Actors/Blobby/Blobby.tscn" type="PackedScene" id=2] @@ -7,8 +7,10 @@ [ext_resource path="res://src/Contraptions/Platform/FlyingPlatform.gd" type="Script" id=5] [ext_resource path="res://src/Contraptions/Portal/Portal.tscn" type="PackedScene" id=6] [ext_resource path="res://src/UserInterface/UserInterface.tscn" type="PackedScene" id=7] +[ext_resource path="res://src/Utilities/LevelState.gd" type="Script" id=8] [ext_resource path="res://assets/contraption/FlyingPlatformClean.png" type="Texture" id=9] -[ext_resource path="res://src/Utilities/GameplaySignalManager.gd" type="Script" id=10] +[ext_resource path="res://src/Utilities/SignalManager.tscn" type="PackedScene" id=10] +[ext_resource path="res://src/Utilities/LevelState.tscn" type="PackedScene" id=11] [ext_resource path="res://src/Actors/BlobbyCam.tscn" type="PackedScene" id=12] [sub_resource type="AnimationNodeStateMachinePlayback" id=4] @@ -73,6 +75,12 @@ __meta__ = { "_edit_vertical_guides_": [ 2880.0 ] } +[node name="SignalManager" parent="." instance=ExtResource( 10 )] + +[node name="LevelState" parent="." instance=ExtResource( 11 )] +unique_name_in_owner = true +script = ExtResource( 8 ) + [node name="UserInterface" parent="." instance=ExtResource( 7 )] [node name="Timer" parent="UserInterface/HUD/HUDOverlay/GetBackTimer" index="0"] @@ -81,10 +89,10 @@ wait_time = 20.0 [node name="BlobbyCam" parent="." instance=ExtResource( 12 )] [node name="AnimatedSprite" parent="BlobbyCam/ParallaxBackground/ParallaxLayer5" index="4"] -frame = 1 +frame = 0 [node name="AnimatedSprite2" parent="BlobbyCam/ParallaxBackground/ParallaxLayer5" index="5"] -frame = 6 +frame = 5 [node name="Blobby" parent="." instance=ExtResource( 2 )] unique_name_in_owner = true @@ -193,13 +201,7 @@ position = Vector2( 492, -156 ) [node name="Spikes4" parent="TileMap" instance=ExtResource( 3 )] position = Vector2( 468, -156 ) -[node name="GameplaySignalManager" type="Node2D" parent="."] -script = ExtResource( 10 ) - -[connection signal="timeout" from="UserInterface/HUD/HUDOverlay/GetBackTimer/Timer" to="GameplaySignalManager" method="_on_Timer_timeout"] [connection signal="body_exited" from="Blobby/BlobbySkin" to="Blobby" method="_on_BlobbySkin_body_exited"] -[connection signal="getback_timer_up" from="GameplaySignalManager" to="Blobby" method="_on_GameplaySignalManager_getback_timer_up"] -[connection signal="terminal_activated" from="GameplaySignalManager" to="UserInterface/HUD" method="_on_SignalManager_terminal_activated"] [editable path="UserInterface"] [editable path="UserInterface/HUD"] diff --git a/src/Levels/03 Level.tscn b/src/Levels/03 Level.tscn index e9b7f4a..1228535 100644 --- a/src/Levels/03 Level.tscn +++ b/src/Levels/03 Level.tscn @@ -1,6 +1,6 @@ -[gd_scene load_steps=51 format=2] +[gd_scene load_steps=53 format=2] -[ext_resource path="res://src/Utilities/GameplaySignalManager.gd" type="Script" id=1] +[ext_resource path="res://src/Utilities/LevelState.gd" type="Script" id=1] [ext_resource path="res://src/Environment/AlienShipTileSet.tres" type="TileSet" id=2] [ext_resource path="res://src/Contraptions/Platform/DropThroughPlatform.tscn" type="PackedScene" id=3] [ext_resource path="res://src/Actors/Blobby/Blobby.tscn" type="PackedScene" id=4] @@ -44,6 +44,8 @@ [ext_resource path="res://src/Contraptions/Portal/Portal.tscn" type="PackedScene" id=42] [ext_resource path="res://src/Contraptions/Platform/FlyingPlatformClean.tscn" type="PackedScene" id=43] [ext_resource path="res://src/Actors/Enemies/Beings/BoundFrog.tscn" type="PackedScene" id=44] +[ext_resource path="res://src/Utilities/SignalManager.tscn" type="PackedScene" id=45] +[ext_resource path="res://src/Utilities/LevelState.tscn" type="PackedScene" id=46] [sub_resource type="AnimationNodeStateMachinePlayback" id=4] @@ -72,6 +74,12 @@ __meta__ = { "_edit_vertical_guides_": [ 2880.0 ] } +[node name="SignalManager" parent="." instance=ExtResource( 45 )] + +[node name="LevelState" parent="." instance=ExtResource( 46 )] +unique_name_in_owner = true +script = ExtResource( 1 ) + [node name="UserInterface" parent="." instance=ExtResource( 9 )] [node name="Timer" parent="UserInterface/HUD/HUDOverlay/GetBackTimer" index="0"] @@ -133,7 +141,7 @@ shape = SubResource( 3 ) position = Vector2( 0, 1.5 ) z_index = -1 frames = SubResource( 5 ) -frame = 4 +frame = 20 playing = true [node name="Portal" parent="." instance=ExtResource( 42 )] @@ -151,9 +159,6 @@ bake_navigation = true format = 1 tile_data = PoolIntArray( -1, 1610612751, 0, -65536, 1610612746, 0, -65535, 1610612746, 0, -65534, 1610612746, 0, -65533, 1610612746, 0, -65532, 1610612746, 0, -65531, 1610612746, 0, -65530, 1610612746, 0, -65529, 1610612746, 0, -65528, 1610612746, 0, -65527, 1610612746, 0, -65526, 1610612746, 0, -65525, 1610612746, 0, -65524, 1610612746, 0, -65523, 1610612746, 0, -65522, 1610612746, 0, -65521, 1610612746, 0, -65520, 1610612746, 0, -65519, 1610612746, 0, -65518, 1610612746, 0, -65517, 1610612746, 0, -65516, 1610612746, 0, -65515, 1610612746, 0, -65514, 1610612746, 0, -65513, 1610612746, 0, -65512, 1610612746, 0, -65511, 1610612746, 0, -65510, 1610612746, 0, -65509, 1610612746, 0, -65508, 1610612746, 0, -65507, 1610612746, 0, -65506, 1610612746, 0, -65505, 1610612746, 0, -65504, 1610612746, 0, -65503, 1610612746, 0, -65502, -1073741809, 0, 65535, -1610612726, 0, 0, 3, 0, 1, 1610612738, 0, 2, 1610612738, 0, 3, 1610612738, 0, 4, 3, 0, 5, 3, 0, 6, 1610612738, 0, 7, 1610612738, 0, 8, 1610612738, 0, 9, 1610612738, 0, 10, 1610612738, 0, 11, 1610612738, 0, 12, 1610612738, 0, 13, 1610612738, 0, 14, 1610612738, 0, 15, 1610612738, 0, 16, 1610612738, 0, 17, 1610612738, 0, 18, 1610612738, 0, 19, 1610612738, 0, 20, 1610612738, 0, 21, 1610612738, 0, 22, 1610612738, 0, 23, 1610612738, 0, 24, 1610612738, 0, 25, 1610612738, 0, 26, 1610612738, 0, 27, 1610612738, 0, 28, 1610612738, 0, 29, 1610612738, 0, 30, 1610612738, 0, 31, 1610612738, 0, 32, 1610612738, 0, 33, 3, 0, 34, -1073741814, 0, 131071, -1610612726, 0, 65536, -1610612734, 0, 65537, 9, 0, 65538, 9, 0, 65539, 9, 0, 65540, -1073741822, 0, 65541, -1610612734, 0, 65542, 9, 0, 65543, 9, 0, 65544, 9, 0, 65545, 9, 0, 65546, 9, 0, 65547, 9, 0, 65548, 9, 0, 65549, 9, 0, 65550, 9, 0, 65551, 9, 0, 65552, 9, 0, 65553, 9, 0, 65554, 9, 0, 65555, 9, 0, 65556, 9, 0, 65557, 9, 0, 65558, 9, 0, 65559, 9, 0, 65560, 9, 0, 65561, 9, 0, 65562, 9, 0, 65563, 9, 0, 65564, 9, 0, 65565, 9, 0, 65566, 9, 0, 65567, 9, 0, 65568, 9, 0, 65569, -1073741822, 0, 65570, -1073741814, 0, 196607, -1610612726, 0, 131072, -1610612734, 0, 131073, 9, 0, 131074, 9, 0, 131075, 9, 0, 131076, -1073741822, 0, 131077, -1610612734, 0, 131078, 9, 0, 131079, 9, 0, 131080, 9, 0, 131081, 9, 0, 131082, 9, 0, 131083, 9, 0, 131084, 9, 0, 131085, 9, 0, 131086, 9, 0, 131087, 9, 0, 131088, 9, 0, 131089, 9, 0, 131090, 9, 0, 131091, 9, 0, 131092, 9, 0, 131093, 9, 0, 131094, 9, 0, 131095, 9, 0, 131096, 9, 0, 131097, 9, 0, 131098, 9, 0, 131099, 9, 0, 131100, 9, 0, 131101, 9, 0, 131102, 9, 0, 131103, 9, 0, 131104, 9, 0, 131105, -1073741822, 0, 131106, -1073741814, 0, 262143, -1610612726, 0, 196608, -1610612734, 0, 196609, 9, 0, 196610, 9, 0, 196611, 9, 0, 196612, -1073741822, 0, 196613, -1610612734, 0, 196614, 9, 0, 196615, 9, 0, 196616, 9, 0, 196617, 9, 0, 196618, 9, 0, 196619, 9, 0, 196620, 9, 0, 196621, 9, 0, 196622, 9, 0, 196623, 9, 0, 196624, 9, 0, 196625, 9, 0, 196626, 9, 0, 196627, 9, 0, 196628, 9, 0, 196629, 9, 0, 196630, 9, 0, 196631, 9, 0, 196632, 9, 0, 196633, 9, 0, 196634, 9, 0, 196635, 9, 0, 196636, 9, 0, 196637, 9, 0, 196638, 9, 0, 196639, 9, 0, 196640, 9, 0, 196641, -1073741822, 0, 196642, -1073741814, 0, 327679, -1610612726, 0, 262144, -1610612734, 0, 262145, 9, 0, 262146, 9, 0, 262147, 9, 0, 262148, -1073741822, 0, 262149, -1610612734, 0, 262150, 9, 0, 262151, 9, 0, 262152, 9, 0, 262153, 9, 0, 262154, 9, 0, 262155, 9, 0, 262156, 9, 0, 262157, 9, 0, 262158, 9, 0, 262159, 9, 0, 262160, 9, 0, 262161, 9, 0, 262162, 9, 0, 262163, 9, 0, 262164, 9, 0, 262165, 9, 0, 262166, 9, 0, 262167, 9, 0, 262168, 9, 0, 262169, 9, 0, 262170, 9, 0, 262171, 9, 0, 262172, 9, 0, 262173, 9, 0, 262174, 9, 0, 262175, 9, 0, 262176, 9, 0, 262177, -1073741822, 0, 262178, -1073741814, 0, 393215, -1610612726, 0, 327680, -1610612734, 0, 327681, 9, 0, 327682, 9, 0, 327683, 9, 0, 327684, -1073741822, 0, 327685, -1610612734, 0, 327686, 9, 0, 327687, 9, 0, 327688, 9, 0, 327689, 9, 0, 327690, 9, 0, 327691, 9, 0, 327692, 9, 0, 327693, 9, 0, 327694, 9, 0, 327695, 9, 0, 327696, 9, 0, 327697, 9, 0, 327698, 9, 0, 327699, 9, 0, 327700, 9, 0, 327701, 9, 0, 327702, 9, 0, 327703, 9, 0, 327704, 9, 0, 327705, 9, 0, 327706, 9, 0, 327707, 9, 0, 327708, 9, 0, 327709, 9, 0, 327710, 9, 0, 327711, 9, 0, 327712, 9, 0, 327713, -1073741822, 0, 327714, -1073741814, 0, 458751, -1610612726, 0, 393216, -1610612734, 0, 393217, 9, 0, 393218, 9, 0, 393219, 9, 0, 393220, -1073741817, 0, 393221, 1610612743, 0, 393222, 9, 0, 393223, 9, 0, 393224, 9, 0, 393225, 9, 0, 393226, 9, 0, 393227, 9, 0, 393228, 9, 0, 393229, 9, 0, 393230, 9, 0, 393231, 9, 0, 393232, 9, 0, 393233, 9, 0, 393234, 9, 0, 393235, 9, 0, 393236, 9, 0, 393237, 9, 0, 393238, 9, 0, 393239, 9, 0, 393240, 9, 0, 393241, 9, 0, 393242, 9, 0, 393243, 7, 0, 393244, 2, 0, 393245, 2, 0, 393246, 2, 0, 393247, 2, 0, 393248, 2, 0, 393249, 3, 0, 393250, -1073741814, 0, 524287, -1610612726, 0, 458752, -1610612734, 0, 458753, 9, 0, 458754, 9, 0, 458755, 9, 0, 458756, 9, 0, 458757, 9, 0, 458758, 9, 0, 458759, 9, 0, 458760, 9, 0, 458761, 9, 0, 458762, 9, 0, 458763, 9, 0, 458764, 9, 0, 458765, 9, 0, 458766, 9, 0, 458767, 9, 0, 458768, 9, 0, 458769, 9, 0, 458770, 9, 0, 458771, 9, 0, 458772, 9, 0, 458773, 9, 0, 458774, 9, 0, 458775, 9, 0, 458776, 9, 0, 458777, 9, 0, 458778, 9, 0, 458779, -1073741822, 0, 458780, 3, 0, 458781, 3, 0, 458782, 3, 0, 458783, 3, 0, 458784, 3, 0, 458785, 3, 0, 458786, -1073741814, 0, 589823, -1610612726, 0, 524288, -1610612734, 0, 524289, 9, 0, 524290, 9, 0, 524291, 9, 0, 524292, 9, 0, 524293, 9, 0, 524294, 9, 0, 524295, 9, 0, 524296, 9, 0, 524297, 9, 0, 524298, 9, 0, 524299, 9, 0, 524300, 9, 0, 524301, 9, 0, 524302, 9, 0, 524303, 9, 0, 524304, 9, 0, 524305, 9, 0, 524306, 9, 0, 524307, 9, 0, 524308, 9, 0, 524309, 9, 0, 524310, 9, 0, 524311, 9, 0, 524312, 7, 0, 524313, 2, 0, 524314, 2, 0, 524315, 3, 0, 524316, 3, 0, 524317, 3, 0, 524318, 3, 0, 524319, 3, 0, 524320, 3, 0, 524321, 3, 0, 524322, -1073741814, 0, 655359, -1610612726, 0, 589824, -1610612734, 0, 589825, 9, 0, 589826, 9, 0, 589827, 9, 0, 589828, 7, 0, 589829, -1610612729, 0, 589830, 9, 0, 589831, 9, 0, 589832, 9, 0, 589833, 9, 0, 589834, 9, 0, 589835, 9, 0, 589836, 9, 0, 589837, 9, 0, 589838, 9, 0, 589839, 9, 0, 589840, 9, 0, 589841, 9, 0, 589842, 9, 0, 589843, 9, 0, 589844, 9, 0, 589845, 9, 0, 589846, 9, 0, 589847, 9, 0, 589848, -1073741817, 0, 589849, 1610612738, 0, 589850, 1610612738, 0, 589851, 3, 0, 589852, 3, 0, 589853, 3, 0, 589854, 3, 0, 589855, 3, 0, 589856, 3, 0, 589857, 3, 0, 589858, -1073741814, 0, 720895, -1610612726, 0, 655360, -1610612734, 0, 655361, 9, 0, 655362, 9, 0, 655363, 9, 0, 655364, -1073741822, 0, 655365, -1610612734, 0, 655366, 9, 0, 655367, 9, 0, 655368, 9, 0, 655369, 9, 0, 655370, 9, 0, 655371, 9, 0, 655372, 9, 0, 655373, 9, 0, 655374, 9, 0, 655375, 9, 0, 655376, 9, 0, 655377, 9, 0, 655378, 9, 0, 655379, 9, 0, 655380, 9, 0, 655381, 9, 0, 655382, 9, 0, 655383, 9, 0, 655384, 9, 0, 655385, 9, 0, 655386, 9, 0, 655387, -1073741817, 0, 655388, 1610612738, 0, 655389, 1610612738, 0, 655390, 1610612738, 0, 655391, 1610612738, 0, 655392, 1610612738, 0, 655393, 3, 0, 655394, -1073741814, 0, 786431, -1610612726, 0, 720896, -1610612734, 0, 720897, 9, 0, 720898, 9, 0, 720899, 9, 0, 720900, -1073741822, 0, 720901, -1610612734, 0, 720902, 9, 0, 720903, 9, 0, 720904, 9, 0, 720905, 9, 0, 720906, 9, 0, 720907, 9, 0, 720908, 9, 0, 720909, 7, 0, 720910, 2, 0, 720911, 2, 0, 720912, -1610612729, 0, 720913, 9, 0, 720914, 9, 0, 720915, 9, 0, 720916, 9, 0, 720917, 9, 0, 720918, 9, 0, 720919, 9, 0, 720920, 9, 0, 720921, 9, 0, 720922, 9, 0, 720923, 9, 0, 720924, 9, 0, 720925, 9, 0, 720926, 9, 0, 720927, 9, 0, 720928, 9, 0, 720929, -1073741822, 0, 720930, -1073741814, 0, 851967, -1610612726, 0, 786432, -1610612734, 0, 786433, 9, 0, 786434, 9, 0, 786435, 9, 0, 786436, -1073741822, 0, 786437, -1610612734, 0, 786438, 9, 0, 786439, 9, 0, 786440, 9, 0, 786441, 9, 0, 786442, 9, 0, 786443, 9, 0, 786444, 9, 0, 786445, -1073741817, 0, 786446, 1610612738, 0, 786447, 1610612738, 0, 786448, 1610612743, 0, 786449, 9, 0, 786450, 9, 0, 786451, 9, 0, 786452, 9, 0, 786453, 9, 0, 786454, 9, 0, 786455, 9, 0, 786456, 9, 0, 786457, 9, 0, 786458, 9, 0, 786459, 9, 0, 786460, 9, 0, 786461, 9, 0, 786462, 9, 0, 786463, 9, 0, 786464, 9, 0, 786465, -1073741822, 0, 786466, -1073741814, 0, 917503, -1610612726, 0, 851968, -1610612734, 0, 851969, 9, 0, 851970, 9, 0, 851971, 9, 0, 851972, -1073741822, 0, 851973, 3, 0, 851974, 2, 0, 851975, 2, 0, 851976, 2, 0, 851977, 2, 0, 851978, -1610612729, 0, 851979, 9, 0, 851986, 9, 0, 851987, 9, 0, 851988, 9, 0, 851989, 9, 0, 851990, 9, 0, 851991, 9, 0, 851992, 9, 0, 851993, 9, 0, 851994, 9, 0, 851995, 9, 0, 851996, 9, 0, 851997, 9, 0, 851998, 9, 0, 851999, 9, 0, 852000, 9, 0, 852001, -1073741822, 0, 852002, -1073741814, 0, 983039, -1610612726, 0, 917504, 3, 0, 917505, 2, 0, 917506, 2, 0, 917507, 2, 0, 917508, 3, 0, 917509, 3, 0, 917510, 3, 0, 917511, 3, 0, 917512, 3, 0, 917513, 3, 0, 917514, 3, 0, 917515, 2, 0, 917516, 2, 0, 917517, 2, 0, 917518, 2, 0, 917519, 2, 0, 917520, 2, 0, 917521, 2, 0, 917522, 2, 0, 917523, 2, 0, 917524, 2, 0, 917525, 2, 0, 917526, 2, 0, 917527, 2, 0, 917528, 2, 0, 917529, 2, 0, 917530, 2, 0, 917531, 2, 0, 917532, 2, 0, 917533, 2, 0, 917534, 2, 0, 917535, 2, 0, 917536, 2, 0, 917537, 1610612739, 0, 917538, -1073741814, 0, 1048575, -1610612721, 0, 983040, 10, 0, 983041, 10, 0, 983042, 10, 0, 983043, 10, 0, 983044, 10, 0, 983045, 10, 0, 983046, 10, 0, 983047, 10, 0, 983048, 10, 0, 983049, 10, 0, 983050, 10, 0, 983051, 10, 0, 983052, 10, 0, 983053, 10, 0, 983054, 10, 0, 983055, 10, 0, 983056, 10, 0, 983057, 10, 0, 983058, 10, 0, 983059, 10, 0, 983060, 10, 0, 983061, 10, 0, 983062, 10, 0, 983063, 10, 0, 983064, 10, 0, 983065, 10, 0, 983066, 10, 0, 983067, 10, 0, 983068, 10, 0, 983069, 10, 0, 983070, 10, 0, 983071, 10, 0, 983072, 10, 0, 983073, 10, 0, 983074, 15, 0 ) -[node name="GameplaySignalManager" type="Node2D" parent="."] -script = ExtResource( 1 ) - [node name="DropThroughPlatform" parent="." instance=ExtResource( 3 )] tile_data = PoolIntArray( 851970, 1, 0, 851971, 0, 0, 851973, 0, 0, 851975, 2, 0 ) @@ -164,9 +169,6 @@ max_speed = 120 [node name="StateLabel" parent="Flyer" index="1"] visible = false -[node name="FlyerSprite" parent="Flyer" index="2"] -scale = Vector2( -1, 1 ) - [node name="AnimationTree" parent="Flyer/FlyerSprite" index="1"] parameters/playback = SubResource( 6 ) @@ -178,12 +180,9 @@ movement_radius = 4 position = Vector2( 496, 220 ) [connection signal="ready" from="." to="BoundFrog" method="_on_LevelTemplate_ready"] -[connection signal="timeout" from="UserInterface/HUD/HUDOverlay/GetBackTimer/Timer" to="GameplaySignalManager" method="_on_Timer_timeout"] [connection signal="body_exited" from="Blobby/BlobbySkin" to="Blobby" method="_on_BlobbySkin_body_exited"] [connection signal="area_exited" from="Spring/SpringPlatform/SpringSkin" to="Spring/SpringPlatform" method="_on_SpringSkin_area_exited"] [connection signal="area_entered" from="Spring/SpringPlatform/EnteringVelocityDetector" to="Spring/SpringPlatform" method="_on_EnteringVelocityDetector_area_entered"] -[connection signal="getback_timer_up" from="GameplaySignalManager" to="Blobby" method="_on_GameplaySignalManager_getback_timer_up"] -[connection signal="terminal_activated" from="GameplaySignalManager" to="UserInterface/HUD" method="_on_SignalManager_terminal_activated"] [editable path="UserInterface"] [editable path="UserInterface/HUD"] diff --git a/src/Levels/Enemy Test Level.tscn b/src/Levels/Enemy Test Level.tscn index dca1699..8fc33f0 100644 --- a/src/Levels/Enemy Test Level.tscn +++ b/src/Levels/Enemy Test Level.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=12 format=2] +[gd_scene load_steps=15 format=2] [ext_resource path="res://src/Actors/Blobby/Blobby.tscn" type="PackedScene" id=1] [ext_resource path="res://assets/environment/blocks/legacy/24BlockBasic.png" type="Texture" id=2] @@ -9,6 +9,9 @@ [ext_resource path="res://src/Actors/Enemies/Beings/SmortEnemy.tscn" type="PackedScene" id=7] [ext_resource path="res://src/Actors/Enemies/Beings/DartingEnemy.tscn" type="PackedScene" id=8] [ext_resource path="res://src/Actors/BlobbyCam.tscn" type="PackedScene" id=9] +[ext_resource path="res://src/Utilities/LevelState.gd" type="Script" id=10] +[ext_resource path="res://src/Utilities/SignalManager.tscn" type="PackedScene" id=11] +[ext_resource path="res://src/Utilities/LevelState.tscn" type="PackedScene" id=12] [sub_resource type="ConvexPolygonShape2D" id=3] points = PoolVector2Array( 0, 0, 24, 0, 24, 24, 0, 24 ) @@ -42,6 +45,12 @@ __meta__ = { "_edit_vertical_guides_": [ 2880.0 ] } +[node name="SignalManager" parent="." instance=ExtResource( 11 )] + +[node name="LevelState" parent="." instance=ExtResource( 12 )] +unique_name_in_owner = true +script = ExtResource( 10 ) + [node name="UserInterface" parent="." instance=ExtResource( 3 )] [node name="BlobbyCam" parent="." instance=ExtResource( 9 )] diff --git a/src/Levels/Flyer Test Level.tscn b/src/Levels/Flyer Test Level.tscn index 2c0a19e..b6ae140 100644 --- a/src/Levels/Flyer Test Level.tscn +++ b/src/Levels/Flyer Test Level.tscn @@ -1,16 +1,20 @@ -[gd_scene load_steps=12 format=2] +[gd_scene load_steps=15 format=2] [ext_resource path="res://src/Environment/AlienShipTileSet.tres" type="TileSet" id=1] -[ext_resource path="res://src/Utilities/GameplaySignalManager.gd" type="Script" id=2] +[ext_resource path="res://src/Utilities/LevelState.gd" type="Script" id=2] [ext_resource path="res://src/Contraptions/Triggers/ElevatorButton.tscn" type="PackedScene" id=3] [ext_resource path="res://src/Actors/BlobbyCam.tscn" type="PackedScene" id=4] +[ext_resource path="res://src/Utilities/SignalManager.tscn" type="PackedScene" id=5] [ext_resource path="res://src/Contraptions/Portal/Portal.tscn" type="PackedScene" id=6] [ext_resource path="res://src/Levels/Enemy Test Level.tscn" type="PackedScene" id=7] [ext_resource path="res://src/Actors/Enemies/Beings/Flyer.tscn" type="PackedScene" id=8] +[ext_resource path="res://src/Utilities/LevelState.tscn" type="PackedScene" id=9] [ext_resource path="res://src/Contraptions/Triggers/ThreeWhyButtons.tscn" type="PackedScene" id=10] [ext_resource path="res://src/Actors/Blobby/Blobby.tscn" type="PackedScene" id=12] [ext_resource path="res://src/UserInterface/UserInterface.tscn" type="PackedScene" id=13] +[sub_resource type="AnimationNodeStateMachinePlayback" id=5] + [sub_resource type="AnimationNodeStateMachinePlayback" id=4] [node name="LevelTemplate" type="Node2D"] @@ -19,6 +23,12 @@ __meta__ = { "_edit_vertical_guides_": [ 2880.0 ] } +[node name="SignalManager" parent="." instance=ExtResource( 5 )] + +[node name="LevelState" parent="." instance=ExtResource( 9 )] +unique_name_in_owner = true +script = ExtResource( 2 ) + [node name="TileMap" type="TileMap" parent="."] unique_name_in_owner = true tile_set = ExtResource( 1 ) @@ -42,6 +52,9 @@ rect_pivot_offset = Vector2( 389, 267 ) position = Vector2( 72, 301 ) patrolling_slowdown = 0.4 +[node name="AnimationTree" parent="Flyer/FlyerSprite" index="1"] +parameters/playback = SubResource( 5 ) + [node name="NavigationAgent2D" parent="Flyer" index="6"] path_max_distance = 10.0 @@ -87,13 +100,6 @@ position = Vector2( -1464, 84 ) monitoring = false next_scene = ExtResource( 7 ) -[node name="GameplaySignalManager" type="Node2D" parent="."] -script = ExtResource( 2 ) - -[connection signal="timeout" from="UserInterface/HUD/HUDOverlay/GetBackTimer/Timer" to="GameplaySignalManager" method="_on_Timer_timeout"] -[connection signal="getback_timer_up" from="GameplaySignalManager" to="Blobby" method="_on_GameplaySignalManager_getback_timer_up"] -[connection signal="terminal_activated" from="GameplaySignalManager" to="UserInterface/HUD" method="_on_SignalManager_terminal_activated"] - [editable path="UserInterface"] [editable path="UserInterface/HUD"] [editable path="Flyer"] diff --git a/src/Levels/Froggy Test Level.tscn b/src/Levels/Froggy Test Level.tscn index a1d8884..ac0fc80 100644 --- a/src/Levels/Froggy Test Level.tscn +++ b/src/Levels/Froggy Test Level.tscn @@ -1,7 +1,7 @@ -[gd_scene load_steps=18 format=2] +[gd_scene load_steps=20 format=2] [ext_resource path="res://src/Environment/AlienShipTileSet.tres" type="TileSet" id=1] -[ext_resource path="res://src/Utilities/GameplaySignalManager.gd" type="Script" id=2] +[ext_resource path="res://src/Utilities/LevelState.gd" type="Script" id=2] [ext_resource path="res://src/Contraptions/Triggers/ElevatorButton.tscn" type="PackedScene" id=3] [ext_resource path="res://src/Actors/BlobbyCam.tscn" type="PackedScene" id=4] [ext_resource path="res://src/NeutralObjects/Coin.tscn" type="PackedScene" id=5] @@ -15,6 +15,8 @@ [ext_resource path="res://src/UserInterface/UserInterface.tscn" type="PackedScene" id=13] [ext_resource path="res://src/Actors/Enemies/Beings/Flyer.tscn" type="PackedScene" id=14] [ext_resource path="res://src/Contraptions/Platform/SpringPlatform.tscn" type="PackedScene" id=15] +[ext_resource path="res://src/Utilities/SignalManager.tscn" type="PackedScene" id=16] +[ext_resource path="res://src/Utilities/LevelState.tscn" type="PackedScene" id=17] [sub_resource type="AnimationNodeStateMachinePlayback" id=4] @@ -26,6 +28,12 @@ __meta__ = { "_edit_vertical_guides_": [ 2880.0 ] } +[node name="SignalManager" parent="." instance=ExtResource( 16 )] + +[node name="LevelState" parent="." instance=ExtResource( 17 )] +unique_name_in_owner = true +script = ExtResource( 2 ) + [node name="UserInterface" parent="." instance=ExtResource( 13 )] [node name="Timer" parent="UserInterface/HUD/HUDOverlay/GetBackTimer" index="0"] @@ -43,7 +51,7 @@ collision_layer = 8 collision_mask = 8 bake_navigation = true format = 1 -tile_data = PoolIntArray( 65528, 2, 0, 65529, 2, 0, 65530, 2, 0, 65531, -1610612734, 0, 65532, 9, 0, 65533, 9, 0, 65534, 9, 0, 65535, 9, 0, 0, 9, 0, 1, 9, 0, 2, 9, 0, 3, 9, 0, 4, 9, 0, 5, 9, 0, 6, 9, 0, 7, 9, 0, 8, 9, 0, 9, 9, 0, 10, 9, 0, 11, 9, 0, 12, 9, 0, 13, 9, 0, 14, 9, 0, 15, 9, 0, 16, 9, 0, 17, 9, 0, 18, 9, 0, 19, 9, 0, 20, 9, 0, 21, 9, 0, 22, 9, 0, 23, 9, 0, 24, 9, 0, 25, 9, 0, 26, 9, 0, 27, 9, 0, 28, 9, 0, 29, 9, 0, 30, 9, 0, 31, 9, 0, 32, 9, 0, 33, 9, 0, 34, 9, 0, 35, 9, 0, 36, 9, 0, 37, 9, 0, 38, 9, 0, 39, 9, 0, 40, 9, 0, 41, 9, 0, 42, 9, 0, 43, 9, 0, 44, 9, 0, 45, 9, 0, 46, 9, 0, 47, 9, 0, 48, 9, 0, 49, 9, 0, 50, 9, 0, 51, -1073741822, 0, 131064, 2, 0, 131065, 2, 0, 131066, 2, 0, 131067, -1610612734, 0, 131068, 9, 0, 131069, 9, 0, 131070, 9, 0, 131071, 9, 0, 65536, 9, 0, 65537, 9, 0, 65538, 9, 0, 65539, 9, 0, 65540, 9, 0, 65541, 9, 0, 65542, 9, 0, 65543, 9, 0, 65544, 9, 0, 65545, 9, 0, 65546, 9, 0, 65547, 9, 0, 65548, 9, 0, 65549, 9, 0, 65550, 9, 0, 65551, 9, 0, 65552, 9, 0, 65553, 9, 0, 65554, 9, 0, 65555, 9, 0, 65556, 9, 0, 65557, 9, 0, 65558, 9, 0, 65559, 9, 0, 65560, 9, 0, 65561, 9, 0, 65562, 9, 0, 65563, 9, 0, 65564, 9, 0, 65565, 9, 0, 65566, 9, 0, 65567, 9, 0, 65568, 9, 0, 65569, 9, 0, 65570, 9, 0, 65571, 9, 0, 65572, 9, 0, 65573, 9, 0, 65574, 9, 0, 65575, 9, 0, 65576, 9, 0, 65577, 9, 0, 65578, 9, 0, 65579, 9, 0, 65580, 9, 0, 65581, 9, 0, 65582, 9, 0, 65583, 9, 0, 65584, 9, 0, 65585, 9, 0, 65586, 9, 0, 65587, -1073741822, 0, 196600, 2, 0, 196601, 2, 0, 196602, 2, 0, 196603, -1610612734, 0, 196604, 9, 0, 196605, 9, 0, 196606, 9, 0, 196607, 9, 0, 131072, 9, 0, 131073, 9, 0, 131074, 9, 0, 131075, 9, 0, 131076, 9, 0, 131077, 9, 0, 131078, 9, 0, 131079, 9, 0, 131080, 9, 0, 131081, 9, 0, 131082, 9, 0, 131083, 9, 0, 131084, 9, 0, 131085, 9, 0, 131086, 9, 0, 131087, 9, 0, 131088, 9, 0, 131089, 9, 0, 131090, 9, 0, 131091, 9, 0, 131092, 9, 0, 131093, 9, 0, 131094, 9, 0, 131095, 9, 0, 131096, 9, 0, 131097, 9, 0, 131098, 9, 0, 131099, 9, 0, 131100, 9, 0, 131101, 9, 0, 131102, 9, 0, 131103, 9, 0, 131104, 9, 0, 131105, 9, 0, 131106, 9, 0, 131107, 9, 0, 131108, 9, 0, 131109, 9, 0, 131110, 9, 0, 131111, 9, 0, 131112, 9, 0, 131113, 9, 0, 131114, 9, 0, 131115, 9, 0, 131116, 9, 0, 131117, 9, 0, 131118, 9, 0, 131119, 9, 0, 131120, 9, 0, 131121, 9, 0, 131122, 9, 0, 131123, -1073741822, 0, 262136, 2, 0, 262137, 2, 0, 262138, 2, 0, 262139, -1610612734, 0, 262140, 9, 0, 262141, 9, 0, 262142, 9, 0, 262143, 9, 0, 196608, 9, 0, 196609, 9, 0, 196610, 9, 0, 196611, 9, 0, 196612, 9, 0, 196613, 9, 0, 196614, 9, 0, 196615, 9, 0, 196616, 9, 0, 196617, 9, 0, 196618, 9, 0, 196619, 9, 0, 196620, 9, 0, 196621, 9, 0, 196622, 9, 0, 196623, 9, 0, 196624, 9, 0, 196625, 9, 0, 196626, 9, 0, 196627, 9, 0, 196628, 9, 0, 196629, 9, 0, 196630, 9, 0, 196631, 9, 0, 196632, 9, 0, 196633, 9, 0, 196634, 9, 0, 196635, 9, 0, 196636, 9, 0, 196637, 9, 0, 196638, 9, 0, 196639, 9, 0, 196640, 9, 0, 196641, 9, 0, 196642, 9, 0, 196643, 9, 0, 196644, 9, 0, 196645, 9, 0, 196646, 9, 0, 196647, 9, 0, 196648, 9, 0, 196649, 9, 0, 196650, 9, 0, 196651, 9, 0, 196652, 9, 0, 196653, 9, 0, 196654, 9, 0, 196655, 9, 0, 196656, 9, 0, 196657, 9, 0, 196658, 9, 0, 196659, -1073741822, 0, 327672, 2, 0, 327673, 2, 0, 327674, 2, 0, 327675, -1610612734, 0, 327676, 9, 0, 327677, 9, 0, 327678, 9, 0, 327679, 9, 0, 262144, 9, 0, 262145, 9, 0, 262146, 9, 0, 262147, 9, 0, 262148, 9, 0, 262149, 9, 0, 262150, 9, 0, 262151, 9, 0, 262152, 9, 0, 262153, 9, 0, 262154, 9, 0, 262155, 9, 0, 262156, 9, 0, 262157, 9, 0, 262158, 9, 0, 262159, 9, 0, 262160, 9, 0, 262161, 9, 0, 262162, 9, 0, 262163, 9, 0, 262164, 9, 0, 262165, 9, 0, 262166, 9, 0, 262167, 9, 0, 262168, 9, 0, 262169, 9, 0, 262170, 9, 0, 262171, 9, 0, 262172, 9, 0, 262173, 9, 0, 262174, 9, 0, 262175, 9, 0, 262176, 9, 0, 262177, 9, 0, 262178, 9, 0, 262179, 9, 0, 262180, 9, 0, 262181, 9, 0, 262182, 9, 0, 262183, 9, 0, 262184, 9, 0, 262185, 9, 0, 262186, 9, 0, 262187, 9, 0, 262188, 9, 0, 262189, 9, 0, 262190, 9, 0, 262191, 9, 0, 262192, 9, 0, 262193, 9, 0, 262194, 9, 0, 262195, -1073741822, 0, 393208, 2, 0, 393209, 2, 0, 393210, 2, 0, 393211, -1610612734, 0, 393212, 9, 0, 393213, 9, 0, 393214, 9, 0, 393215, 9, 0, 327680, 9, 0, 327681, 9, 0, 327682, 9, 0, 327683, 9, 0, 327684, 9, 0, 327685, 9, 0, 327686, 9, 0, 327687, 9, 0, 327688, 9, 0, 327689, 9, 0, 327690, 9, 0, 327691, 9, 0, 327692, 9, 0, 327693, 9, 0, 327694, 9, 0, 327695, 9, 0, 327696, 9, 0, 327697, 9, 0, 327698, 9, 0, 327699, 9, 0, 327700, 9, 0, 327701, 9, 0, 327702, 9, 0, 327703, 9, 0, 327704, 9, 0, 327705, 9, 0, 327706, 9, 0, 327707, 9, 0, 327708, 9, 0, 327709, 9, 0, 327710, 9, 0, 327711, 9, 0, 327712, 9, 0, 327713, 9, 0, 327714, 9, 0, 327715, 9, 0, 327716, 9, 0, 327717, 9, 0, 327718, 9, 0, 327719, 9, 0, 327720, 9, 0, 327721, 9, 0, 327722, 9, 0, 327723, 9, 0, 327724, 9, 0, 327725, 9, 0, 327726, 9, 0, 327727, 9, 0, 327728, 9, 0, 327729, 9, 0, 327730, 9, 0, 327731, -1073741822, 0, 458744, 2, 0, 458745, 2, 0, 458746, 2, 0, 458747, -1610612734, 0, 458748, 9, 0, 458749, 9, 0, 458750, 9, 0, 458751, 9, 0, 393216, 9, 0, 393217, 9, 0, 393218, 9, 0, 393219, 9, 0, 393220, 9, 0, 393221, 9, 0, 393222, 9, 0, 393223, 9, 0, 393224, 9, 0, 393225, 9, 0, 393226, 9, 0, 393227, 9, 0, 393228, 9, 0, 393229, 9, 0, 393230, 9, 0, 393231, 9, 0, 393232, 9, 0, 393233, 9, 0, 393234, 9, 0, 393235, 9, 0, 393236, 9, 0, 393237, 9, 0, 393238, 9, 0, 393239, 9, 0, 393240, 9, 0, 393241, 9, 0, 393242, 9, 0, 393243, 9, 0, 393244, 9, 0, 393245, 9, 0, 393246, 9, 0, 393247, 9, 0, 393248, 9, 0, 393249, 9, 0, 393250, 9, 0, 393251, 9, 0, 393252, 9, 0, 393253, 9, 0, 393254, 9, 0, 393255, 9, 0, 393256, 9, 0, 393257, 9, 0, 393258, 9, 0, 393259, 9, 0, 393260, 9, 0, 393261, 9, 0, 393262, 9, 0, 393263, 9, 0, 393264, 9, 0, 393265, 9, 0, 393266, 9, 0, 393267, -1073741822, 0, 524280, 2, 0, 524281, 2, 0, 524282, 2, 0, 524283, -1610612734, 0, 524284, 9, 0, 524285, 9, 0, 524286, 9, 0, 524287, 9, 0, 458752, 9, 0, 458753, 9, 0, 458754, 9, 0, 458755, 9, 0, 458756, 9, 0, 458757, 9, 0, 458758, 9, 0, 458759, 9, 0, 458760, 9, 0, 458761, 9, 0, 458762, 9, 0, 458763, 9, 0, 458764, 9, 0, 458765, 9, 0, 458766, 9, 0, 458767, 9, 0, 458768, 9, 0, 458769, 9, 0, 458770, 9, 0, 458771, 9, 0, 458772, 9, 0, 458773, 9, 0, 458774, 9, 0, 458775, 9, 0, 458776, 9, 0, 458777, 9, 0, 458778, 9, 0, 458779, 9, 0, 458780, 9, 0, 458781, 9, 0, 458782, 9, 0, 458783, 9, 0, 458784, 9, 0, 458785, 9, 0, 458786, 9, 0, 458787, 9, 0, 458788, 9, 0, 458789, 9, 0, 458790, 9, 0, 458791, 9, 0, 458792, 9, 0, 458793, 9, 0, 458794, 9, 0, 458795, 9, 0, 458796, 9, 0, 458797, 9, 0, 458798, 9, 0, 458799, 9, 0, 458800, 9, 0, 458801, 9, 0, 458802, 9, 0, 458803, -1073741822, 0, 589816, 2, 0, 589817, 2, 0, 589818, 2, 0, 589819, -1610612734, 0, 589820, 9, 0, 589821, 9, 0, 589822, 9, 0, 589823, 9, 0, 524288, 9, 0, 524289, 9, 0, 524290, 9, 0, 524291, 9, 0, 524292, 9, 0, 524293, 9, 0, 524294, 9, 0, 524295, 9, 0, 524296, 9, 0, 524297, 9, 0, 524298, 9, 0, 524299, 9, 0, 524300, 9, 0, 524301, 9, 0, 524302, 9, 0, 524303, 9, 0, 524304, 9, 0, 524305, 9, 0, 524306, 9, 0, 524307, 9, 0, 524308, 9, 0, 524309, 9, 0, 524310, 9, 0, 524311, 9, 0, 524312, 9, 0, 524313, 9, 0, 524314, 9, 0, 524315, 9, 0, 524316, 9, 0, 524317, 9, 0, 524318, 9, 0, 524319, 9, 0, 524320, 9, 0, 524321, 9, 0, 524322, 9, 0, 524323, 9, 0, 524324, 9, 0, 524325, 9, 0, 524326, 9, 0, 524327, 9, 0, 524328, 9, 0, 524329, 9, 0, 524330, 9, 0, 524331, 9, 0, 524332, 9, 0, 524333, 9, 0, 524334, 9, 0, 524335, 9, 0, 524336, 9, 0, 524337, 9, 0, 524338, 9, 0, 524339, -1073741822, 0, 655352, 2, 0, 655353, 2, 0, 655354, 2, 0, 655355, -1610612734, 0, 655356, 9, 0, 655357, 9, 0, 655358, 9, 0, 655359, 9, 0, 589824, 9, 0, 589825, 9, 0, 589826, 9, 0, 589827, 9, 0, 589828, 9, 0, 589829, 9, 0, 589830, 9, 0, 589831, 9, 0, 589832, 9, 0, 589833, 9, 0, 589834, 9, 0, 589835, 9, 0, 589836, 9, 0, 589837, 9, 0, 589838, 9, 0, 589839, 9, 0, 589840, 9, 0, 589841, 9, 0, 589842, 9, 0, 589843, 9, 0, 589844, 9, 0, 589845, 9, 0, 589846, 9, 0, 589847, 9, 0, 589848, 9, 0, 589849, 9, 0, 589850, 9, 0, 589851, 9, 0, 589852, 9, 0, 589853, 9, 0, 589854, 9, 0, 589855, 9, 0, 589856, 9, 0, 589857, 9, 0, 589858, 9, 0, 589859, 9, 0, 589860, 9, 0, 589861, 9, 0, 589862, 9, 0, 589863, 9, 0, 589864, 9, 0, 589865, 9, 0, 589866, 9, 0, 589867, 9, 0, 589868, 9, 0, 589869, 9, 0, 589870, 9, 0, 589871, 9, 0, 589872, 9, 0, 589873, 9, 0, 589874, 9, 0, 589875, -1073741822, 0, 720888, 2, 0, 720889, 2, 0, 720890, 2, 0, 720891, -1610612734, 0, 720892, 9, 0, 720893, 9, 0, 720894, 9, 0, 720895, 9, 0, 655360, 9, 0, 655361, 9, 0, 655362, 9, 0, 655363, 9, 0, 655364, 9, 0, 655365, 9, 0, 655366, 9, 0, 655367, 9, 0, 655373, 9, 0, 655374, 9, 0, 655375, 9, 0, 655376, 9, 0, 655377, 9, 0, 655378, 9, 0, 655379, 9, 0, 655380, 9, 0, 655381, 9, 0, 655382, 9, 0, 655383, 9, 0, 655384, 9, 0, 655385, 9, 0, 655386, 9, 0, 655387, 9, 0, 655388, 9, 0, 655389, 9, 0, 655390, 9, 0, 655391, 9, 0, 655392, 9, 0, 655393, 9, 0, 655394, 9, 0, 655395, 9, 0, 655396, 9, 0, 655397, 9, 0, 655398, 9, 0, 655399, 9, 0, 655400, 9, 0, 655401, 9, 0, 655402, 9, 0, 655403, 9, 0, 655404, 9, 0, 655405, 9, 0, 655406, 9, 0, 655407, 9, 0, 655408, 9, 0, 655409, 9, 0, 655410, 9, 0, 655411, -1073741822, 0, 786424, 2, 0, 786425, 9, 0, 786426, 9, 0, 786427, 2, 0, 786428, 2, 0, 786429, 2, 0, 786430, 2, 0, 786431, 2, 0, 720896, 2, 0, 720897, 2, 0, 720898, 2, 0, 720899, 2, 0, 720900, 1610612738, 0, 720901, 2, 0, 720902, 2, 0, 720903, 2, 0, 720904, 2, 0, 720905, 2, 0, 720906, 2, 0, 720907, 2, 0, 720908, 2, 0, 720909, 2, 0, 720910, 2, 0, 720911, 2, 0, 720912, 2, 0, 720913, 2, 0, 720914, -1610612734, 0, 720915, 9, 0, 720916, 9, 0, 720917, 9, 0, 720918, 9, 0, 720919, 9, 0, 720920, 9, 0, 720921, 9, 0, 720922, 9, 0, 720923, 9, 0, 720924, 9, 0, 720925, 9, 0, 720926, 9, 0, 720932, 9, 0, 720933, 9, 0, 720934, 9, 0, 720935, 9, 0, 720936, 9, 0, 720937, 9, 0, 720938, 9, 0, 720939, 9, 0, 720940, 9, 0, 720941, 9, 0, 720942, 9, 0, 720943, 9, 0, 720944, 9, 0, 720945, 9, 0, 720946, 9, 0, 720947, -1073741822, 0, 851960, 2, 0, 851961, 9, 0, 851962, 9, 0, 851963, 9, 0, 851964, 9, 0, 851965, 9, 0, 851966, 9, 0, 851967, 9, 0, 786432, 9, 0, 786433, 9, 0, 786434, 9, 0, 786435, 9, 0, 786436, 9, 0, 786437, 9, 0, 786438, 9, 0, 786439, 9, 0, 786440, 9, 0, 786441, 9, 0, 786442, 9, 0, 786443, 9, 0, 786444, 9, 0, 786445, 9, 0, 786446, 9, 0, 786447, 9, 0, 786448, 9, 0, 786449, 9, 0, 786450, -1610612729, 0, 786451, -1610612729, 0, 786452, 9, 0, 786453, 9, 0, 786454, 9, 0, 786455, 9, 0, 786456, 9, 0, 786457, 9, 0, 786458, 9, 0, 786459, 9, 0, 786460, 9, 0, 786470, 9, 0, 786471, 9, 0, 786472, 9, 0, 786473, 9, 0, 786474, 9, 0, 786475, 9, 0, 786476, 9, 0, 786477, 9, 0, 786478, 9, 0, 786479, 9, 0, 786480, 9, 0, 786481, 9, 0, 786482, 9, 0, 786483, -1073741822, 0, 917496, 2, 0, 917497, 9, 0, 917498, 9, 0, 917499, 9, 0, 917500, 9, 0, 917501, 9, 0, 917502, 9, 0, 917503, 9, 0, 851968, 9, 0, 851969, 9, 0, 851970, 9, 0, 851971, 9, 0, 851972, 9, 0, 851973, 9, 0, 851974, 9, 0, 851975, 9, 0, 851976, 9, 0, 851977, 9, 0, 851978, 9, 0, 851979, 9, 0, 851980, 9, 0, 851981, 9, 0, 851982, 9, 0, 851983, 9, 0, 851984, 9, 0, 851985, 9, 0, 851986, -1610612729, 0, 851987, -1610612729, 0, 851988, 2, 0, 851989, 2, 0, 851990, 9, 0, 851991, 9, 0, 851992, 9, 0, 851993, 9, 0, 851994, 9, 0, 851995, 9, 0, 852005, 9, 0, 852006, 9, 0, 852007, 9, 0, 852008, 9, 0, 852009, 9, 0, 852010, 9, 0, 852011, 9, 0, 852012, 9, 0, 852013, 9, 0, 852014, 9, 0, 852015, 9, 0, 852016, 9, 0, 852017, 9, 0, 852018, 9, 0, 852019, -1073741822, 0, 983032, 2, 0, 983034, 2, 0, 983035, 2, 0, 983036, 2, 0, 983037, 9, 0, 983038, 9, 0, 983039, 9, 0, 917504, 9, 0, 917505, 9, 0, 917506, 9, 0, 917507, 9, 0, 917508, 9, 0, 917509, 9, 0, 917510, 2, 0, 917511, 1610612738, 0, 917512, 2, 0, 917513, 2, 0, 917514, 2, 0, 917515, 2, 0, 917516, 2, 0, 917518, 2, 0, 917519, 2, 0, 917520, 2, 0, 917521, 2, 0, 917522, 2, 0, 917523, 2, 0, 917524, 2, 0, 917525, -1610612729, 0, 917526, 2, 0, 917527, 2, 0, 917529, 2, 0, 917530, -1610612729, 0, 917531, 2, 0, 917533, 2, 0, 917534, 2, 0, 917535, 2, 0, 917536, 2, 0, 917537, 2, 0, 917538, 2, 0, 917539, 2, 0, 917540, 2, 0, 917541, 2, 0, 917542, 2, 0, 917543, 2, 0, 917544, 2, 0, 917545, 2, 0, 917546, 2, 0, 917547, 2, 0, 917548, 2, 0, 917549, 2, 0, 917550, 2, 0, 917551, 2, 0, 917552, 2, 0, 917553, 2, 0, 917554, 2, 0, 917555, 2, 0, 1048568, 2, 0, 1048569, 2, 0, 1048570, 2, 0, 1048571, 2, 0, 1048572, 2, 0, 1048573, 2, 0, 1048574, 2, 0, 1048575, 9, 0, 983040, 9, 0, 983041, 9, 0, 983042, 9, 0, 983043, 9, 0, 983044, 9, 0, 983045, 9, 0, 983046, 2, 0, 983047, 1610612738, 0, 983048, 2, 0, 983049, 2, 0, 983050, 2, 0, 983051, 2, 0, 983052, 2, 0, 983053, 2, 0, 983054, 2, 0, 983055, 2, 0, 983056, 2, 0, 983057, 2, 0, 983058, 2, 0, 983059, 2, 0, 983060, 2, 0, 983061, 2, 0, 983062, 2, 0, 983063, 2, 0, 983064, 2, 0, 983065, 2, 0, 983066, 2, 0, 983067, 2, 0, 983068, 2, 0, 983069, 2, 0, 983070, 2, 0, 983071, 2, 0, 983072, 2, 0, 983073, 2, 0, 983074, 2, 0, 983075, 2, 0, 983076, 2, 0, 983077, 2, 0, 983078, 2, 0, 983079, 2, 0, 983080, 2, 0, 983081, 2, 0, 983082, 2, 0, 983083, 2, 0, 983084, 2, 0, 983085, 2, 0, 983086, 2, 0, 983087, 2, 0, 983088, 2, 0, 983089, 2, 0, 983090, 2, 0, 983091, 2, 0, 1114104, 2, 0, 1114105, 2, 0, 1114106, 2, 0, 1114107, 2, 0, 1114108, 2, 0, 1114109, 2, 0, 1114110, 2, 0, 1114111, 2, 0, 1048576, 2, 0, 1048578, 2, 0, 1048579, 2, 0, 1048582, 2, 0, 1048583, 2, 0, 1048584, 2, 0, 1048585, 2, 0, 1048586, 2, 0, 1048587, 2, 0, 1048588, 2, 0, 1048589, 2, 0, 1048590, 2, 0, 1048591, 2, 0, 1048592, 2, 0, 1048593, 2, 0, 1048594, 2, 0, 1048595, 2, 0, 1048596, 2, 0, 1048597, 2, 0, 1048598, 2, 0, 1048599, 2, 0, 1048600, 2, 0, 1048601, 2, 0, 1048602, 2, 0, 1048603, 2, 0, 1048604, 2, 0, 1048605, 2, 0, 1048606, 2, 0, 1048607, 2, 0, 1048608, 2, 0, 1048609, 2, 0, 1048610, 2, 0, 1048611, 2, 0, 1048612, 2, 0, 1048613, 2, 0, 1048614, 2, 0, 1048615, 2, 0, 1048616, 2, 0, 1048617, 2, 0, 1048618, 2, 0, 1048619, 2, 0, 1048620, 2, 0, 1048621, 2, 0, 1048622, 2, 0, 1048623, 2, 0, 1048624, 2, 0, 1048625, 2, 0, 1048626, 2, 0, 1048627, 2, 0, 1179640, 2, 0, 1179641, 2, 0, 1179642, 2, 0, 1179643, 2, 0, 1179644, 2, 0, 1179645, 2, 0, 1179646, 2, 0, 1179647, 2, 0, 1114112, 2, 0, 1114113, 2, 0, 1114114, 2, 0, 1114115, 2, 0, 1114116, 2, 0, 1114117, 2, 0, 1114118, 2, 0, 1114119, 2, 0, 1114120, 2, 0, 1114121, 2, 0, 1114122, 2, 0, 1114123, 2, 0, 1114124, 2, 0, 1114125, 2, 0, 1114126, 2, 0, 1114127, 2, 0, 1114128, 2, 0, 1114129, 2, 0, 1114130, 2, 0, 1114131, 2, 0, 1114132, 2, 0, 1114133, 2, 0, 1114134, 2, 0, 1114135, 2, 0, 1114136, 2, 0, 1114137, 2, 0, 1114138, 2, 0, 1114139, 2, 0, 1114140, 2, 0, 1114141, 2, 0, 1114142, 2, 0, 1114143, 2, 0, 1114144, 2, 0, 1114145, 2, 0, 1114146, 2, 0, 1114147, 2, 0, 1114148, 2, 0, 1114149, 2, 0, 1114150, 2, 0, 1114151, 2, 0, 1114152, 2, 0, 1114153, 2, 0, 1114154, 2, 0, 1114155, 2, 0, 1114156, 2, 0, 1114157, 2, 0, 1114158, 2, 0, 1114159, 2, 0, 1114160, 2, 0, 1114161, 2, 0, 1114162, 2, 0, 1114163, 2, 0 ) +tile_data = PoolIntArray( 65528, 2, 0, 65529, 2, 0, 65530, 2, 0, 65531, -1610612734, 0, 65532, 9, 0, 65533, 9, 0, 65534, 9, 0, 65535, 9, 0, 0, 9, 0, 1, 9, 0, 2, 9, 0, 3, 9, 0, 4, 9, 0, 5, 9, 0, 6, 9, 0, 7, 9, 0, 8, 9, 0, 9, 9, 0, 10, 9, 0, 11, 9, 0, 12, 9, 0, 13, 9, 0, 14, 9, 0, 15, 9, 0, 16, 9, 0, 17, 9, 0, 18, 9, 0, 19, 9, 0, 20, 9, 0, 21, 9, 0, 22, 9, 0, 23, 9, 0, 24, 9, 0, 25, 9, 0, 26, 9, 0, 27, 9, 0, 28, 9, 0, 29, 9, 0, 30, 9, 0, 31, 9, 0, 32, 9, 0, 33, 9, 0, 34, 9, 0, 35, 9, 0, 36, 9, 0, 37, 9, 0, 38, 9, 0, 39, 9, 0, 40, 9, 0, 41, 9, 0, 42, 9, 0, 43, 9, 0, 44, 9, 0, 45, 9, 0, 46, 9, 0, 47, 9, 0, 48, 9, 0, 49, 9, 0, 50, 9, 0, 51, -1073741822, 0, 131064, 2, 0, 131065, 2, 0, 131066, 2, 0, 131067, -1610612734, 0, 131068, 9, 0, 131069, 9, 0, 131070, 9, 0, 131071, 9, 0, 65536, 9, 0, 65537, 9, 0, 65538, 9, 0, 65539, 9, 0, 65540, 9, 0, 65541, 9, 0, 65542, 9, 0, 65543, 9, 0, 65544, 9, 0, 65545, 9, 0, 65546, 9, 0, 65547, 9, 0, 65548, 9, 0, 65549, 9, 0, 65550, 9, 0, 65551, 9, 0, 65552, 9, 0, 65553, 9, 0, 65554, 9, 0, 65555, 9, 0, 65556, 9, 0, 65557, 9, 0, 65558, 9, 0, 65559, 9, 0, 65560, 9, 0, 65561, 9, 0, 65562, 9, 0, 65563, 9, 0, 65564, 9, 0, 65565, 9, 0, 65566, 9, 0, 65567, 9, 0, 65568, 9, 0, 65569, 9, 0, 65570, 9, 0, 65571, 9, 0, 65572, 9, 0, 65573, 9, 0, 65574, 9, 0, 65575, 9, 0, 65576, 9, 0, 65577, 9, 0, 65578, 9, 0, 65579, 9, 0, 65580, 9, 0, 65581, 9, 0, 65582, 9, 0, 65583, 9, 0, 65584, 9, 0, 65585, 9, 0, 65586, 9, 0, 65587, -1073741822, 0, 196600, 2, 0, 196601, 2, 0, 196602, 2, 0, 196603, -1610612734, 0, 196604, 9, 0, 196605, 9, 0, 196606, 9, 0, 196607, 9, 0, 131072, 9, 0, 131073, 9, 0, 131074, 9, 0, 131075, 9, 0, 131076, 9, 0, 131077, 9, 0, 131078, 9, 0, 131079, 9, 0, 131080, 9, 0, 131081, 9, 0, 131082, 9, 0, 131083, 9, 0, 131084, 9, 0, 131085, 9, 0, 131086, 9, 0, 131087, 9, 0, 131088, 9, 0, 131089, 9, 0, 131090, 9, 0, 131091, 9, 0, 131092, 9, 0, 131093, 9, 0, 131094, 9, 0, 131095, 9, 0, 131096, 9, 0, 131097, 9, 0, 131098, 9, 0, 131099, 9, 0, 131100, 9, 0, 131101, 9, 0, 131102, 9, 0, 131103, 9, 0, 131104, 9, 0, 131105, 9, 0, 131106, 9, 0, 131107, 9, 0, 131108, 9, 0, 131109, 9, 0, 131110, 9, 0, 131111, 9, 0, 131112, 9, 0, 131113, 9, 0, 131114, 9, 0, 131115, 9, 0, 131116, 9, 0, 131117, 9, 0, 131118, 9, 0, 131119, 9, 0, 131120, 9, 0, 131121, 9, 0, 131122, 9, 0, 131123, -1073741822, 0, 262136, 2, 0, 262137, 2, 0, 262138, 2, 0, 262139, -1610612734, 0, 262140, 9, 0, 262141, 9, 0, 262142, 9, 0, 262143, 9, 0, 196608, 9, 0, 196609, 9, 0, 196610, 9, 0, 196611, 9, 0, 196612, 9, 0, 196613, 9, 0, 196614, 9, 0, 196615, 9, 0, 196616, 9, 0, 196617, 9, 0, 196618, 9, 0, 196619, 9, 0, 196620, 9, 0, 196621, 9, 0, 196622, 9, 0, 196623, 9, 0, 196624, 9, 0, 196625, 9, 0, 196626, 9, 0, 196627, 9, 0, 196628, 9, 0, 196629, 9, 0, 196630, 9, 0, 196631, 9, 0, 196632, 9, 0, 196633, 9, 0, 196634, 9, 0, 196635, 9, 0, 196636, 9, 0, 196637, 9, 0, 196638, 9, 0, 196639, 9, 0, 196640, 9, 0, 196641, 9, 0, 196642, 9, 0, 196643, 9, 0, 196644, 9, 0, 196645, 9, 0, 196646, 9, 0, 196647, 9, 0, 196648, 9, 0, 196649, 9, 0, 196650, 9, 0, 196651, 9, 0, 196652, 9, 0, 196653, 9, 0, 196654, 9, 0, 196655, 9, 0, 196656, 9, 0, 196657, 9, 0, 196658, 9, 0, 196659, -1073741822, 0, 327672, 2, 0, 327673, 2, 0, 327674, 2, 0, 327675, -1610612734, 0, 327676, 9, 0, 327677, 9, 0, 327678, 9, 0, 327679, 9, 0, 262144, 9, 0, 262145, 9, 0, 262146, 9, 0, 262147, 9, 0, 262148, 9, 0, 262149, 9, 0, 262150, 9, 0, 262151, 9, 0, 262152, 9, 0, 262153, 9, 0, 262154, 9, 0, 262155, 9, 0, 262156, 9, 0, 262157, 9, 0, 262158, 9, 0, 262159, 9, 0, 262160, 9, 0, 262161, 9, 0, 262162, 9, 0, 262163, 9, 0, 262164, 9, 0, 262165, 9, 0, 262166, 9, 0, 262167, 9, 0, 262168, 9, 0, 262169, 9, 0, 262170, 9, 0, 262171, 9, 0, 262172, 9, 0, 262173, 9, 0, 262174, 9, 0, 262175, 9, 0, 262176, 9, 0, 262177, 9, 0, 262178, 9, 0, 262179, 9, 0, 262180, 9, 0, 262181, 9, 0, 262182, 9, 0, 262183, 9, 0, 262184, 9, 0, 262185, 9, 0, 262186, 9, 0, 262187, 9, 0, 262188, 9, 0, 262189, 9, 0, 262190, 9, 0, 262191, 9, 0, 262192, 9, 0, 262193, 9, 0, 262194, 9, 0, 262195, -1073741822, 0, 393208, 2, 0, 393209, 2, 0, 393210, 2, 0, 393211, -1610612734, 0, 393212, 9, 0, 393213, 9, 0, 393214, 9, 0, 393215, 9, 0, 327680, 9, 0, 327681, 9, 0, 327682, 9, 0, 327683, 9, 0, 327684, 9, 0, 327685, 9, 0, 327686, 9, 0, 327687, 9, 0, 327688, 9, 0, 327689, 9, 0, 327690, 9, 0, 327691, 9, 0, 327692, 9, 0, 327693, 9, 0, 327694, 9, 0, 327695, 9, 0, 327696, 9, 0, 327697, 9, 0, 327698, 9, 0, 327699, 9, 0, 327700, 9, 0, 327701, 9, 0, 327702, 9, 0, 327703, 9, 0, 327704, 9, 0, 327705, 9, 0, 327706, 9, 0, 327707, 9, 0, 327708, 9, 0, 327709, 9, 0, 327710, 9, 0, 327711, 9, 0, 327712, 9, 0, 327713, 9, 0, 327714, 9, 0, 327715, 9, 0, 327716, 9, 0, 327717, 9, 0, 327718, 9, 0, 327719, 9, 0, 327720, 9, 0, 327721, 9, 0, 327722, 9, 0, 327723, 9, 0, 327724, 9, 0, 327725, 9, 0, 327726, 9, 0, 327727, 9, 0, 327728, 9, 0, 327729, 9, 0, 327730, 9, 0, 327731, -1073741822, 0, 458744, 2, 0, 458745, 2, 0, 458746, 2, 0, 458747, -1610612734, 0, 458748, 9, 0, 458749, 9, 0, 458750, 9, 0, 458751, 9, 0, 393216, 9, 0, 393217, 9, 0, 393218, 9, 0, 393219, 9, 0, 393220, 9, 0, 393221, 9, 0, 393222, 9, 0, 393223, 9, 0, 393224, 9, 0, 393225, 9, 0, 393226, 9, 0, 393227, 9, 0, 393228, 9, 0, 393229, 9, 0, 393230, 9, 0, 393231, 9, 0, 393232, 9, 0, 393233, 9, 0, 393234, 9, 0, 393235, 9, 0, 393236, 9, 0, 393237, 9, 0, 393238, 9, 0, 393239, 9, 0, 393240, 9, 0, 393241, 9, 0, 393242, 9, 0, 393243, 9, 0, 393244, 9, 0, 393245, 9, 0, 393246, 9, 0, 393247, 9, 0, 393248, 9, 0, 393249, 9, 0, 393250, 9, 0, 393251, 9, 0, 393252, 9, 0, 393253, 9, 0, 393254, 9, 0, 393255, 9, 0, 393256, 9, 0, 393257, 9, 0, 393258, 9, 0, 393259, 9, 0, 393260, 9, 0, 393261, 9, 0, 393262, 9, 0, 393263, 9, 0, 393264, 9, 0, 393265, 9, 0, 393266, 9, 0, 393267, -1073741822, 0, 524280, 2, 0, 524281, 2, 0, 524282, 2, 0, 524283, -1610612734, 0, 524284, 9, 0, 524285, 9, 0, 524286, 9, 0, 524287, 9, 0, 458752, 9, 0, 458753, 9, 0, 458754, 9, 0, 458755, 9, 0, 458756, 9, 0, 458757, 9, 0, 458758, 9, 0, 458759, 9, 0, 458760, 9, 0, 458761, 9, 0, 458762, 9, 0, 458763, 9, 0, 458764, 9, 0, 458765, 9, 0, 458766, 9, 0, 458767, 9, 0, 458768, 9, 0, 458769, 9, 0, 458770, 9, 0, 458771, 9, 0, 458772, 9, 0, 458773, 9, 0, 458774, 9, 0, 458775, 9, 0, 458776, 9, 0, 458777, 9, 0, 458778, 9, 0, 458779, 9, 0, 458780, 9, 0, 458781, 9, 0, 458782, 9, 0, 458783, 9, 0, 458784, 9, 0, 458785, 9, 0, 458786, 9, 0, 458787, 9, 0, 458788, 9, 0, 458789, 9, 0, 458790, 9, 0, 458791, 9, 0, 458792, 9, 0, 458793, 9, 0, 458794, 9, 0, 458795, 9, 0, 458796, 9, 0, 458797, 9, 0, 458798, 9, 0, 458799, 9, 0, 458800, 9, 0, 458801, 9, 0, 458802, 9, 0, 458803, -1073741822, 0, 589816, 2, 0, 589817, 2, 0, 589818, 2, 0, 589819, -1610612734, 0, 589820, 9, 0, 589821, 9, 0, 589822, 9, 0, 589823, 9, 0, 524288, 9, 0, 524289, 9, 0, 524290, 9, 0, 524291, 9, 0, 524292, 9, 0, 524293, 9, 0, 524294, 9, 0, 524295, 9, 0, 524296, 9, 0, 524297, 9, 0, 524298, 9, 0, 524299, 9, 0, 524300, 9, 0, 524301, 9, 0, 524302, 9, 0, 524303, 9, 0, 524304, 9, 0, 524305, 9, 0, 524306, 9, 0, 524307, 9, 0, 524308, 9, 0, 524309, 9, 0, 524310, 9, 0, 524311, 9, 0, 524312, 9, 0, 524313, 9, 0, 524314, 9, 0, 524315, 9, 0, 524316, 9, 0, 524317, 9, 0, 524318, 9, 0, 524319, 9, 0, 524320, 9, 0, 524321, 9, 0, 524322, 9, 0, 524323, 9, 0, 524324, 9, 0, 524325, 9, 0, 524326, 9, 0, 524327, 9, 0, 524328, 9, 0, 524329, 9, 0, 524330, 9, 0, 524331, 9, 0, 524332, 9, 0, 524333, 9, 0, 524334, 9, 0, 524335, 9, 0, 524336, 9, 0, 524337, 9, 0, 524338, 9, 0, 524339, -1073741822, 0, 655352, 2, 0, 655353, 2, 0, 655354, 2, 0, 655355, -1610612734, 0, 655356, 9, 0, 655357, 9, 0, 655358, 9, 0, 655359, 9, 0, 589824, 9, 0, 589825, 9, 0, 589826, 9, 0, 589827, 9, 0, 589828, 9, 0, 589829, 9, 0, 589830, 9, 0, 589831, 9, 0, 589832, 9, 0, 589833, 9, 0, 589834, 9, 0, 589835, 9, 0, 589836, 9, 0, 589837, 9, 0, 589838, 9, 0, 589839, 9, 0, 589840, 9, 0, 589841, 9, 0, 589842, 9, 0, 589843, 9, 0, 589844, 9, 0, 589845, 9, 0, 589846, 9, 0, 589847, 9, 0, 589848, 9, 0, 589849, 9, 0, 589850, 9, 0, 589851, 9, 0, 589852, 9, 0, 589853, 9, 0, 589854, 9, 0, 589855, 9, 0, 589856, 9, 0, 589857, 9, 0, 589858, 9, 0, 589859, 9, 0, 589860, 9, 0, 589861, 9, 0, 589862, 9, 0, 589863, 9, 0, 589864, 9, 0, 589865, 9, 0, 589866, 9, 0, 589867, 9, 0, 589868, 9, 0, 589869, 9, 0, 589870, 9, 0, 589871, 9, 0, 589872, 9, 0, 589873, 9, 0, 589874, 9, 0, 589875, -1073741822, 0, 720888, 2, 0, 720889, 2, 0, 720890, 2, 0, 720891, -1610612734, 0, 720892, 9, 0, 720893, 9, 0, 720894, 9, 0, 720895, 9, 0, 655360, 9, 0, 655361, 9, 0, 655362, 9, 0, 655363, 9, 0, 655364, 9, 0, 655365, 9, 0, 655366, 9, 0, 655367, 9, 0, 655371, 6, 0, 655373, 2, 0, 655374, 536870918, 0, 655375, 9, 0, 655376, 9, 0, 655377, 9, 0, 655378, 9, 0, 655379, 9, 0, 655380, 9, 0, 655381, 9, 0, 655382, 9, 0, 655383, 9, 0, 655384, 9, 0, 655385, 9, 0, 655386, 9, 0, 655387, 9, 0, 655388, 9, 0, 655389, 9, 0, 655390, 9, 0, 655391, 9, 0, 655392, 9, 0, 655393, 9, 0, 655394, 9, 0, 655395, 9, 0, 655396, 9, 0, 655397, 9, 0, 655398, 9, 0, 655399, 9, 0, 655400, 9, 0, 655401, 9, 0, 655402, 9, 0, 655403, 9, 0, 655404, 9, 0, 655405, 9, 0, 655406, 9, 0, 655407, 9, 0, 655408, 9, 0, 655409, 9, 0, 655410, 9, 0, 655411, -1073741822, 0, 786424, 2, 0, 786425, 9, 0, 786426, 9, 0, 786427, 2, 0, 786428, 2, 0, 786429, 2, 0, 786430, 2, 0, 786431, 2, 0, 720896, 2, 0, 720897, 2, 0, 720898, 2, 0, 720899, 2, 0, 720900, 1610612738, 0, 720901, 2, 0, 720902, 2, 0, 720903, 2, 0, 720904, 2, 0, 720905, 2, 0, 720906, 2, 0, 720907, 2, 0, 720908, 2, 0, 720909, 2, 0, 720910, 2, 0, 720911, 2, 0, 720912, 2, 0, 720913, 2, 0, 720914, -1610612734, 0, 720915, 9, 0, 720916, 9, 0, 720917, 9, 0, 720918, 9, 0, 720919, 9, 0, 720920, 9, 0, 720921, 9, 0, 720922, 9, 0, 720923, 9, 0, 720924, 9, 0, 720925, 9, 0, 720926, 9, 0, 720932, 9, 0, 720933, 9, 0, 720934, 9, 0, 720935, 9, 0, 720936, 9, 0, 720937, 9, 0, 720938, 9, 0, 720939, 9, 0, 720940, 9, 0, 720941, 9, 0, 720942, 9, 0, 720943, 9, 0, 720944, 9, 0, 720945, 9, 0, 720946, 9, 0, 720947, -1073741822, 0, 851960, 2, 0, 851961, 9, 0, 851962, 9, 0, 851963, 9, 0, 851964, 9, 0, 851965, 9, 0, 851966, 9, 0, 851967, 9, 0, 786432, 9, 0, 786433, 9, 0, 786434, 9, 0, 786435, 9, 0, 786436, 9, 0, 786437, 9, 0, 786438, 9, 0, 786439, 9, 0, 786440, 9, 0, 786441, 9, 0, 786442, 9, 0, 786443, 9, 0, 786444, 9, 0, 786445, 9, 0, 786446, 9, 0, 786447, 9, 0, 786448, 9, 0, 786449, 9, 0, 786450, -1610612729, 0, 786451, -1610612729, 0, 786452, 9, 0, 786453, 9, 0, 786454, 9, 0, 786455, 9, 0, 786456, 9, 0, 786457, 9, 0, 786458, 9, 0, 786459, 9, 0, 786460, 9, 0, 786470, 9, 0, 786471, 9, 0, 786472, 9, 0, 786473, 9, 0, 786474, 9, 0, 786475, 9, 0, 786476, 9, 0, 786477, 9, 0, 786478, 9, 0, 786479, 9, 0, 786480, 9, 0, 786481, 9, 0, 786482, 9, 0, 786483, -1073741822, 0, 917496, 2, 0, 917497, 9, 0, 917498, 9, 0, 917499, 9, 0, 917500, 9, 0, 917501, 9, 0, 917502, 9, 0, 917503, 9, 0, 851968, 9, 0, 851969, 9, 0, 851970, 9, 0, 851971, 9, 0, 851972, 9, 0, 851973, 9, 0, 851974, 9, 0, 851975, 9, 0, 851976, 9, 0, 851977, 9, 0, 851978, 9, 0, 851979, 9, 0, 851980, 9, 0, 851981, 9, 0, 851982, 9, 0, 851983, 9, 0, 851984, 9, 0, 851985, 9, 0, 851986, -1610612729, 0, 851987, -1610612729, 0, 851988, 2, 0, 851989, 2, 0, 851990, 9, 0, 851991, 9, 0, 851992, 9, 0, 851993, 9, 0, 851994, 9, 0, 851995, 9, 0, 852005, 9, 0, 852006, 9, 0, 852007, 9, 0, 852008, 9, 0, 852009, 9, 0, 852010, 9, 0, 852011, 9, 0, 852012, 9, 0, 852013, 9, 0, 852014, 9, 0, 852015, 9, 0, 852016, 9, 0, 852017, 9, 0, 852018, 9, 0, 852019, -1073741822, 0, 983032, 2, 0, 983034, 2, 0, 983035, 2, 0, 983036, 2, 0, 983037, 9, 0, 983038, 9, 0, 983039, 9, 0, 917504, 9, 0, 917505, 9, 0, 917506, 9, 0, 917507, 9, 0, 917508, 9, 0, 917509, 9, 0, 917510, 2, 0, 917511, 1610612738, 0, 917512, 2, 0, 917513, 2, 0, 917514, 2, 0, 917515, 2, 0, 917516, 2, 0, 917518, 2, 0, 917519, 2, 0, 917520, 2, 0, 917521, 2, 0, 917522, 2, 0, 917523, 2, 0, 917524, 2, 0, 917525, -1610612729, 0, 917526, 2, 0, 917527, 2, 0, 917529, 2, 0, 917530, -1610612729, 0, 917531, 2, 0, 917533, 2, 0, 917534, 2, 0, 917535, 2, 0, 917536, 2, 0, 917537, 2, 0, 917538, 2, 0, 917539, 2, 0, 917540, 2, 0, 917541, 2, 0, 917542, 2, 0, 917543, 2, 0, 917544, 2, 0, 917545, 2, 0, 917546, 2, 0, 917547, 2, 0, 917548, 2, 0, 917549, 2, 0, 917550, 2, 0, 917551, 2, 0, 917552, 2, 0, 917553, 2, 0, 917554, 2, 0, 917555, 2, 0, 1048568, 2, 0, 1048569, 2, 0, 1048570, 2, 0, 1048571, 2, 0, 1048572, 2, 0, 1048573, 2, 0, 1048574, 2, 0, 1048575, 9, 0, 983040, 9, 0, 983041, 9, 0, 983042, 9, 0, 983043, 9, 0, 983044, 9, 0, 983045, 9, 0, 983046, 2, 0, 983047, 1610612738, 0, 983048, 2, 0, 983049, 2, 0, 983050, 2, 0, 983051, 2, 0, 983052, 2, 0, 983053, 2, 0, 983054, 2, 0, 983055, 2, 0, 983056, 2, 0, 983057, 2, 0, 983058, 2, 0, 983059, 2, 0, 983060, 2, 0, 983061, 2, 0, 983062, 2, 0, 983063, 2, 0, 983064, 2, 0, 983065, 2, 0, 983066, 2, 0, 983067, 2, 0, 983068, 2, 0, 983069, 2, 0, 983070, 2, 0, 983071, 2, 0, 983072, 2, 0, 983073, 2, 0, 983074, 2, 0, 983075, 2, 0, 983076, 2, 0, 983077, 2, 0, 983078, 2, 0, 983079, 2, 0, 983080, 2, 0, 983081, 2, 0, 983082, 2, 0, 983083, 2, 0, 983084, 2, 0, 983085, 2, 0, 983086, 2, 0, 983087, 2, 0, 983088, 2, 0, 983089, 2, 0, 983090, 2, 0, 983091, 2, 0, 1114104, 2, 0, 1114105, 2, 0, 1114106, 2, 0, 1114107, 2, 0, 1114108, 2, 0, 1114109, 2, 0, 1114110, 2, 0, 1114111, 2, 0, 1048576, 2, 0, 1048578, 2, 0, 1048579, 2, 0, 1048582, 2, 0, 1048583, 2, 0, 1048584, 2, 0, 1048585, 2, 0, 1048586, 2, 0, 1048587, 2, 0, 1048588, 2, 0, 1048589, 2, 0, 1048590, 2, 0, 1048591, 2, 0, 1048592, 2, 0, 1048593, 2, 0, 1048594, 2, 0, 1048595, 2, 0, 1048596, 2, 0, 1048597, 2, 0, 1048598, 2, 0, 1048599, 2, 0, 1048600, 2, 0, 1048601, 2, 0, 1048602, 2, 0, 1048603, 2, 0, 1048604, 2, 0, 1048605, 2, 0, 1048606, 2, 0, 1048607, 2, 0, 1048608, 2, 0, 1048609, 2, 0, 1048610, 2, 0, 1048611, 2, 0, 1048612, 2, 0, 1048613, 2, 0, 1048614, 2, 0, 1048615, 2, 0, 1048616, 2, 0, 1048617, 2, 0, 1048618, 2, 0, 1048619, 2, 0, 1048620, 2, 0, 1048621, 2, 0, 1048622, 2, 0, 1048623, 2, 0, 1048624, 2, 0, 1048625, 2, 0, 1048626, 2, 0, 1048627, 2, 0, 1179640, 2, 0, 1179641, 2, 0, 1179642, 2, 0, 1179643, 2, 0, 1179644, 2, 0, 1179645, 2, 0, 1179646, 2, 0, 1179647, 2, 0, 1114112, 2, 0, 1114113, 2, 0, 1114114, 2, 0, 1114115, 2, 0, 1114116, 2, 0, 1114117, 2, 0, 1114118, 2, 0, 1114119, 2, 0, 1114120, 2, 0, 1114121, 2, 0, 1114122, 2, 0, 1114123, 2, 0, 1114124, 2, 0, 1114125, 2, 0, 1114126, 2, 0, 1114127, 2, 0, 1114128, 2, 0, 1114129, 2, 0, 1114130, 2, 0, 1114131, 2, 0, 1114132, 2, 0, 1114133, 2, 0, 1114134, 2, 0, 1114135, 2, 0, 1114136, 2, 0, 1114137, 2, 0, 1114138, 2, 0, 1114139, 2, 0, 1114140, 2, 0, 1114141, 2, 0, 1114142, 2, 0, 1114143, 2, 0, 1114144, 2, 0, 1114145, 2, 0, 1114146, 2, 0, 1114147, 2, 0, 1114148, 2, 0, 1114149, 2, 0, 1114150, 2, 0, 1114151, 2, 0, 1114152, 2, 0, 1114153, 2, 0, 1114154, 2, 0, 1114155, 2, 0, 1114156, 2, 0, 1114157, 2, 0, 1114158, 2, 0, 1114159, 2, 0, 1114160, 2, 0, 1114161, 2, 0, 1114162, 2, 0, 1114163, 2, 0 ) [node name="Spikes" parent="." instance=ExtResource( 11 )] position = Vector2( 36, 396 ) @@ -82,32 +90,26 @@ visible = false [node name="Coin" parent="Collectibles" instance=ExtResource( 5 )] position = Vector2( 336, -60 ) scale = Vector2( 0.133, 0.133 ) -scoreValue = null [node name="Coin2" parent="Collectibles" instance=ExtResource( 5 )] position = Vector2( 324, -11 ) scale = Vector2( 0.133, 0.133 ) -scoreValue = null [node name="Coin3" parent="Collectibles" instance=ExtResource( 5 )] position = Vector2( 1188, -84 ) scale = Vector2( 0.133, 0.133 ) -scoreValue = null [node name="Coin4" parent="Collectibles" instance=ExtResource( 5 )] position = Vector2( 1236, -108 ) scale = Vector2( 0.133, 0.133 ) -scoreValue = null [node name="Coin5" parent="Collectibles" instance=ExtResource( 5 )] position = Vector2( 1140, -108 ) scale = Vector2( 0.133, 0.133 ) -scoreValue = null [node name="Coin6" parent="Collectibles" instance=ExtResource( 5 )] position = Vector2( 696, -48 ) scale = Vector2( 0.133, 0.133 ) -scoreValue = null [node name="TreeWhyButtons" parent="." instance=ExtResource( 10 )] visible = false @@ -135,17 +137,11 @@ position = Vector2( -1464, 84 ) monitoring = false next_scene = ExtResource( 7 ) -[node name="GameplaySignalManager" type="Node2D" parent="."] -script = ExtResource( 2 ) - [node name="Flyer" parent="." instance=ExtResource( 14 )] position = Vector2( 169, 192 ) aggressive = false patrolling_slowdown = 0.3 -[node name="FlyerSprite" parent="Flyer" index="2"] -scale = Vector2( -1, 1 ) - [node name="AnimationTree" parent="Flyer/FlyerSprite" index="1"] parameters/playback = SubResource( 5 ) @@ -164,12 +160,9 @@ position = Vector2( 828, 324 ) rotation = -4.71238 [node name="BoundFrog" parent="." instance=ExtResource( 9 )] -position = Vector2( 338, 254 ) +position = Vector2( 324, 224 ) [connection signal="ready" from="." to="BoundFrog" method="_on_LevelTemplate_ready"] -[connection signal="timeout" from="UserInterface/HUD/HUDOverlay/GetBackTimer/Timer" to="GameplaySignalManager" method="_on_Timer_timeout"] -[connection signal="getback_timer_up" from="GameplaySignalManager" to="Blobby" method="_on_GameplaySignalManager_getback_timer_up"] -[connection signal="terminal_activated" from="GameplaySignalManager" to="UserInterface/HUD" method="_on_SignalManager_terminal_activated"] [editable path="UserInterface"] [editable path="UserInterface/HUD"] diff --git a/src/Levels/Grass Test Level.tscn b/src/Levels/Grass Test Level.tscn index 1fc1bc5..4bea81d 100644 --- a/src/Levels/Grass Test Level.tscn +++ b/src/Levels/Grass Test Level.tscn @@ -1,7 +1,9 @@ -[gd_scene load_steps=8 format=2] +[gd_scene load_steps=10 format=2] [ext_resource path="res://src/Environment/AlienShipTileSet.tres" type="TileSet" id=1] -[ext_resource path="res://src/Utilities/GameplaySignalManager.gd" type="Script" id=2] +[ext_resource path="res://src/Utilities/LevelState.gd" type="Script" id=2] +[ext_resource path="res://src/Utilities/SignalManager.tscn" type="PackedScene" id=3] +[ext_resource path="res://src/Utilities/LevelState.tscn" type="PackedScene" id=4] [ext_resource path="res://src/Environment/ShaderGrass.tscn" type="PackedScene" id=5] [ext_resource path="res://src/UserInterface/UserInterface.tscn" type="PackedScene" id=6] [ext_resource path="res://src/Actors/Blobby/Blobby.tscn" type="PackedScene" id=10] @@ -16,6 +18,12 @@ __meta__ = { "_edit_vertical_guides_": [ 2880.0 ] } +[node name="SignalManager" parent="." instance=ExtResource( 3 )] + +[node name="LevelState" parent="." instance=ExtResource( 4 )] +unique_name_in_owner = true +script = ExtResource( 2 ) + [node name="UserInterface" parent="." instance=ExtResource( 6 )] [node name="Timer" parent="UserInterface/HUD/HUDOverlay/GetBackTimer" index="0"] @@ -213,10 +221,10 @@ position = Vector2( 210, -15 ) [node name="BlobbyCam" parent="." instance=ExtResource( 11 )] [node name="AnimatedSprite" parent="BlobbyCam/ParallaxBackground/ParallaxLayer5" index="4"] -frame = 0 +frame = 9 [node name="AnimatedSprite2" parent="BlobbyCam/ParallaxBackground/ParallaxLayer5" index="5"] -frame = 5 +frame = 0 [node name="Blobby" parent="." instance=ExtResource( 10 )] unique_name_in_owner = true @@ -226,13 +234,6 @@ scale = Vector2( 0.878906, 0.936025 ) [node name="AnimationTree" parent="Blobby/BlobbySprite" index="0"] parameters/playback = SubResource( 4 ) -[node name="GameplaySignalManager" type="Node2D" parent="."] -script = ExtResource( 2 ) - -[connection signal="timeout" from="UserInterface/HUD/HUDOverlay/GetBackTimer/Timer" to="GameplaySignalManager" method="_on_Timer_timeout"] -[connection signal="getback_timer_up" from="GameplaySignalManager" to="Blobby" method="_on_GameplaySignalManager_getback_timer_up"] -[connection signal="terminal_activated" from="GameplaySignalManager" to="UserInterface/HUD" method="_on_SignalManager_terminal_activated"] - [editable path="UserInterface"] [editable path="UserInterface/HUD"] [editable path="BlobbyCam"] diff --git a/src/Levels/LevelTemplate.tscn b/src/Levels/LevelTemplate.tscn new file mode 100644 index 0000000..54d5190 --- /dev/null +++ b/src/Levels/LevelTemplate.tscn @@ -0,0 +1,103 @@ +[gd_scene load_steps=12 format=2] + +[ext_resource path="res://src/Environment/AlienShipTileSet.tres" type="TileSet" id=1] +[ext_resource path="res://src/Actors/Blobby/Blobby.tscn" type="PackedScene" id=2] +[ext_resource path="res://src/ObstacleObjects/Spikes.tscn" type="PackedScene" id=3] +[ext_resource path="res://src/Levels/02 Level.tscn" type="PackedScene" id=4] +[ext_resource path="res://src/Contraptions/Portal/Portal.tscn" type="PackedScene" id=5] +[ext_resource path="res://src/Utilities/LevelState.tscn" type="PackedScene" id=6] +[ext_resource path="res://src/UserInterface/UserInterface.tscn" type="PackedScene" id=7] +[ext_resource path="res://src/Utilities/SignalManager.tscn" type="PackedScene" id=8] +[ext_resource path="res://src/Utilities/LevelState.gd" type="Script" id=9] +[ext_resource path="res://src/Actors/BlobbyCam.tscn" type="PackedScene" id=12] + +[sub_resource type="AnimationNodeStateMachinePlayback" id=4] + +[node name="LevelTemplate" type="Node2D"] +__meta__ = { +"_edit_horizontal_guides_": [ 464.0 ], +"_edit_vertical_guides_": [ 2880.0 ] +} + +[node name="SignalManager" parent="." instance=ExtResource( 8 )] + +[node name="LevelState" parent="." instance=ExtResource( 6 )] +unique_name_in_owner = true +script = ExtResource( 9 ) + +[node name="UserInterface" parent="." instance=ExtResource( 7 )] +unique_name_in_owner = true + +[node name="Timer" parent="UserInterface/HUD/HUDOverlay/GetBackTimer" index="0"] +wait_time = 20.0 + +[node name="BlobbyCam" parent="." instance=ExtResource( 12 )] +unique_name_in_owner = true +drag_margin_bottom = 0.3 + +[node name="AnimatedSprite" parent="BlobbyCam/ParallaxBackground/ParallaxLayer5" index="4"] +frame = 2 + +[node name="AnimatedSprite2" parent="BlobbyCam/ParallaxBackground/ParallaxLayer5" index="5"] +frame = 6 + +[node name="Blobby" parent="." instance=ExtResource( 2 )] +unique_name_in_owner = true +position = Vector2( -70, -1.90735e-06 ) +scale = Vector2( 0.878906, 0.936025 ) + +[node name="AnimationTree" parent="Blobby/BlobbySprite" index="0"] +parameters/playback = SubResource( 4 ) + +[node name="TileMap" type="TileMap" parent="."] +unique_name_in_owner = true +tile_set = ExtResource( 1 ) +cell_size = Vector2( 24, 24 ) +cell_quadrant_size = 3 +cell_custom_transform = Transform2D( 24, 0, 0, 24, 0, 0 ) +collision_layer = 8 +collision_mask = 8 +bake_navigation = true +format = 1 +tile_data = PoolIntArray( -851975, 1610612751, 0, -851974, 1610612746, 0, -851973, 1610612746, 0, -851972, 1610612746, 0, -851971, 1610612746, 0, -851970, 1610612746, 0, -851969, 1610612746, 0, -917504, 1610612746, 0, -917503, 1610612746, 0, -917502, 1610612746, 0, -917501, 1610612746, 0, -917500, 1610612746, 0, -917499, 1610612746, 0, -917498, 1610612746, 0, -917497, 1610612746, 0, -917496, 1610612746, 0, -917495, 1610612746, 0, -917494, 1610612746, 0, -917493, 1610612746, 0, -917492, 1610612746, 0, -917491, 1610612746, 0, -917490, 1610612746, 0, -917489, 1610612746, 0, -917488, 1610612746, 0, -917487, 1610612746, 0, -917486, 1610612746, 0, -917485, 1610612746, 0, -917484, 1610612746, 0, -917483, 1610612746, 0, -917482, 1610612746, 0, -917481, 1610612746, 0, -917480, 1610612746, 0, -917479, 1610612746, 0, -917478, 1610612746, 0, -917477, 1610612746, 0, -917476, 1610612746, 0, -917475, 1610612746, 0, -917474, 1610612746, 0, -917473, 1610612746, 0, -917472, 1610612746, 0, -917471, 1610612746, 0, -917470, 1610612746, 0, -917469, 1610612746, 0, -917468, 1610612746, 0, -917467, 1610612746, 0, -917466, 1610612746, 0, -917465, 1610612746, 0, -917464, 1610612746, 0, -917463, 1610612746, 0, -917462, 1610612746, 0, -917461, 1610612746, 0, -917460, 1610612746, 0, -917459, 1610612746, 0, -917458, 1610612746, 0, -917457, 1610612746, 0, -917456, 1610612746, 0, -917455, 1610612746, 0, -917454, 1610612746, 0, -917453, 1610612746, 0, -917452, 1610612746, 0, -917451, 1610612746, 0, -917450, 1610612746, 0, -917449, 1610612746, 0, -917448, 1610612746, 0, -917447, 1610612746, 0, -917446, 1610612746, 0, -917445, 1610612746, 0, -917444, 1610612746, 0, -917443, 1610612746, 0, -917442, 1610612746, 0, -917441, 1610612746, 0, -917440, -1073741809, 0, -786439, -1610612726, 0, -786438, 1610612739, 0, -786437, 1610612738, 0, -786436, 1610612738, 0, -786435, 1610612736, 0, -786434, 1610612738, 0, -786433, 1610612738, 0, -851968, 1610612738, 0, -851967, 1610612738, 0, -851966, 1610612738, 0, -851965, 1610612736, 0, -851964, 1610612738, 0, -851963, 1610612738, 0, -851962, 1610612738, 0, -851961, 1610612738, 0, -851960, 1610612738, 0, -851959, 1610612736, 0, -851958, 1610612738, 0, -851957, 1610612738, 0, -851956, 1610612738, 0, -851955, 1610612738, 0, -851954, 1610612738, 0, -851953, 1610612736, 0, -851952, 1610612738, 0, -851951, 1610612738, 0, -851950, 1610612738, 0, -851949, 1610612738, 0, -851948, 1610612738, 0, -851947, 1610612736, 0, -851946, 1610612738, 0, -851945, 1610612738, 0, -851944, 1610612738, 0, -851943, 1610612738, 0, -851942, 1610612738, 0, -851941, 1610612736, 0, -851940, 1610612738, 0, -851939, 1610612738, 0, -851938, 1610612738, 0, -851937, 1610612738, 0, -851936, 1610612738, 0, -851935, 1610612738, 0, -851934, 1610612738, 0, -851933, 1610612738, 0, -851932, 1610612736, 0, -851931, 1610612738, 0, -851930, 1610612738, 0, -851929, 1610612738, 0, -851928, 1610612738, 0, -851927, 1610612738, 0, -851926, 1610612736, 0, -851925, 1610612738, 0, -851924, 1610612738, 0, -851923, 1610612738, 0, -851922, 1610612738, 0, -851921, 1610612738, 0, -851920, 1610612736, 0, -851919, 1610612738, 0, -851918, 1610612738, 0, -851917, 1610612738, 0, -851916, 1610612738, 0, -851915, 1610612738, 0, -851914, 1610612736, 0, -851913, 1610612738, 0, -851912, 1610612738, 0, -851911, 1610612738, 0, -851910, 1610612738, 0, -851909, 1610612738, 0, -851908, 1610612736, 0, -851907, 3, 0, -851906, 3, 0, -851905, 1073741827, 0, -851904, -1073741814, 0, -720903, -1610612726, 0, -720902, -1610612734, 0, -786371, -1073741822, 0, -786370, -2147483645, 0, -786369, -536870909, 0, -786368, -1073741814, 0, -655367, -1610612726, 0, -655366, -1610612734, 0, -720835, -1073741822, 0, -720834, -2147483645, 0, -720833, -536870909, 0, -720832, -1073741814, 0, -589831, -1610612726, 0, -589830, -1610612734, 0, -655299, -1073741822, 0, -655298, -2147483645, 0, -655297, -536870909, 0, -655296, -1073741814, 0, -524295, -1610612726, 0, -524294, -1610612734, 0, -589763, -1073741822, 0, -589762, -2147483645, 0, -589761, -536870909, 0, -589760, -1073741814, 0, -458759, -1610612726, 0, -458758, -1610612734, 0, -524227, -1073741822, 0, -524226, -2147483645, 0, -524225, -536870909, 0, -524224, -1073741814, 0, -393223, -1610612726, 0, -393222, -1610612734, 0, -458691, 1073741831, 0, -458690, 1073741826, 0, -458689, 1073741826, 0, -458688, -1073741814, 0, -327687, -1610612726, 0, -327686, -1610612734, 0, -393152, -1073741814, 0, -262151, -1610612726, 0, -262150, -1610612734, 0, -327616, -1073741814, 0, -196615, -1610612726, 0, -196614, -1610612734, 0, -262088, 8, 0, -262087, 2, 0, -262086, 2, 0, -262085, 2, 0, -262084, 2, 0, -262083, 2, 0, -262082, 536870914, 0, -262081, 536870914, 0, -262080, -1073741814, 0, -131079, -1610612726, 0, -131078, -1610612734, 0, -196595, 7, 0, -196594, 1610612743, 0, -196568, 8, 0, -196567, 2, 0, -196566, 2, 0, -196565, 2, 0, -196564, 2, 0, -196563, 2, 0, -196562, 536870920, 0, -196559, 2, 0, -196556, 7, 0, -196555, 2, 0, -196554, 2, 0, -196553, 2, 0, -196552, 1610612739, 0, -196551, 3, 0, -196550, 3, 0, -196549, 3, 0, -196548, 3, 0, -196547, 3, 0, -196546, 1, 0, -196545, 3, 0, -196544, -1073741814, 0, -65543, -1610612726, 0, -65542, -1610612734, 0, -131064, 8, 0, -131063, -1610612729, 0, -131054, 7, 0, -131053, 2, 0, -131052, 0, 0, -131051, 536870919, 0, -131034, 7, 0, -131033, 2, 0, -131032, 3, 0, -131031, 3, 0, -131030, 3, 0, -131029, 3, 0, -131028, 3, 0, -131027, 3, 0, -131026, 1610612739, 0, -131020, 1610612739, 0, -131019, 3, 0, -131018, 3, 0, -131017, 3, 0, -131016, 1, 0, -131015, 3, 0, -131014, 3, 0, -131013, 3, 0, -131012, 3, 0, -131011, 3, 0, -131010, 3, 0, -131009, 3, 0, -131008, -1073741814, 0, -7, -1610612726, 0, -6, -1610612734, 0, -65532, 7, 0, -65531, 2, 0, -65530, 2, 0, -65529, 2, 0, -65528, 1610612739, 0, -65527, 1610612739, 0, -65526, -1610612729, 0, -65519, 7, 0, -65518, 3, 0, -65517, 3, 0, -65516, 3, 0, -65515, -1610612734, 0, -65514, 4, 0, -65500, 7, 0, -65499, 2, 0, -65498, 3, 0, -65497, 3, 0, -65496, 3, 0, -65495, 3, 0, -65494, 3, 0, -65493, 3, 0, -65492, 3, 0, -65491, 3, 0, -65490, 3, 0, -65489, 2, 0, -65488, 2, 0, -65487, 2, 0, -65486, 2, 0, -65485, 2, 0, -65484, 3, 0, -65483, 3, 0, -65482, 3, 0, -65481, 3, 0, -65480, 3, 0, -65479, 3, 0, -65478, 3, 0, -65477, 3, 0, -65476, 3, 0, -65475, 3, 0, -65474, 3, 0, -65473, 3, 0, -65472, -1073741814, 0, 65529, -1610612726, 0, 65530, 3, 0, 65531, 2, 0, 65532, 0, 0, 65533, 2, 0, 65534, 2, 0, 65535, 2, 0, 0, 2, 0, 1, 2, 0, 2, 0, 0, 3, 2, 0, 4, 3, 0, 5, 3, 0, 6, 3, 0, 7, 3, 0, 8, 3, 0, 9, 3, 0, 10, 1610612739, 0, 11, 2, 0, 12, 2, 0, 13, 2, 0, 14, 0, 0, 15, 2, 0, 16, 2, 0, 17, 3, 0, 18, 3, 0, 19, 3, 0, 20, 3, 0, 21, 3, 0, 22, 2, 0, 23, 2, 0, 24, 2, 0, 25, 2, 0, 26, 0, 0, 27, 536870919, 0, 30, 7, 0, 31, 2, 0, 32, 2, 0, 33, 2, 0, 34, 0, 0, 35, 2, 0, 36, 1610612739, 0, 37, 3, 0, 38, 3, 0, 39, 3, 0, 40, 3, 0, 41, 3, 0, 42, 3, 0, 43, 3, 0, 44, 3, 0, 45, 3, 0, 46, 3, 0, 47, 3, 0, 48, 3, 0, 49, 3, 0, 50, 3, 0, 51, 3, 0, 52, 3, 0, 53, 3, 0, 54, 3, 0, 55, 3, 0, 56, 1, 0, 57, 3, 0, 58, 3, 0, 59, 3, 0, 60, 3, 0, 61, 3, 0, 62, 1, 0, 63, 3, 0, 64, -1073741814, 0, 131065, -1610612721, 0, 131066, 10, 0, 131067, 10, 0, 131068, 10, 0, 131069, 10, 0, 131070, 10, 0, 131071, 10, 0, 65536, 10, 0, 65537, 10, 0, 65538, 10, 0, 65539, 10, 0, 65540, 10, 0, 65541, 10, 0, 65542, 10, 0, 65543, 10, 0, 65544, 12, 0, 65545, 10, 0, 65546, 10, 0, 65547, 10, 0, 65548, 10, 0, 65549, 10, 0, 65550, 10, 0, 65551, 10, 0, 65552, 10, 0, 65553, 10, 0, 65554, 10, 0, 65555, 10, 0, 65556, 12, 0, 65557, 10, 0, 65558, 10, 0, 65559, 10, 0, 65560, 10, 0, 65561, 10, 0, 65562, 10, 0, 65563, 10, 0, 65564, 10, 0, 65565, 10, 0, 65566, 10, 0, 65567, 10, 0, 65568, 10, 0, 65569, 10, 0, 65570, 10, 0, 65571, 10, 0, 65572, 10, 0, 65573, 10, 0, 65574, 10, 0, 65575, 10, 0, 65576, 12, 0, 65577, 10, 0, 65578, 10, 0, 65579, 10, 0, 65580, 10, 0, 65581, 10, 0, 65582, 12, 0, 65583, 10, 0, 65584, 10, 0, 65585, 10, 0, 65586, 10, 0, 65587, 10, 0, 65588, 10, 0, 65589, 10, 0, 65590, 10, 0, 65591, 10, 0, 65592, 10, 0, 65593, 10, 0, 65594, 10, 0, 65595, 10, 0, 65596, 10, 0, 65597, 10, 0, 65598, 10, 0, 65599, 10, 0, 65600, 15, 0 ) + +[node name="Spikes" parent="TileMap" instance=ExtResource( 3 )] +position = Vector2( 708, 12 ) +rotation = 1.57079 + +[node name="Spikes2" parent="TileMap" instance=ExtResource( 3 )] +position = Vector2( 1140, -36 ) +rotation = 1.57079 + +[node name="Spikes4" parent="TileMap" instance=ExtResource( 3 )] +position = Vector2( 1164, -36 ) +rotation = 1.57079 + +[node name="Spikes5" parent="TileMap" instance=ExtResource( 3 )] +position = Vector2( 1188, -36 ) +rotation = 1.57079 + +[node name="Spikes6" parent="TileMap" instance=ExtResource( 3 )] +position = Vector2( 1212, -36 ) +rotation = 1.57079 + +[node name="Spikes7" parent="TileMap" instance=ExtResource( 3 )] +position = Vector2( 1236, -36 ) +rotation = 1.57079 + +[node name="Spikes3" parent="TileMap" instance=ExtResource( 3 )] +position = Vector2( 684, 12 ) +rotation = 1.57079 + +[node name="Portal" parent="." instance=ExtResource( 5 )] +position = Vector2( 1488, -120 ) +next_scene = ExtResource( 4 ) + +[connection signal="body_exited" from="Blobby/BlobbySkin" to="Blobby" method="_on_BlobbySkin_body_exited"] + +[editable path="SignalManager"] +[editable path="LevelState"] +[editable path="UserInterface"] +[editable path="UserInterface/HUD"] +[editable path="BlobbyCam"] +[editable path="Blobby"] diff --git a/src/NeutralObjects/Coin.gd b/src/NeutralObjects/Coin.gd new file mode 100644 index 0000000..0aad9ad --- /dev/null +++ b/src/NeutralObjects/Coin.gd @@ -0,0 +1,11 @@ +extends Area2D + +onready var anim_player: AnimationPlayer = get_node("AnimationPlayer") +onready var levelState := $"%LevelState" + +export var currencyValue: = 1 + +func _on_body_entered(_body: Node) -> void: + levelState.currency += currencyValue + anim_player.play("fade_out") + queue_free() diff --git a/src/NeutralObjects/Coin.tscn b/src/NeutralObjects/Coin.tscn index ed8413a..fbdb167 100644 --- a/src/NeutralObjects/Coin.tscn +++ b/src/NeutralObjects/Coin.tscn @@ -1,7 +1,7 @@ [gd_scene load_steps=320 format=2] [ext_resource path="res://assets/neutral object/whitegold orbicle/0020 (Klein)-fs8.png" type="Texture" id=1] -[ext_resource path="res://assets/contraption/Coin.gd" type="Script" id=2] +[ext_resource path="res://src/NeutralObjects/Coin.gd" type="Script" id=2] [ext_resource path="res://assets/neutral object/whitegold orbicle/0021 (Klein)-fs8.png" type="Texture" id=3] [ext_resource path="res://assets/neutral object/whitegold orbicle/0023 (Klein)-fs8.png" type="Texture" id=4] [ext_resource path="res://assets/neutral object/whitegold orbicle/0025 (Klein)-fs8.png" type="Texture" id=5] @@ -407,7 +407,7 @@ position = Vector2( 0, -2.52127 ) scale = Vector2( 0.149428, 0.151196 ) frames = SubResource( 4 ) animation = "rotate" -frame = 243 +frame = 301 playing = true [connection signal="body_entered" from="." to="." method="_on_body_entered"] diff --git a/src/StateMachines/StateMachine.gd b/src/StateMachines/StateMachine.gd index fd1cb86..bb4a292 100644 --- a/src/StateMachines/StateMachine.gd +++ b/src/StateMachines/StateMachine.gd @@ -8,6 +8,10 @@ var states = {} # Parent Node that uses these states onready var parent = get_parent() +# Scene Singletons +onready var levelState := get_tree().root.get_child(0).get_node("%LevelState") +onready var signalManager := get_tree().root.get_child(0).get_node("%SignalManager") + # Basic process flow for every SM func _physics_process(delta): diff --git a/src/UserInterface/Buttons/RetryButton.gd b/src/UserInterface/Buttons/RetryButton.gd index 80f0505..5abfa84 100644 --- a/src/UserInterface/Buttons/RetryButton.gd +++ b/src/UserInterface/Buttons/RetryButton.gd @@ -1,7 +1,8 @@ extends Button +onready var levelState := $"../%LevelState" func _on_button_up() -> void: - GlobalState.score = 0 + levelState.kills = 0 get_tree().paused = false get_tree().reload_current_scene() diff --git a/src/UserInterface/Buttons/StatsLabel.gd b/src/UserInterface/Buttons/StatsLabel.gd index 457819b..21d55ef 100644 --- a/src/UserInterface/Buttons/StatsLabel.gd +++ b/src/UserInterface/Buttons/StatsLabel.gd @@ -1,4 +1,6 @@ extends Label +onready var levelState = $"%LevelState" + func _ready(): - self.text = self.text % [GlobalState.score, GlobalState.deaths] + self.text = self.text % [levelState.currency, levelState.kills, levelState.frees] diff --git a/src/UserInterface/Buttons/StatsLabel.tscn b/src/UserInterface/Buttons/StatsLabel.tscn index 22f8d89..f71ad3a 100644 --- a/src/UserInterface/Buttons/StatsLabel.tscn +++ b/src/UserInterface/Buttons/StatsLabel.tscn @@ -18,5 +18,5 @@ margin_top = -46.5 margin_right = 206.5 margin_bottom = 46.5 custom_fonts/font = SubResource( 1 ) -text = "Your final score is %s. -Your died %s times." +text = "You collected %s orbicles. +You died %s times, destroyed %s and freed %s beings." diff --git a/src/UserInterface/Screens/HUD.gd b/src/UserInterface/Screens/HUD.gd index aa4ae72..a6aa026 100644 --- a/src/UserInterface/Screens/HUD.gd +++ b/src/UserInterface/Screens/HUD.gd @@ -4,12 +4,19 @@ extends Control onready var current_scene := get_tree().get_current_scene() onready var pause_overlay: ColorRect = $HUDOverlay onready var timer: Label = $HUDOverlay/GetBackTimer -onready var score: Label = $HUDOverlay/Score +onready var currency: Label = $HUDOverlay/Currency +onready var kills: Label = $HUDOverlay/Kills +onready var frees: Label = $HUDOverlay/Frees +onready var levelState := get_tree().root.get_child(0).get_node("%LevelState") +onready var signalManager := get_tree().root.get_child(0).get_node("%SignalManager") func _ready(): #TODO Connect what HOW? - GlobalState.connect("score_updated", self, "update_interface") + signalManager.connect("currency_updated", self, "update_interface") + signalManager.connect("kills_updated", self, "update_interface") + signalManager.connect("frees_updated", self, "update_interface") + signalManager.connect("termial_activated", self, "_on_SignalManager_terminal_activated") update_interface() func _process(delta): @@ -29,7 +36,9 @@ func _zoom_timer() -> void: func update_interface() -> void: - score.text = "Score: %s" % GlobalState.score + currency.text = "Wallet: %s Orbicles" % levelState.currency + kills.text = "Kills: %s" % levelState.kills + frees.text = "Freed: %s" % levelState.frees func _on_SignalManager_terminal_activated() -> void: diff --git a/src/UserInterface/Screens/HUD.tscn b/src/UserInterface/Screens/HUD.tscn index e94556d..b8464b8 100644 --- a/src/UserInterface/Screens/HUD.tscn +++ b/src/UserInterface/Screens/HUD.tscn @@ -45,31 +45,45 @@ script = ExtResource( 5 ) [node name="HUDOverlay" type="ColorRect" parent="."] unique_name_in_owner = true -anchor_left = 0.5 -anchor_right = 0.5 -margin_left = -320.0 -margin_right = 320.0 -margin_bottom = 360.0 +margin_right = 480.0 +margin_bottom = 270.0 color = Color( 0, 0, 0, 0 ) -[node name="Score" type="Label" parent="HUDOverlay"] +[node name="Currency" type="Label" parent="HUDOverlay"] unique_name_in_owner = true -visible = false -anchor_left = 1.0 -anchor_right = 1.0 -margin_left = -96.0001 +margin_left = 3.0 +margin_top = 291.0 +margin_right = 174.0 +margin_bottom = 304.0 rect_scale = Vector2( 0.590909, 0.627907 ) -text = "Score: 100000000000000000" -align = 2 +text = "Orbicles: 100000000000000000" + +[node name="Kills" type="Label" parent="HUDOverlay"] +unique_name_in_owner = true +margin_left = 3.0 +margin_top = 315.0 +margin_right = 224.0 +margin_bottom = 328.0 +rect_scale = Vector2( 0.590909, 0.627907 ) +text = "Destroyed Beings: 100000000000000000" + +[node name="Frees" type="Label" parent="HUDOverlay"] +unique_name_in_owner = true +margin_left = 3.0 +margin_top = 339.0 +margin_right = 200.0 +margin_bottom = 352.0 +rect_scale = Vector2( 0.590909, 0.627907 ) +text = "Freed Beings: 100000000000000000" [node name="GetBackTimer" type="Label" parent="HUDOverlay"] unique_name_in_owner = true visible = false anchor_left = 0.5 anchor_right = 0.5 -margin_left = -9.0 -margin_right = 9.0 -margin_bottom = 14.0 +margin_left = 45.0 +margin_right = 63.0 +margin_bottom = 13.0 rect_scale = Vector2( 5, 5 ) text = "100" align = 2 diff --git a/src/UserInterface/Screens/PauseScreen.gd b/src/UserInterface/Screens/PauseScreen.gd index d9ff5da..2685207 100644 --- a/src/UserInterface/Screens/PauseScreen.gd +++ b/src/UserInterface/Screens/PauseScreen.gd @@ -4,11 +4,13 @@ extends Control onready var current_scene := get_tree().get_current_scene() onready var pause_overlay: ColorRect = get_node("PauseOverlay") onready var pause_title: Label = get_node("PauseOverlay/Title") +onready var levelState := $"../%LevelState" +onready var signalManager := $"../%SignalManager" var paused := false setget set_paused func _ready(): - GlobalState.connect("player_died", self, "_on_GlobalState_player_died") + signalManager.connect("player_died", self, "_on_GlobalState_player_died") func _on_GlobalState_player_died() -> void: diff --git a/src/Utilities/GameplaySignalManager.gd b/src/Utilities/GameplaySignalManager.gd deleted file mode 100644 index 69d5f63..0000000 --- a/src/Utilities/GameplaySignalManager.gd +++ /dev/null @@ -1,31 +0,0 @@ -extends Node2D - -signal terminal_activated() -signal getback_timer_up() -signal score_updated -signal player_died - -func _on_Timer_timeout() -> void: - emit_signal("getback_timer_up") - -#TODO Easteregg pls -var score: = 0 setget set_score -var deaths: = 0 setget set_deaths -var is_dead: = false setget set_dead - - -func reset() -> void: - score = 0 - deaths = 0 - -#TODO Remove score -func set_score(value: int) -> void: - score = value - emit_signal("score_updated") - -func set_deaths(value: int) -> void: - deaths = value - #emit_signal("player_died") - -func set_dead(value: bool) -> void: - is_dead = value \ No newline at end of file diff --git a/src/Utilities/LevelState.gd b/src/Utilities/LevelState.gd new file mode 100644 index 0000000..7a8f3da --- /dev/null +++ b/src/Utilities/LevelState.gd @@ -0,0 +1,34 @@ +extends Node + +onready var signalManager := get_tree().root.get_child(0).get_node("%SignalManager") + +#TODO Easteregg pls +var currency: = 0 setget set_currency +var deaths: = 0 setget set_deaths +var kills: = 0 setget set_kills +var frees: = 0 setget set_frees +# TODO Rename probs +var is_dead: = false setget set_dead + +func reset() -> void: + deaths = 0 + kills = 0 + currency = 0 + +func set_currency(value: int) -> void: + currency = value + signalManager.emit_signal("currency_updated") + +func set_deaths(value: int) -> void: + deaths = value + +func set_kills(value: int) -> void: + kills = value + signalManager.emit_signal("kills_updated") + +func set_frees(value: int) -> void: + frees = value + signalManager.emit_signal("frees_updated") + +func set_dead(value: bool) -> void: + is_dead = value diff --git a/src/Utilities/LevelState.tscn b/src/Utilities/LevelState.tscn new file mode 100644 index 0000000..0837704 --- /dev/null +++ b/src/Utilities/LevelState.tscn @@ -0,0 +1,6 @@ +[gd_scene load_steps=2 format=2] + +[ext_resource path="res://src/Utilities/LevelState.gd" type="Script" id=1] + +[node name="LevelState" type="Node"] +script = ExtResource( 1 ) diff --git a/src/Utilities/SignalManager.gd b/src/Utilities/SignalManager.gd new file mode 100644 index 0000000..ea012a1 --- /dev/null +++ b/src/Utilities/SignalManager.gd @@ -0,0 +1,11 @@ +extends Node + +signal terminal_activated() +signal getback_timer_up() +signal currency_updated() +signal kills_updated() +signal frees_updated() +signal player_died() + +func _on_Timer_timeout() -> void: + emit_signal("getback_timer_up") diff --git a/src/Utilities/SignalManager.tscn b/src/Utilities/SignalManager.tscn new file mode 100644 index 0000000..c8b29f0 --- /dev/null +++ b/src/Utilities/SignalManager.tscn @@ -0,0 +1,7 @@ +[gd_scene load_steps=2 format=2] + +[ext_resource path="res://src/Utilities/SignalManager.gd" type="Script" id=1] + +[node name="SignalManager" type="Node"] +unique_name_in_owner = true +script = ExtResource( 1 )