Compare commits

..

2 Commits

Author SHA1 Message Date
Spencer Killen 095801439d
Merge branch 'master' of https://git.sjkillen.ca/sjkillen/hurrmmm 2023-11-12 16:48:17 -07:00
Spencer Killen 0ef8c353c2
a 2023-11-12 16:47:53 -07:00
5 changed files with 86 additions and 4 deletions

View File

@ -1,9 +1,11 @@
[gd_scene load_steps=21 format=3 uid="uid://pcj1nku3mf21"]
[gd_scene load_steps=22 format=3 uid="uid://pcj1nku3mf21"]
[ext_resource type="PackedScene" uid="uid://bua7f25rpewkp" path="res://small_room.glb" id="1_mxs07"]
[ext_resource type="PackedScene" uid="uid://drmb4sitb74fx" path="res://control_scheme/controller.tscn" id="2_4ciir"]
[ext_resource type="AudioStream" uid="uid://d2ncd2qoklbbe" path="res://audio/impact.wav" id="2_rmoch"]
[ext_resource type="PackedScene" uid="uid://c43pr474qofhl" path="res://physics/grape.tscn" id="3_cknru"]
[ext_resource type="PackedScene" uid="uid://cx4ohbn84hmc3" path="res://cake.tscn" id="4_pqssx"]
[ext_resource type="Script" path="res://CollisionSound.cs" id="3_wyrva"]
[ext_resource type="PackedScene" path="res://cake.tscn" id="4_pqssx"]
[ext_resource type="PackedScene" uid="uid://cfpiau12q3fut" path="res://Objects/child/child.tscn" id="5_o3qks"]
@ -13,8 +15,9 @@
[ext_resource type="PackedScene" uid="uid://b1uf31ed6h0ir" path="res://UI/TAS UI/TAS UI.tscn" id="9_2xkrk"]
[ext_resource type="AudioStream" uid="uid://dw06bektw4j8m" path="res://audio/TricksterGhostNew.mp3" id="10_c38y3"]
[ext_resource type="PackedScene" uid="uid://b7qky0n2ea40e" path="res://Objects/domino/domino2.tscn" id="11_4wk46"]
[ext_resource type="PackedScene" path="res://Objects/balloon/balloon2.tscn" id="12_2uywm"]
[ext_resource type="PackedScene" uid="uid://db3h7pscfif84" path="res://Objects/balloon/balloon2.tscn" id="12_2uywm"]
[ext_resource type="PackedScene" uid="uid://y0mo5gxmd08q" path="res://Objects/present/present.tscn" id="13_1uqwi"]
[ext_resource type="PackedScene" uid="uid://b030laccuc70h" path="res://presents_stack.tscn" id="14_lmn70"]
[sub_resource type="PhysicsMaterial" id="PhysicsMaterial_lwj18"]
friction = 0.51
@ -57,7 +60,7 @@ visible = false
[node name="controller" parent="." index="3" node_paths=PackedStringArray("camera", "initial_target") instance=ExtResource("2_4ciir")]
camera = NodePath("../Camera3D")
initial_target = NodePath("../grape")
initial_target = NodePath("../grape2")
[node name="grape" parent="." index="4" instance=ExtResource("3_cknru")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.475577, 1.56762, -0.647942)
@ -76,6 +79,7 @@ current = true
[node name="cake" parent="." index="8" instance=ExtResource("4_pqssx")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.45077, 0)
initial_impulse = Vector3(0, 10, 0)
[node name="child" parent="." index="9" instance=ExtResource("5_o3qks")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -1.46064)
@ -247,3 +251,29 @@ visible = false
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.867866, 1.56404, -1.01166)
mass = 0.01
power_max = 20.0
[node name="presents_stack" parent="." index="47" instance=ExtResource("14_lmn70")]
transform = Transform3D(-0.999116, 0, -0.0420326, 0, 1, 0, 0.0420326, 0, -0.999116, -0.108518, 0.412222, 2.5743)
[node name="present" parent="presents_stack" index="0"]
initial_impulse = Vector3(0, -200, 0)
[node name="present2" parent="presents_stack" index="1"]
initial_impulse = Vector3(0, -200, 0)
[node name="present3" parent="presents_stack" index="2"]
initial_impulse = Vector3(0, -200, 0)
[node name="present4" parent="presents_stack" index="3"]
initial_impulse = Vector3(0, -200, 0)
[node name="present5" parent="presents_stack" index="4"]
initial_impulse = Vector3(0, -200, 0)
[node name="present6" parent="presents_stack" index="5"]
initial_impulse = Vector3(0, -200, 0)
[node name="present7" parent="presents_stack" index="6"]
initial_impulse = Vector3(0, -200, 0)
[editable path="presents_stack"]

