This commit is contained in:
Spencer Killen 2023-11-12 15:48:55 -07:00
commit e811a84538
Signed by: sjkillen
GPG Key ID: 3AF3117BA6FBB75B
15 changed files with 174 additions and 10 deletions

BIN
blends/Present_Colour.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
blends/present.blend (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -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)

View File

@ -10,10 +10,19 @@ public partial class AdvanceButton : Button
public override void _Ready() public override void _Ready()
{ {
TAS = GetNode<TAS_System>("/root/TAS_System"); TAS = GetNode<TAS_System>("/root/TAS_System");
this.Pressed += () => { TAS.Advance(1); };
AudioStreamPlayer buttonSound = this.GetNode<AudioStreamPlayer>("../../ButtonSound");
bool playSound = true;
this.Pressed += () => {
TAS.Advance(1);
if (playSound) buttonSound.Play();
playSound = false;
};
this.ButtonDown += () => { this.isButtonPressed = true; }; 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. // Called every frame. 'delta' is the elapsed time since the previous frame.

View File

@ -10,12 +10,18 @@ public partial class RegressButton : Button
public override void _Ready() public override void _Ready()
{ {
TAS = GetNode<TAS_System>("/root/TAS_System"); TAS = GetNode<TAS_System>("/root/TAS_System");
AudioStreamPlayer buttonSound = this.GetNode<AudioStreamPlayer>("../../ButtonSound");
bool playSound = true;
this.Pressed += () => { this.Pressed += () => {
TAS.Regress(1); TAS.Regress(1);
if (playSound) buttonSound.Play();
playSound = false;
}; };
this.ButtonDown += () => { this.isButtonPressed = true; TAS.StopIncrementingFrames(); }; 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) public virtual void OnFrameIncremented(int newFrame)

View File

@ -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/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/TAS UI.gd" id="1_ytl0x"]
[ext_resource type="Script" path="res://UI/TAS UI/RegressButton.cs" id="2_fhmsa"] [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/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/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/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/StartIncrementButton.cs" id="5_5af83"]
[ext_resource type="Script" path="res://UI/TAS UI/ResetFramesButton.cs" id="6_nwwkv"] [ext_resource type="Script" path="res://UI/TAS UI/ResetFramesButton.cs" id="6_nwwkv"]
@ -19,6 +21,10 @@ grow_vertical = 2
mouse_filter = 2 mouse_filter = 2
script = ExtResource("1_ytl0x") script = ExtResource("1_ytl0x")
[node name="ButtonSound" type="AudioStreamPlayer" parent="."]
stream = ExtResource("2_nsxig")
script = ExtResource("3_251uv")
[node name="DEBUG" type="Control" parent="."] [node name="DEBUG" type="Control" parent="."]
visible = false visible = false
layout_mode = 1 layout_mode = 1

View File

@ -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)
{
}
}

BIN
godot/audio/note.wav Normal file

Binary file not shown.

View File

@ -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

BIN
godot/present.glb (Stored with Git LFS) Normal file

Binary file not shown.

43
godot/present.glb.import Normal file
View File

@ -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

BIN
godot/present_Present_Colour.png (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -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

View File

@ -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://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"] [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://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://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://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"] [sub_resource type="Sky" id="Sky_u0y8n"]
@ -28,7 +29,6 @@ camera = NodePath("Camera3D")
initial_target = NodePath("../grape") initial_target = NodePath("../grape")
[node name="Camera3D" type="Camera3D" parent="controller" index="1"] [node name="Camera3D" type="Camera3D" parent="controller" index="1"]
current = true
[node name="billiard" parent="." index="4" instance=ExtResource("3_kg8e8")] [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) 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")] [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) 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)
continuous_cd = false
[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)

View File

@ -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://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://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://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://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="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="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="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="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://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"] [sub_resource type="Gradient" id="Gradient_iyif7"]
offsets = PackedFloat32Array(0.333333, 0.635088, 1) offsets = PackedFloat32Array(0.333333, 0.635088, 1)