diff --git a/blends/Present_Colour.png b/blends/Present_Colour.png new file mode 100644 index 0000000..4034338 --- /dev/null +++ b/blends/Present_Colour.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c7a9f496f6b25673f8ae9f1bd2865c19c0e7d8217146a83687252fbedda89181 +size 86909 diff --git a/blends/present.blend b/blends/present.blend new file mode 100644 index 0000000..7f651d6 --- /dev/null +++ b/blends/present.blend @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7df716f416183b664cf75b18e14952cb3bdea564c6dafb90d2fa5673068c2ebe +size 4696653 diff --git a/godot/Objects/present/present.tscn b/godot/Objects/present/present.tscn new file mode 100644 index 0000000..696eebe --- /dev/null +++ b/godot/Objects/present/present.tscn @@ -0,0 +1,11 @@ +[gd_scene load_steps=2 format=3 uid="uid://y0mo5gxmd08q"] + +[ext_resource type="PackedScene" uid="uid://b7kpas3rxox0u" path="res://present.glb" id="1_420vr"] + +[node name="present" instance=ExtResource("1_420vr")] + +[node name="Present" parent="." index="2"] +transform = Transform3D(0.2, 0, 0, 0, 0.2, 0, 0, 0, 0.2, 0, 0, 0) + +[node name="CollisionShape3D" parent="." index="3"] +transform = Transform3D(0.2, 0, 0, 0, 0.2, 0, 0, 0, 0.2, 0, 0, 0) diff --git a/godot/UI/TAS UI/AdvanceButton.cs b/godot/UI/TAS UI/AdvanceButton.cs index 6a365ca..3a75e45 100644 --- a/godot/UI/TAS UI/AdvanceButton.cs +++ b/godot/UI/TAS UI/AdvanceButton.cs @@ -10,10 +10,19 @@ public partial class AdvanceButton : Button public override void _Ready() { TAS = GetNode("/root/TAS_System"); - this.Pressed += () => { TAS.Advance(1); }; + + AudioStreamPlayer buttonSound = this.GetNode("../../ButtonSound"); + + bool playSound = true; + + this.Pressed += () => { + TAS.Advance(1); + if (playSound) buttonSound.Play(); + playSound = false; + }; this.ButtonDown += () => { this.isButtonPressed = true; }; - this.ButtonUp += () => { this.isButtonPressed = false; TAS.ResetSpeedup(); }; + this.ButtonUp += () => { this.isButtonPressed = false; TAS.ResetSpeedup(); playSound = true; }; } // Called every frame. 'delta' is the elapsed time since the previous frame. diff --git a/godot/UI/TAS UI/RegressButton.cs b/godot/UI/TAS UI/RegressButton.cs index 908a591..883e2dd 100644 --- a/godot/UI/TAS UI/RegressButton.cs +++ b/godot/UI/TAS UI/RegressButton.cs @@ -10,12 +10,18 @@ public partial class RegressButton : Button public override void _Ready() { TAS = GetNode("/root/TAS_System"); + AudioStreamPlayer buttonSound = this.GetNode("../../ButtonSound"); + + bool playSound = true; + this.Pressed += () => { TAS.Regress(1); + if (playSound) buttonSound.Play(); + playSound = false; }; this.ButtonDown += () => { this.isButtonPressed = true; TAS.StopIncrementingFrames(); }; - this.ButtonUp += () => { this.isButtonPressed = false; TAS.ResetSpeedup(); }; + this.ButtonUp += () => { this.isButtonPressed = false; TAS.ResetSpeedup(); playSound = true; }; } public virtual void OnFrameIncremented(int newFrame) diff --git a/godot/UI/TAS UI/TAS UI.tscn b/godot/UI/TAS UI/TAS UI.tscn index 51d0091..2233202 100644 --- a/godot/UI/TAS UI/TAS UI.tscn +++ b/godot/UI/TAS UI/TAS UI.tscn @@ -1,10 +1,12 @@ -[gd_scene load_steps=9 format=3 uid="uid://b1uf31ed6h0ir"] +[gd_scene load_steps=11 format=3 uid="uid://b1uf31ed6h0ir"] [ext_resource type="Script" path="res://UI/TAS UI/CurrentFrameLabel.cs" id="1_27u4w"] [ext_resource type="Script" path="res://UI/TAS UI/TAS UI.gd" id="1_ytl0x"] [ext_resource type="Script" path="res://UI/TAS UI/RegressButton.cs" id="2_fhmsa"] +[ext_resource type="AudioStream" uid="uid://cio6yfcnyf2lx" path="res://audio/note.wav" id="2_nsxig"] [ext_resource type="Script" path="res://UI/TAS UI/Label2.gd" id="2_otida"] [ext_resource type="Script" path="res://UI/TAS UI/AdvanceButton.cs" id="3_0ti6q"] +[ext_resource type="Script" path="res://UI/TAS UI/UIAudioPlayer.cs" id="3_251uv"] [ext_resource type="Script" path="res://UI/TAS UI/StopIncrementButton.cs" id="4_4gd4c"] [ext_resource type="Script" path="res://UI/TAS UI/StartIncrementButton.cs" id="5_5af83"] [ext_resource type="Script" path="res://UI/TAS UI/ResetFramesButton.cs" id="6_nwwkv"] @@ -19,6 +21,10 @@ grow_vertical = 2 mouse_filter = 2 script = ExtResource("1_ytl0x") +[node name="ButtonSound" type="AudioStreamPlayer" parent="."] +stream = ExtResource("2_nsxig") +script = ExtResource("3_251uv") + [node name="DEBUG" type="Control" parent="."] visible = false layout_mode = 1 diff --git a/godot/UI/TAS UI/UIAudioPlayer.cs b/godot/UI/TAS UI/UIAudioPlayer.cs new file mode 100644 index 0000000..7c26bc2 --- /dev/null +++ b/godot/UI/TAS UI/UIAudioPlayer.cs @@ -0,0 +1,15 @@ +using Godot; +using System; + +public partial class UIAudioPlayer : AudioStreamPlayer +{ + // Called when the node enters the scene tree for the first time. + public override void _Ready() + { + } + + // Called every frame. 'delta' is the elapsed time since the previous frame. + public override void _Process(double delta) + { + } +} diff --git a/godot/audio/note.wav b/godot/audio/note.wav new file mode 100644 index 0000000..c9a51cb Binary files /dev/null and b/godot/audio/note.wav differ diff --git a/godot/audio/note.wav.import b/godot/audio/note.wav.import new file mode 100644 index 0000000..f7cefad --- /dev/null +++ b/godot/audio/note.wav.import @@ -0,0 +1,24 @@ +[remap] + +importer="wav" +type="AudioStreamWAV" +uid="uid://cio6yfcnyf2lx" +path="res://.godot/imported/note.wav-f74766d8f2fafbaa9729bf4b58d8f300.sample" + +[deps] + +source_file="res://audio/note.wav" +dest_files=["res://.godot/imported/note.wav-f74766d8f2fafbaa9729bf4b58d8f300.sample"] + +[params] + +force/8_bit=false +force/mono=false +force/max_rate=false +force/max_rate_hz=44100 +edit/trim=false +edit/normalize=false +edit/loop_mode=0 +edit/loop_begin=0 +edit/loop_end=-1 +compress/mode=0 diff --git a/godot/present.glb b/godot/present.glb new file mode 100644 index 0000000..9cca859 --- /dev/null +++ b/godot/present.glb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3308bc777bcf08c5149802816673112e8a8d66e0740d86f9ae796622762c0987 +size 97036 diff --git a/godot/present.glb.import b/godot/present.glb.import new file mode 100644 index 0000000..3b984c2 --- /dev/null +++ b/godot/present.glb.import @@ -0,0 +1,43 @@ +[remap] + +importer="scene" +importer_version=1 +type="PackedScene" +uid="uid://b7kpas3rxox0u" +path="res://.godot/imported/present.glb-e77123a5243a48b4f6359d14b3d62578.scn" + +[deps] + +source_file="res://present.glb" +dest_files=["res://.godot/imported/present.glb-e77123a5243a48b4f6359d14b3d62578.scn"] + +[params] + +nodes/root_type="Node3D" +nodes/root_name="Scene Root" +nodes/apply_root_scale=true +nodes/root_scale=1.0 +meshes/ensure_tangents=true +meshes/generate_lods=true +meshes/create_shadow_meshes=true +meshes/light_baking=1 +meshes/lightmap_texel_size=0.2 +skins/use_named_skins=true +animation/import=true +animation/fps=30 +animation/trimming=false +animation/remove_immutable_tracks=true +import_script/path="res://physics/import_billiard.gd" +_subresources={ +"nodes": { +"PATH:AnimationPlayer": { +"import/skip_import": true +}, +"PATH:Present": { +"generate/physics": true, +"physics/body_type": 1, +"physics/shape_type": 1 +} +} +} +gltf/embedded_image_handling=1 diff --git a/godot/present_Present_Colour.png b/godot/present_Present_Colour.png new file mode 100644 index 0000000..8f1fc48 --- /dev/null +++ b/godot/present_Present_Colour.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b8da77d4f5e2178fee1d5fdc3616f36bb6319036105160266ce29dd0095c0337 +size 34500 diff --git a/godot/present_Present_Colour.png.import b/godot/present_Present_Colour.png.import new file mode 100644 index 0000000..2c0c401 --- /dev/null +++ b/godot/present_Present_Colour.png.import @@ -0,0 +1,36 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bk7f8qt1llirc" +path.s3tc="res://.godot/imported/present_Present_Colour.png-f09f385526932bc2beabfc729192b306.s3tc.ctex" +metadata={ +"imported_formats": ["s3tc_bptc"], +"vram_texture": true +} +generator_parameters={} + +[deps] + +source_file="res://present_Present_Colour.png" +dest_files=["res://.godot/imported/present_Present_Colour.png-f09f385526932bc2beabfc729192b306.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/godot/tests/TAS_system/TAS_test_003.tscn b/godot/tests/TAS_system/TAS_test_003.tscn index 6f61e73..c6b5c75 100644 --- a/godot/tests/TAS_system/TAS_test_003.tscn +++ b/godot/tests/TAS_system/TAS_test_003.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=11 format=3 uid="uid://1wrwvnt1xuwr"] +[gd_scene load_steps=12 format=3 uid="uid://1wrwvnt1xuwr"] [ext_resource type="PackedScene" uid="uid://bua7f25rpewkp" path="res://small_room.glb" id="1_m1abe"] [ext_resource type="PackedScene" uid="uid://drmb4sitb74fx" path="res://control_scheme/controller.tscn" id="2_1yuny"] @@ -8,6 +8,7 @@ [ext_resource type="PackedScene" uid="uid://dfkyytk42ecwk" path="res://Objects/igloo/igloo.tscn" id="6_wha2i"] [ext_resource type="PackedScene" uid="uid://dd35nmr3swub6" path="res://Objects/balloon/balloon.tscn" id="7_ln6xh"] [ext_resource type="PackedScene" uid="uid://b7qky0n2ea40e" path="res://Objects/domino/domino2.tscn" id="8_2krw6"] +[ext_resource type="PackedScene" uid="uid://y0mo5gxmd08q" path="res://Objects/present/present.tscn" id="9_dst2f"] [sub_resource type="Sky" id="Sky_u0y8n"] @@ -28,7 +29,6 @@ camera = NodePath("Camera3D") initial_target = NodePath("../grape") [node name="Camera3D" type="Camera3D" parent="controller" index="1"] -current = true [node name="billiard" parent="." index="4" instance=ExtResource("3_kg8e8")] @@ -50,5 +50,7 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.0205169, 0.381115, -0.02601 transform = Transform3D(0.358936, -0.000516907, -0.141382, 0.000873357, 0.385775, 0.00080681, 0.14138, -0.00107074, 0.358935, -1.91181, 1.97725, -0.189681) [node name="Domino" parent="." index="11" instance=ExtResource("8_2krw6")] -transform = Transform3D(0.999994, -0.00349065, 0, -1.52581e-10, -4.37111e-08, 1, -0.00349065, -0.999994, -4.37114e-08, 0.087864, 0.212463, -1.74624) -continuous_cd = false +transform = Transform3D(0.999994, -0.00349065, 0, -1.52581e-10, -4.37111e-08, 1, -0.00349065, -0.999994, -4.37114e-08, 0.087864, 1.44443, -0.526911) + +[node name="present" parent="." index="12" instance=ExtResource("9_dst2f")] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.701696, 1.58198, -0.372796) diff --git a/godot/tests/control_scheme/test_basic_controls.tscn b/godot/tests/control_scheme/test_basic_controls.tscn index 5f6bea2..718e912 100644 --- a/godot/tests/control_scheme/test_basic_controls.tscn +++ b/godot/tests/control_scheme/test_basic_controls.tscn @@ -4,14 +4,14 @@ [ext_resource type="PackedScene" uid="uid://drmb4sitb74fx" path="res://control_scheme/controller.tscn" id="2_dcvuq"] [ext_resource type="PackedScene" uid="uid://c43pr474qofhl" path="res://physics/grape.tscn" id="3_gijly"] [ext_resource type="PackedScene" uid="uid://b1uf31ed6h0ir" path="res://UI/TAS UI/TAS UI.tscn" id="4_8yatx"] -[ext_resource type="PackedScene" uid="uid://cx4ohbn84hmc3" path="res://cake.tscn" id="5_udc7s"] +[ext_resource type="PackedScene" path="res://cake.tscn" id="5_udc7s"] [ext_resource type="PackedScene" uid="uid://cfpiau12q3fut" path="res://Objects/child/child.tscn" id="6_52mue"] [ext_resource type="PackedScene" uid="uid://dfkyytk42ecwk" path="res://Objects/igloo/igloo.tscn" id="7_ifsxo"] [ext_resource type="Script" path="res://tests/control_scheme/screen_shader.gd" id="8_crgih"] [ext_resource type="Shader" path="res://tests/control_scheme/screen_shader.gdshader" id="8_w6ylu"] [ext_resource type="AudioStream" uid="uid://dw06bektw4j8m" path="res://audio/TricksterGhostNew.mp3" id="10_4mw33"] [ext_resource type="PackedScene" uid="uid://b7qky0n2ea40e" path="res://Objects/domino/domino2.tscn" id="11_2c1js"] -[ext_resource type="PackedScene" uid="uid://db3h7pscfif84" path="res://Objects/balloon/balloon2.tscn" id="12_f4vmr"] +[ext_resource type="PackedScene" path="res://Objects/balloon/balloon2.tscn" id="12_f4vmr"] [sub_resource type="Gradient" id="Gradient_iyif7"] offsets = PackedFloat32Array(0.333333, 0.635088, 1)