View File

@ -3,6 +3,7 @@ class_name Billiard
@export var power_min := 0.01
@export var power_max := 5.0
@export var initial_impulse: Vector3 = Vector3(0.0, 0.0, 0.0)
var can_hit = true
var can_hit_history := Dictionary()
@ -14,6 +15,8 @@ func _ready():
TAS_System.FramesAdvanced.connect(frames_change)
TAS_System.FramesRegressed.connect(frames_change)
TAS_System.FramesReset.connect(frames_reset)
await get_tree().create_timer(.1).timeout
apply_central_impulse(initial_impulse)
func frame_inc(frame: int):
can_hit_history[frame] = can_hit

11
godot/presents_stack.gd Normal file
View File

@ -0,0 +1,11 @@
extends Node3D
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
pass

38
godot/presents_stack.tscn Normal file
View File

@ -0,0 +1,38 @@
[gd_scene load_steps=4 format=3 uid="uid://b030laccuc70h"]
[ext_resource type="Script" path="res://presents_stack.gd" id="1_7q5ad"]
[ext_resource type="PackedScene" uid="uid://y0mo5gxmd08q" path="res://Objects/present/present.tscn" id="2_txb03"]
[ext_resource type="PackedScene" uid="uid://c43pr474qofhl" path="res://physics/grape.tscn" id="3_riaai"]
[node name="presents_stack" type="Node3D"]
script = ExtResource("1_7q5ad")
[node name="present" parent="." instance=ExtResource("2_txb03")]
initial_impulse = Vector3(0, 10, 0)
[node name="present2" parent="." instance=ExtResource("2_txb03")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.58263, 0, 0)
initial_impulse = Vector3(0, -10, 0)
[node name="present3" parent="." instance=ExtResource("2_txb03")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.571471, 0, 0)
initial_impulse = Vector3(0, 10, 0)
[node name="present4" parent="." instance=ExtResource("2_txb03")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.257933, 0.406555, 0)
initial_impulse = Vector3(0, 10, 0)
[node name="present5" parent="." instance=ExtResource("2_txb03")]
initial_impulse = Vector3(0, 10, 0)
[node name="present6" parent="." instance=ExtResource("2_txb03")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.277298, 0.409284, 0)
initial_impulse = Vector3(0, 10, 0)
[node name="present7" parent="." instance=ExtResource("2_txb03")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.0104459, 0.887262, 0)
initial_impulse = Vector3(0, 10, 0)
[node name="grape" parent="." instance=ExtResource("3_riaai")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.00224, 0.990632)
initial_impulse = Vector3(0, 0, -5)

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://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" path="res://cake.tscn" id="5_udc7s"]
[ext_resource type="PackedScene" uid="uid://cx4ohbn84hmc3" 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" path="res://Objects/balloon/balloon2.tscn" id="12_f4vmr"]
[ext_resource type="PackedScene" uid="uid://db3h7pscfif84" path="res://Objects/balloon/balloon2.tscn" id="12_f4vmr"]
[ext_resource type="PackedScene" uid="uid://y0mo5gxmd08q" path="res://Objects/present/present.tscn" id="13_g3ygw"]
[sub_resource type="Gradient" id="Gradient_iyif7"]