From c3bca3ce7c0f22c34f33a631093c61c79d04c202 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Sun, 4 Oct 2020 00:33:54 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9D=87=EF=B8=8F=20Add=20working=20hydraulic?= =?UTF-8?q?=20press?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://www.youtube.com/watch?v=w6khmhtsPHY --- Scenes/ConveyorBelt.tscn | 4 +- Scenes/Main.tscn | 84 +++++++++------ Scenes/Obstacles/Press.tscn | 102 ++++++++++++++++++ Scenes/Player.tscn | 4 +- Scenes/SingleScreenWalls.tscn | 35 ++++++ Scenes/Wall.tscn | 5 + Scripts/Conductor.gd | 36 +++---- Scripts/Obstacles/Press.gd | 22 ++++ Scripts/Obstacles/ScrollingBlock.gd | 2 +- Scripts/Player.gd | 8 +- Sprites/Pressa.png | Bin 1985 -> 0 bytes Sprites/button.png.import | 2 +- Sprites/button_left.png.import | 2 +- Sprites/button_right.png.import | 2 +- Sprites/conveyor_belt.png.import | 2 +- Sprites/placeholder_cat.jpg.import | 2 +- Sprites/player_danny_devito.png.import | 2 +- Sprites/press_bottom.png | 3 + Sprites/press_bottom.png.import | 34 ++++++ Sprites/press_pipes.png | 3 + ...essa.png.import => press_pipes.png.import} | 8 +- Sprites/pressa.png | 3 - Sprites/scrolling_block.png.import | 2 +- project.godot | 7 ++ 24 files changed, 296 insertions(+), 78 deletions(-) create mode 100644 Scenes/Obstacles/Press.tscn create mode 100644 Scenes/SingleScreenWalls.tscn create mode 100644 Scenes/Wall.tscn create mode 100644 Scripts/Obstacles/Press.gd delete mode 100644 Sprites/Pressa.png create mode 100644 Sprites/press_bottom.png create mode 100644 Sprites/press_bottom.png.import create mode 100644 Sprites/press_pipes.png rename Sprites/{pressa.png.import => press_pipes.png.import} (66%) delete mode 100644 Sprites/pressa.png diff --git a/Scenes/ConveyorBelt.tscn b/Scenes/ConveyorBelt.tscn index 98a9dd1..d677007 100644 --- a/Scenes/ConveyorBelt.tscn +++ b/Scenes/ConveyorBelt.tscn @@ -4,7 +4,7 @@ [ext_resource path="res://Scripts/ConveyorBelt.gd" type="Script" id=2] [sub_resource type="RectangleShape2D" id=1] -extents = Vector2( 640, 20 ) +extents = Vector2( 680, 20 ) [node name="ConveyorBelt" type="StaticBody2D"] collision_layer = 4 @@ -22,4 +22,4 @@ cell_quadrant_size = 40 cell_tile_origin = 1 centered_textures = true format = 1 -tile_data = PoolIntArray( 65520, 0, 0, 65521, 1, 0, 65522, 1, 0, 65523, 1, 0, 65524, 1, 0, 65525, 1, 0, 65526, 1, 0, 65527, 1, 0, 65528, 1, 0, 65529, 1, 0, 65530, 1, 0, 65531, 1, 0, 65532, 1, 0, 65533, 1, 0, 65534, 1, 0, 65535, 1, 0, 0, 1, 0, 1, 1, 0, 2, 1, 0, 3, 1, 0, 4, 1, 0, 5, 1, 0, 6, 1, 0, 7, 1, 0, 8, 1, 0, 9, 1, 0, 10, 1, 0, 11, 1, 0, 12, 1, 0, 13, 1, 0, 14, 1, 0, 15, 2, 0 ) +tile_data = PoolIntArray( 65519, 0, 0, 65520, 1, 0, 65521, 1, 0, 65522, 1, 0, 65523, 1, 0, 65524, 1, 0, 65525, 1, 0, 65526, 1, 0, 65527, 1, 0, 65528, 1, 0, 65529, 1, 0, 65530, 1, 0, 65531, 1, 0, 65532, 1, 0, 65533, 1, 0, 65534, 1, 0, 65535, 1, 0, 0, 1, 0, 1, 1, 0, 2, 1, 0, 3, 1, 0, 4, 1, 0, 5, 1, 0, 6, 1, 0, 7, 1, 0, 8, 1, 0, 9, 1, 0, 10, 1, 0, 11, 1, 0, 12, 1, 0, 13, 1, 0, 14, 1, 0, 15, 1, 0, 16, 2, 0 ) diff --git a/Scenes/Main.tscn b/Scenes/Main.tscn index c2c6a91..3f22cdb 100644 --- a/Scenes/Main.tscn +++ b/Scenes/Main.tscn @@ -1,53 +1,71 @@ -[gd_scene load_steps=5 format=2] +[gd_scene load_steps=7 format=2] [ext_resource path="res://Scenes/Player.tscn" type="PackedScene" id=1] [ext_resource path="res://Scenes/Conductor.tscn" type="PackedScene" id=2] [ext_resource path="res://Scenes/ConveyorBelt.tscn" type="PackedScene" id=3] -[ext_resource path="res://Scenes/Obstacles/ScrollingBlock.tscn" type="PackedScene" id=4] +[ext_resource path="res://Scenes/SingleScreenWalls.tscn" type="PackedScene" id=4] +[ext_resource path="res://Scenes/Obstacles/Press.tscn" type="PackedScene" id=5] +[ext_resource path="res://Scenes/Obstacles/ScrollingBlock.tscn" type="PackedScene" id=6] [node name="Main" type="Node2D"] - -[node name="Conductor" parent="." instance=ExtResource( 2 )] -song_offset = 200000.0 +__meta__ = { +"_edit_horizontal_guides_": [ ] +} [node name="Player" parent="." instance=ExtResource( 1 )] position = Vector2( 622.258, 379.938 ) -jump_buffer_msec = 80.0 [node name="ConveyorBelt" parent="." instance=ExtResource( 3 )] position = Vector2( 640, 700 ) conveyor_speed = 100.0 -[node name="ConveyorBelt2" parent="." instance=ExtResource( 3 )] -position = Vector2( 640, 20 ) -conveyor_speed = -100.0 +[node name="SingleScreenWalls" parent="." instance=ExtResource( 4 )] -[node name="ScrollingBlock" parent="." instance=ExtResource( 4 )] -position = Vector2( 980, 660 ) -collision_mask = 2147483650 -scroll_velocity = Vector2( -100, 0 ) +[node name="Press" parent="." instance=ExtResource( 5 )] +position = Vector2( 420, 0 ) -[node name="ScrollingBlock3" parent="." instance=ExtResource( 4 )] -position = Vector2( 980, 620 ) -collision_mask = 2147483650 -scroll_velocity = Vector2( -100, 0 ) +[node name="Conductor" parent="." instance=ExtResource( 2 )] +song_bpm = 30.0 -[node name="ScrollingBlock4" parent="." instance=ExtResource( 4 )] -position = Vector2( 1020, 620 ) -collision_mask = 2147483650 -scroll_velocity = Vector2( -100, 0 ) +[node name="Conductor2" parent="." instance=ExtResource( 2 )] +song_bpm = 30.0 -[node name="ScrollingBlock6" parent="." instance=ExtResource( 4 )] -position = Vector2( 1020, 580 ) -collision_mask = 2147483650 -scroll_velocity = Vector2( -100, 0 ) +[node name="ScrollingBlock" parent="." instance=ExtResource( 6 )] +position = Vector2( 800, 660 ) -[node name="ScrollingBlock5" parent="." instance=ExtResource( 4 )] -position = Vector2( 1020, 660 ) -collision_mask = 2147483650 -scroll_velocity = Vector2( -100, 0 ) +[node name="ScrollingBlock2" parent="." instance=ExtResource( 6 )] +position = Vector2( 880, 580 ) -[node name="ScrollingBlock2" parent="." instance=ExtResource( 4 )] -position = Vector2( 940, 660 ) -collision_mask = 2147483650 -scroll_velocity = Vector2( -100, 0 ) +[node name="ScrollingBlock3" parent="." instance=ExtResource( 6 )] +position = Vector2( 920, 540 ) + +[node name="ScrollingBlock4" parent="." instance=ExtResource( 6 )] +position = Vector2( 840, 620 ) + +[node name="ScrollingBlock5" parent="." instance=ExtResource( 6 )] +position = Vector2( 960, 500 ) + +[node name="ScrollingBlock6" parent="." instance=ExtResource( 6 )] +position = Vector2( 1000, 460 ) + +[node name="ScrollingBlock7" parent="." instance=ExtResource( 6 )] +position = Vector2( 1080, 380 ) + +[node name="ScrollingBlock8" parent="." instance=ExtResource( 6 )] +position = Vector2( 1120, 340 ) + +[node name="ScrollingBlock9" parent="." instance=ExtResource( 6 )] +position = Vector2( 1040, 420 ) + +[node name="ScrollingBlock10" parent="." instance=ExtResource( 6 )] +position = Vector2( 1160, 300 ) + +[node name="ScrollingBlock11" parent="." instance=ExtResource( 6 )] +position = Vector2( 1200, 260 ) + +[node name="ScrollingBlock12" parent="." instance=ExtResource( 6 )] +position = Vector2( 1240, 220 ) + +[node name="ScrollingBlock13" parent="." instance=ExtResource( 6 )] +position = Vector2( 1660, 220 ) +scale = Vector2( 20, 1 ) diff --git a/Scenes/Obstacles/Press.tscn b/Scenes/Obstacles/Press.tscn new file mode 100644 index 0000000..8eab93d --- /dev/null +++ b/Scenes/Obstacles/Press.tscn @@ -0,0 +1,102 @@ +[gd_scene load_steps=7 format=2] + +[ext_resource path="res://Sprites/press_bottom.png" type="Texture" id=1] +[ext_resource path="res://Scripts/Obstacles/Press.gd" type="Script" id=2] +[ext_resource path="res://Sprites/press_pipes.png" type="Texture" id=3] + +[sub_resource type="Animation" id=3] +resource_name = "Stomp" +tracks/0/type = "bezier" +tracks/0/path = NodePath("Bottom:position:y") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"points": PoolRealArray( 40, -0.25, 0, 0.25, 0, 567, 0, -303.5, 0.25, 0 ), +"times": PoolRealArray( 0, 1 ) +} +tracks/1/type = "bezier" +tracks/1/path = NodePath("Pipes:scale:y") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/keys = { +"points": PoolRealArray( 1, -0.25, 0, 0.25, 0, 14.2, 0, -7.1, 0.25, 0 ), +"times": PoolRealArray( 0, 1 ) +} +tracks/2/type = "bezier" +tracks/2/path = NodePath("CollisionShape2D:shape:extents:y") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/keys = { +"points": PoolRealArray( 76.5, -0.25, 0, 0.25, 0, 340, 0, -170, 0.25, 0 ), +"times": PoolRealArray( 0, 1 ) +} +tracks/3/type = "bezier" +tracks/3/path = NodePath("CollisionShape2D:position:y") +tracks/3/interp = 1 +tracks/3/loop_wrap = true +tracks/3/imported = false +tracks/3/enabled = true +tracks/3/keys = { +"points": PoolRealArray( 76.5, -0.25, 0, 0.25, 0, 340, 0, -170, 0.25, 0 ), +"times": PoolRealArray( 0, 1 ) +} +tracks/4/type = "value" +tracks/4/path = NodePath("Bottom/StompArea/CollisionShape2D:disabled") +tracks/4/interp = 1 +tracks/4/loop_wrap = true +tracks/4/imported = false +tracks/4/enabled = true +tracks/4/keys = { +"times": PoolRealArray( 0, 0.2 ), +"transitions": PoolRealArray( 1, 1 ), +"update": 1, +"values": [ true, false ] +} + +[sub_resource type="RectangleShape2D" id=4] +extents = Vector2( 78, 4 ) + +[sub_resource type="RectangleShape2D" id=5] +extents = Vector2( 80, 76.5 ) + +[node name="Press" type="StaticBody2D"] +script = ExtResource( 2 ) + +[node name="AnimationPlayer" type="AnimationPlayer" parent="."] +playback_process_mode = 0 +playback_speed = 3.5 +anims/Stomp = SubResource( 3 ) + +[node name="Pipes" type="Node2D" parent="."] + +[node name="Sprite" type="Sprite" parent="Pipes"] +texture = ExtResource( 3 ) +offset = Vector2( 0, 20 ) + +[node name="Bottom" type="Node2D" parent="."] +position = Vector2( 0, 40 ) + +[node name="Sprite" type="Sprite" parent="Bottom"] +texture = ExtResource( 1 ) +offset = Vector2( 0, 56.5 ) + +[node name="StompArea" type="Area2D" parent="Bottom"] +position = Vector2( 0, -40 ) +collision_layer = 8 +collision_mask = 2 + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Bottom/StompArea"] +position = Vector2( 0, 157 ) +shape = SubResource( 4 ) +disabled = true + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +position = Vector2( 0, 76.5 ) +shape = SubResource( 5 ) +[connection signal="body_entered" from="Bottom/StompArea" to="." method="_on_StompArea_body_entered"] diff --git a/Scenes/Player.tscn b/Scenes/Player.tscn index 1b180d7..da686a2 100644 --- a/Scenes/Player.tscn +++ b/Scenes/Player.tscn @@ -4,12 +4,12 @@ [ext_resource path="res://Scripts/Player.gd" type="Script" id=2] [sub_resource type="RectangleShape2D" id=1] -extents = Vector2( 20, 20 ) +extents = Vector2( 19.8, 19.8 ) [node name="Player" type="KinematicBody2D"] collision_layer = 2 +collision_mask = 2147483677 script = ExtResource( 2 ) -jump_buffer_msec = 500.0 [node name="Sprite" type="Sprite" parent="."] texture = ExtResource( 1 ) diff --git a/Scenes/SingleScreenWalls.tscn b/Scenes/SingleScreenWalls.tscn new file mode 100644 index 0000000..ce91539 --- /dev/null +++ b/Scenes/SingleScreenWalls.tscn @@ -0,0 +1,35 @@ +[gd_scene load_steps=4 format=2] + +[ext_resource path="res://Scenes/Wall.tscn" type="PackedScene" id=1] + +[sub_resource type="RectangleShape2D" id=1] +extents = Vector2( 20, 360 ) + +[sub_resource type="RectangleShape2D" id=2] +extents = Vector2( 680, 20 ) + +[node name="SingleScreenWalls" type="Node2D"] + +[node name="WallLeft" type="StaticBody2D" parent="." instance=ExtResource( 1 )] +collision_layer = 16 +collision_mask = 2 + +[node name="CollisionShape2D" type="CollisionShape2D" parent="WallLeft"] +position = Vector2( -20, 360 ) +shape = SubResource( 1 ) + +[node name="WallRight" type="StaticBody2D" parent="." instance=ExtResource( 1 )] +collision_layer = 16 +collision_mask = 2 + +[node name="CollisionShape2D" type="CollisionShape2D" parent="WallRight"] +position = Vector2( 1300, 360 ) +shape = SubResource( 1 ) + +[node name="WallTop" type="StaticBody2D" parent="." instance=ExtResource( 1 )] +collision_layer = 16 +collision_mask = 2 + +[node name="CollisionShape2D" type="CollisionShape2D" parent="WallTop"] +position = Vector2( 640, -20 ) +shape = SubResource( 2 ) diff --git a/Scenes/Wall.tscn b/Scenes/Wall.tscn new file mode 100644 index 0000000..76781a3 --- /dev/null +++ b/Scenes/Wall.tscn @@ -0,0 +1,5 @@ +[gd_scene format=2] + +[node name="Wall" type="StaticBody2D"] +collision_layer = 16 +collision_mask = 2 diff --git a/Scripts/Conductor.gd b/Scripts/Conductor.gd index 95f9da6..942cd68 100644 --- a/Scripts/Conductor.gd +++ b/Scripts/Conductor.gd @@ -11,23 +11,19 @@ export(float, 0, 1000000) var song_offset: float = 0 # The time the song started playing at var start_time: int -# Song beats signals -signal quarter_beat -signal half_beat -signal beat -signal four_beats -signal two_beats +# Beat signal +signal subbeat(subbeat_num) # The time of the last quarter_beat -var last_qb: int +var last_subbeat: int # The count of quarter_beats so far -var count_qb: int = 0 +var subbeat_count: int = 0 -# Calculate the microseconds per beat -func usec_per_quarter_beat(): - return 60000000 / (song_bpm * 4) +# Calculate the microseconds per 1/12 beat +func subbeat_usec(): + return 60000000 / (song_bpm * 12) # Returns microseconds since the song start @@ -44,7 +40,7 @@ func corrected_time(): # Start playing the song func play(): start_time = OS.get_ticks_usec() - count_qb = 0 + subbeat_count = 0 $Music.play() @@ -54,15 +50,7 @@ func _ready(): func _process(delta): var time = corrected_time() - if time - last_qb >= usec_per_quarter_beat(): - emit_signal("quarter_beat") - if count_qb % 2 == 0: - emit_signal("half_beat") - if count_qb % 4 == 0: - emit_signal("beat") - if count_qb % 8 == 0: - emit_signal("two_beats") - if count_qb % 16 == 0: - emit_signal("four_beats") - last_qb = time - count_qb += 1 + if time - last_subbeat >= subbeat_usec(): + emit_signal("subbeat", subbeat_count) + last_subbeat = time + subbeat_count += 1 diff --git a/Scripts/Obstacles/Press.gd b/Scripts/Obstacles/Press.gd new file mode 100644 index 0000000..157b743 --- /dev/null +++ b/Scripts/Obstacles/Press.gd @@ -0,0 +1,22 @@ +extends StaticBody2D +class_name Press + + +var root_node: Node = null +var conductor: Conductor = null + + +func _subbeat(subbeat_num): + if subbeat_num % 24 == 0: + $AnimationPlayer.play("Stomp") + elif subbeat_num % 24 == 12: + $AnimationPlayer.play_backwards("Stomp") + +func _enter_tree(): + root_node = get_tree().current_scene + conductor = root_node.get_node("Conductor") + conductor.connect("subbeat", self, "_subbeat") + + +func _on_StompArea_body_entered(body): + print(body) diff --git a/Scripts/Obstacles/ScrollingBlock.gd b/Scripts/Obstacles/ScrollingBlock.gd index 8fb17c8..8e17b53 100644 --- a/Scripts/Obstacles/ScrollingBlock.gd +++ b/Scripts/Obstacles/ScrollingBlock.gd @@ -2,7 +2,7 @@ extends ExtendedKinematicBody2D class_name ScrollingBlock -export(Vector2) var scroll_velocity: Vector2 = Vector2(-10, 0) +export(Vector2) var scroll_velocity: Vector2 = Vector2(-100, 0) func _physics_process(delta): diff --git a/Scripts/Player.gd b/Scripts/Player.gd index a7d26b0..756ba45 100644 --- a/Scripts/Player.gd +++ b/Scripts/Player.gd @@ -5,9 +5,10 @@ export(Vector2) var gravity: Vector2 = Vector2(0, 10) var speed: Vector2 = Vector2.ZERO export(float) var move_speed: float = 300 -export(float) var jump_speed: float = 500 -export(float) var jump_buffer_msec: float = 64 +export(float) var jump_speed: float = 425 +export(float) var jump_buffer_msec: float = 80 export(float) var quick_fall_gravity_multiplier: float = 4 +export(bool) var stop_jump_on_bonk: bool = true var can_jump: bool = false var jump_buffer: int = 0 @@ -28,6 +29,9 @@ func _physics_process(delta): can_jump = true is_quick_falling = false + if stop_jump_on_bonk and is_on_ceiling(): + speed.y = 0 + if is_quick_falling: speed += gravity * quick_fall_gravity_multiplier else: diff --git a/Sprites/Pressa.png b/Sprites/Pressa.png deleted file mode 100644 index cb8289139cb9a8a86366a40a43c36f0bbcdc9217..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1985 zcmbu9c{tnY7RP^*Scnw6shgfqP2uXlc-vv8j1$7RPBVeN`=~LX)Gb8wi3HL zhH04AR?%3ZBdTsK^;pX=wbN=-+fC=*zwbZy^FHT2=lMS8J%60{Ip?vxE#|nWyeI$w z$8lIRp6{RiFcBgCoj&BJ1pop`{wS0^4uyh+hKKn22l@bjdUkBKDfTr|v4`krrE$vP za;lMcjjasY3L;zUC3&9KVp)GejsDOgH(9l($01b9=v$L>WN6svdzO;~#2i_qSS;;c z!9Ic~$>^O?{Q7aKqi^amvWEWiou~|Oov$3n`T8H;gq{WhWENxYJA6*hky;1a$?btE0`i! zBKMDXocr?HqF6=n{SA-Rpa75@^Vh&i3&*AjeH z)VdrCe_y8Vl;h2@t zQL@?>v(8;Lp^^s{xpzA!AM8I^DlVSNwbpPz;H}|_67FM}hc=TfmLe)NeE45W_3_Eq z01-YEKL2O%zY7d!xgNFNI5<@YcNihO%%L=D3OBb8GZ>6j;>WEmJrWXt@ImsS&;p~* zG_rZ-x$=L44OM1kyz89?&I&Rmxjxeyo13B8W3kcEpFZzg+)1bubD>d4^NZ@PHj+UV z=bhMA5Jf4B27K@9@gVjuSi0qaR)2vTQtRzfoZHOq?pzE`4jK~ht}?#~BAF{XP7kqe zJ$R^NYipY(KeVVx@;|F48Cr+aeY5`Xm8@l|g+PFePD|=b>lXzSRAr=%8M_|CUIy86 z#$Lr?&DgG2*hQ)tnzL^UhGL#Klbemx3K)rlIop|2$uWm70;z{lT%QdGDU^vT4{N5H zaU)^rl6zs_S>?qS7G^n(HBb|#A1a+NGMDI@^|n%arEGNEXBcA87u_vX+?rd#^Loiln||~R_1B{k8vg1F z?6DJ)>Dz@Na<{-s5Cd7MZ&!2{2+7rW?LzH>CgKz`XvIC4k?)~ZW~>BWEcY`=)}Ekw z$frdwuEy;);WxVoM#V9Xh+=^RLB+|PVOgr4r#r5u`0dEW*85vqvt2hj%PMwwNf%1M zCqY*mSD*-B<)K%galY}oSe~8vOs;Y#sot;m;|$RywiiDjre_`zUQ7F~>MtvvS4pGM zEk!1QJ7$TQc|^!6~xy%(kGwhRt=uneAHNJ_Lf- z%huo6cx;65)PEnmB80YMjWH{OXH;xI2Go5; zmp&c0yRyGbIhs&=4+-(yfm7^H_d ze@3$)5r4>D5~?^B?{N%=d>mH^Bh(bh~&hiZDhjDSe)YSWY7#Sg|~ARGY#!uS-v5(Rx|mbc9XQp&f21X()pg z)L9YRYh3PlYnGaTBd3}^`k*K!(T9hK>_`_|K3h8Ee`u^$A`+_(L=%t$hwVkJP@a=4l;A`W)(2DP<4}q1)8OAOi{+y??!g4&q2m8tQR&?#uq=vw z7)UcxANW$2gdxUpM&oPtcZXhCrWPW+us^y20{ydlIl8NjIOV&7bTi8k_`6rIzX3pe zenbGsQmGMk3X80fJz5m!|GX5mnf~-W*|O-$~7_DedtWIe@dWMK@S_ GB>WpY-h|x% diff --git a/Sprites/button.png.import b/Sprites/button.png.import index 8616e76..e90af31 100644 --- a/Sprites/button.png.import +++ b/Sprites/button.png.import @@ -20,7 +20,7 @@ compress/hdr_mode=0 compress/bptc_ldr=0 compress/normal_map=0 flags/repeat=0 -flags/filter=true +flags/filter=false flags/mipmaps=false flags/anisotropic=false flags/srgb=2 diff --git a/Sprites/button_left.png.import b/Sprites/button_left.png.import index 1e81f38..bbce55d 100644 --- a/Sprites/button_left.png.import +++ b/Sprites/button_left.png.import @@ -20,7 +20,7 @@ compress/hdr_mode=0 compress/bptc_ldr=0 compress/normal_map=0 flags/repeat=0 -flags/filter=true +flags/filter=false flags/mipmaps=false flags/anisotropic=false flags/srgb=2 diff --git a/Sprites/button_right.png.import b/Sprites/button_right.png.import index fe2da9a..35e6f2a 100644 --- a/Sprites/button_right.png.import +++ b/Sprites/button_right.png.import @@ -20,7 +20,7 @@ compress/hdr_mode=0 compress/bptc_ldr=0 compress/normal_map=0 flags/repeat=0 -flags/filter=true +flags/filter=false flags/mipmaps=false flags/anisotropic=false flags/srgb=2 diff --git a/Sprites/conveyor_belt.png.import b/Sprites/conveyor_belt.png.import index 3bcf484..2b88d0f 100644 --- a/Sprites/conveyor_belt.png.import +++ b/Sprites/conveyor_belt.png.import @@ -20,7 +20,7 @@ compress/hdr_mode=0 compress/bptc_ldr=0 compress/normal_map=0 flags/repeat=0 -flags/filter=true +flags/filter=false flags/mipmaps=false flags/anisotropic=false flags/srgb=2 diff --git a/Sprites/placeholder_cat.jpg.import b/Sprites/placeholder_cat.jpg.import index dfa1d80..700dad4 100644 --- a/Sprites/placeholder_cat.jpg.import +++ b/Sprites/placeholder_cat.jpg.import @@ -20,7 +20,7 @@ compress/hdr_mode=0 compress/bptc_ldr=0 compress/normal_map=0 flags/repeat=0 -flags/filter=true +flags/filter=false flags/mipmaps=false flags/anisotropic=false flags/srgb=2 diff --git a/Sprites/player_danny_devito.png.import b/Sprites/player_danny_devito.png.import index b20c36d..c740b11 100644 --- a/Sprites/player_danny_devito.png.import +++ b/Sprites/player_danny_devito.png.import @@ -20,7 +20,7 @@ compress/hdr_mode=0 compress/bptc_ldr=0 compress/normal_map=0 flags/repeat=0 -flags/filter=true +flags/filter=false flags/mipmaps=false flags/anisotropic=false flags/srgb=2 diff --git a/Sprites/press_bottom.png b/Sprites/press_bottom.png new file mode 100644 index 0000000..3b6123a --- /dev/null +++ b/Sprites/press_bottom.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:074c42ff1bae9345c323ba2000027a9c4f0e81b66a8df9ffcbb80f9179c9b649 +size 13947 diff --git a/Sprites/press_bottom.png.import b/Sprites/press_bottom.png.import new file mode 100644 index 0000000..8dee8f3 --- /dev/null +++ b/Sprites/press_bottom.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/press_bottom.png-334fad476d2fb2f7e1f033f4eecb9564.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Sprites/press_bottom.png" +dest_files=[ "res://.import/press_bottom.png-334fad476d2fb2f7e1f033f4eecb9564.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=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/Sprites/press_pipes.png b/Sprites/press_pipes.png new file mode 100644 index 0000000..8809e05 --- /dev/null +++ b/Sprites/press_pipes.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:326a9b05621bc1118bb28fb90ee2c7eb2d7e44482460b11b769c5de139769415 +size 1994 diff --git a/Sprites/pressa.png.import b/Sprites/press_pipes.png.import similarity index 66% rename from Sprites/pressa.png.import rename to Sprites/press_pipes.png.import index 4adc9c0..17fef2f 100644 --- a/Sprites/pressa.png.import +++ b/Sprites/press_pipes.png.import @@ -2,15 +2,15 @@ importer="texture" type="StreamTexture" -path="res://.import/pressa.png-de3cbaeb993efaee29fad4d460691535.stex" +path="res://.import/press_pipes.png-a7b3ec50f427100b50342d18a41d9393.stex" metadata={ "vram_texture": false } [deps] -source_file="res://Sprites/pressa.png" -dest_files=[ "res://.import/pressa.png-de3cbaeb993efaee29fad4d460691535.stex" ] +source_file="res://Sprites/press_pipes.png" +dest_files=[ "res://.import/press_pipes.png-a7b3ec50f427100b50342d18a41d9393.stex" ] [params] @@ -20,7 +20,7 @@ compress/hdr_mode=0 compress/bptc_ldr=0 compress/normal_map=0 flags/repeat=0 -flags/filter=true +flags/filter=false flags/mipmaps=false flags/anisotropic=false flags/srgb=2 diff --git a/Sprites/pressa.png b/Sprites/pressa.png deleted file mode 100644 index 9958bd1..0000000 --- a/Sprites/pressa.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0ab88e8970b8c22e23dedfd6b61c9c00ba5b8fceb7eb1db13bfd3314c0614f74 -size 1985 diff --git a/Sprites/scrolling_block.png.import b/Sprites/scrolling_block.png.import index c8c39ca..46c5852 100644 --- a/Sprites/scrolling_block.png.import +++ b/Sprites/scrolling_block.png.import @@ -20,7 +20,7 @@ compress/hdr_mode=0 compress/bptc_ldr=0 compress/normal_map=0 flags/repeat=0 -flags/filter=true +flags/filter=false flags/mipmaps=false flags/anisotropic=false flags/srgb=2 diff --git a/project.godot b/project.godot index 74a6ba5..9d2ec3e 100644 --- a/project.godot +++ b/project.godot @@ -29,6 +29,11 @@ _global_script_classes=[ { "language": "GDScript", "path": "res://Scripts/Player.gd" }, { +"base": "StaticBody2D", +"class": "Press", +"language": "GDScript", +"path": "res://Scripts/Obstacles/Press.gd" +}, { "base": "ExtendedKinematicBody2D", "class": "ScrollingBlock", "language": "GDScript", @@ -39,6 +44,7 @@ _global_script_class_icons={ "ConveyorBelt": "", "ExtendedKinematicBody2D": "", "Player": "", +"Press": "", "ScrollingBlock": "" } @@ -82,6 +88,7 @@ plr_right={ 2d_physics/layer_2="Player" 2d_physics/layer_3="Conveyor Belt" 2d_physics/layer_4="Obstacles" +2d_physics/layer_5="Screen Walls" [rendering]