diff --git a/Commands/abjuration.png b/Commands/abjuration.png new file mode 100644 index 0000000..0c0e8b7 Binary files /dev/null and b/Commands/abjuration.png differ diff --git a/Commands/abjuration.png.import b/Commands/abjuration.png.import new file mode 100644 index 0000000..83b2733 --- /dev/null +++ b/Commands/abjuration.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cvut6ofjhaltn" +path="res://.godot/imported/abjuration.png-e924163c93f8355d3837a8bb3eef13a4.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Commands/abjuration.png" +dest_files=["res://.godot/imported/abjuration.png-e924163c93f8355d3837a8bb3eef13a4.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/Commands/controlled_blink_new.png b/Commands/controlled_blink_new.png new file mode 100644 index 0000000..bbc9d0d Binary files /dev/null and b/Commands/controlled_blink_new.png differ diff --git a/Commands/controlled_blink_new.png.import b/Commands/controlled_blink_new.png.import new file mode 100644 index 0000000..096a05c --- /dev/null +++ b/Commands/controlled_blink_new.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cmvnccuywukyw" +path="res://.godot/imported/controlled_blink_new.png-ef520718def84896c1c552a01ac129ff.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Commands/controlled_blink_new.png" +dest_files=["res://.godot/imported/controlled_blink_new.png-ef520718def84896c1c552a01ac129ff.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/Commands/haste_new.png b/Commands/haste_new.png new file mode 100644 index 0000000..2f3646f Binary files /dev/null and b/Commands/haste_new.png differ diff --git a/Commands/haste_new.png.import b/Commands/haste_new.png.import new file mode 100644 index 0000000..889c8a7 --- /dev/null +++ b/Commands/haste_new.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dx8s88cut5kka" +path="res://.godot/imported/haste_new.png-0ba91c6aeea5d133877fab9bb8289326.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Commands/haste_new.png" +dest_files=["res://.godot/imported/haste_new.png-0ba91c6aeea5d133877fab9bb8289326.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/Commands/jump.png b/Commands/jump.png new file mode 100644 index 0000000..89feb53 Binary files /dev/null and b/Commands/jump.png differ diff --git a/Commands/jump.png.import b/Commands/jump.png.import new file mode 100644 index 0000000..13ab8d1 --- /dev/null +++ b/Commands/jump.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://vc7wwv4wgabf" +path.s3tc="res://.godot/imported/jump.png-30c1e703fef0a7ddf5535f3a6331dad8.s3tc.ctex" +metadata={ +"imported_formats": ["s3tc_bptc"], +"vram_texture": true +} + +[deps] + +source_file="res://Commands/jump.png" +dest_files=["res://.godot/imported/jump.png-30c1e703fef0a7ddf5535f3a6331dad8.s3tc.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=true +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=0 diff --git a/Commands/phase_shift_new.png b/Commands/phase_shift_new.png new file mode 100644 index 0000000..3def1ee Binary files /dev/null and b/Commands/phase_shift_new.png differ diff --git a/Commands/phase_shift_new.png.import b/Commands/phase_shift_new.png.import new file mode 100644 index 0000000..2c2e22c --- /dev/null +++ b/Commands/phase_shift_new.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cxljjpwweuds0" +path="res://.godot/imported/phase_shift_new.png-891079484e26e9cd007d0e1ac60bd618.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Commands/phase_shift_new.png" +dest_files=["res://.godot/imported/phase_shift_new.png-891079484e26e9cd007d0e1ac60bd618.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/Commands/swiftness_new.png b/Commands/swiftness_new.png new file mode 100644 index 0000000..31eefae Binary files /dev/null and b/Commands/swiftness_new.png differ diff --git a/Commands/swiftness_new.png.import b/Commands/swiftness_new.png.import new file mode 100644 index 0000000..8e15935 --- /dev/null +++ b/Commands/swiftness_new.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://sopxcutu5u66" +path="res://.godot/imported/swiftness_new.png-e5f8fbc540408356f1ccb80b8fc5c8ed.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Commands/swiftness_new.png" +dest_files=["res://.godot/imported/swiftness_new.png-e5f8fbc540408356f1ccb80b8fc5c8ed.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/Levels/StartingRoom.tscn b/Levels/StartingRoom.tscn index 55936c2..0c47e93 100644 --- a/Levels/StartingRoom.tscn +++ b/Levels/StartingRoom.tscn @@ -7,10 +7,10 @@ [ext_resource type="Material" uid="uid://didvwdmm46bmq" path="res://Assets/Materials/green_floor.tres" id="3_mnhg8"] [ext_resource type="Texture2D" uid="uid://c1fesrqdpjloa" path="res://Assets/Textures/ice_0_old.png" id="4_v03h0"] [ext_resource type="PackedScene" uid="uid://dqvq4ybcpws87" path="res://Commands/command_block.tscn" id="5_81jk1"] -[ext_resource type="Texture2D" uid="uid://dc23iehev1s8w" path="res://Assets/Textures/crystal_wall_2.png" id="6_g3qnb"] [ext_resource type="Texture2D" uid="uid://bb8771vptn2l8" path="res://Assets/Textures/transparent_wall_new.png" id="6_nv7xj"] [ext_resource type="Texture2D" uid="uid://dd150xco2ee5q" path="res://Assets/Textures/cobalt_stone_4.png" id="7_qjeey"] [ext_resource type="PackedScene" uid="uid://cq4rfdsc5kghr" path="res://Commands/command_pedestal.tscn" id="10_sghta"] +[ext_resource type="Texture2D" uid="uid://vc7wwv4wgabf" path="res://Commands/jump.png" id="10_x6wpo"] [sub_resource type="BoxMesh" id="BoxMesh_21vdj"] material = ExtResource("2_0aj3l") @@ -138,15 +138,20 @@ mesh = SubResource("BoxMesh_lcav8") [node name="CollisionShape3D" type="CollisionShape3D" parent="EndZone/Area3D"] shape = SubResource("BoxShape3D_y4l56") -[node name="BaseCommand" parent="." instance=ExtResource("5_81jk1")] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2.76166, 1.32179, -1.59377) +[node name="JumpCommand2" parent="." instance=ExtResource("5_81jk1")] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.5, 1.322, -1.5) command_name = "jump" -command_sprite = ExtResource("6_g3qnb") +command_sprite = ExtResource("10_x6wpo") -[node name="BaseCommand2" parent="." instance=ExtResource("5_81jk1")] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.70813, 1.32179, -1.59377) +[node name="JumpCommand3" parent="." instance=ExtResource("5_81jk1")] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2.5, 1.322, -1.5) command_name = "jump" -command_sprite = ExtResource("7_qjeey") +command_sprite = ExtResource("10_x6wpo") + +[node name="JumpCommand4" parent="." instance=ExtResource("5_81jk1")] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -3.5, 1.322, -1.5) +command_name = "jump" +command_sprite = ExtResource("10_x6wpo") [node name="Pedestals" type="Node3D" parent="."] @@ -180,4 +185,5 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -3.5, 1, 2.5) [node name="CommandPedestal10" parent="Pedestals" instance=ExtResource("10_sghta")] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -3.5, 1, 1.5) +[connection signal="broadcast" from="." to="Player" method="_on_chrono_manager_broadcast"] [connection signal="object_clicked" from="Player" to="." method="_on_player_object_clicked"] diff --git a/Scripts/ChronoManager.gd b/Scripts/ChronoManager.gd index b12ab3a..a4acfd6 100644 --- a/Scripts/ChronoManager.gd +++ b/Scripts/ChronoManager.gd @@ -37,10 +37,12 @@ func _process(delta): print("Tick: " + str(current_tick)) for i in pedestals.size(): if i+1 == current_tick: - pedestals[i].mesh.mesh.material = pedestal_on_mat - else: - pass - #pedestals[i].mesh.material + var activated_pedestal = pedestals[i] + activated_pedestal.mesh.mesh.material = pedestal_on_mat + if activated_pedestal.has_command: + print("broadcasting: " + activated_pedestal.placed_command.command_name) + broadcast.emit(activated_pedestal.placed_command.command_name) + pass diff --git a/Scripts/Player.gd b/Scripts/Player.gd index 9125f40..95d6f78 100644 --- a/Scripts/Player.gd +++ b/Scripts/Player.gd @@ -24,9 +24,9 @@ func _physics_process(delta): if not is_on_floor(): velocity.y -= gravity * delta - # Handle jump. - if Input.is_action_just_pressed("jump") and is_on_floor(): - velocity.y = JUMP_VELOCITY + # Handle jump. # now handled by chronos + #if Input.is_action_just_pressed("jump") and is_on_floor(): + #velocity.y = JUMP_VELOCITY #free the mouse for debugging if Input.is_action_just_pressed("esc"): @@ -99,3 +99,11 @@ func drop(): held_object.freeze = false has_object = false + + +func _on_chrono_manager_broadcast(command): + match command: + "jump": + velocity.y = JUMP_VELOCITY + _: + printerr("bad command sent")