Timescalable components
This commit is contained in:
parent
df940e2ba6
commit
e527d1da44
11 changed files with 83 additions and 24 deletions
|
|
@ -1,9 +1,10 @@
|
|||
[gd_scene load_steps=20 format=3 uid="uid://bw1w8jp0yeypy"]
|
||||
[gd_scene load_steps=21 format=3 uid="uid://bw1w8jp0yeypy"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://b1hjjbdwf1rtc" path="res://scenes/templates/plant_template.tscn" id="1_n25yi"]
|
||||
[ext_resource type="Texture2D" uid="uid://b6tyoa5htapir" path="res://assets/sprites/atlases/plants/aloe.png" id="2_iup5p"]
|
||||
[ext_resource type="AnimationLibrary" uid="uid://bgutjc3ruq27s" path="res://resources/animations/plants/aloe.res" id="3_3sp3b"]
|
||||
[ext_resource type="Script" uid="uid://cljytsmqac0w7" path="res://scripts/components/plants/behaviours/AloeBehaviour.cs" id="4_55asm"]
|
||||
[ext_resource type="Script" uid="uid://c4jy0cnbnx33h" path="res://scripts/components/TimeScalableTimer.cs" id="5_gfy6j"]
|
||||
|
||||
[sub_resource type="Animation" id="Animation_vknky"]
|
||||
length = 0.001
|
||||
|
|
@ -118,9 +119,11 @@ parameters/Tree/conditions/heal = false
|
|||
script = ExtResource("4_55asm")
|
||||
_hpTreshold = 0.33
|
||||
|
||||
[node name="Timer" type="Timer" parent="Behaviour" index="0"]
|
||||
[node name="Timer" type="Timer" parent="Behaviour" index="0" node_paths=PackedStringArray("entity")]
|
||||
wait_time = 20.0
|
||||
one_shot = true
|
||||
script = ExtResource("5_gfy6j")
|
||||
entity = NodePath("../..")
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox" index="0"]
|
||||
shape = SubResource("RectangleShape2D_oe0dc")
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=23 format=3 uid="uid://dy41q1kxray5t"]
|
||||
[gd_scene load_steps=24 format=3 uid="uid://dy41q1kxray5t"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://b1hjjbdwf1rtc" path="res://scenes/templates/plant_template.tscn" id="1_pyk3o"]
|
||||
[ext_resource type="Texture2D" uid="uid://cksryh4w5dbbx" path="res://assets/sprites/atlases/plants/peashooter.png" id="2_14qlx"]
|
||||
|
|
@ -6,6 +6,7 @@
|
|||
[ext_resource type="Script" uid="uid://ceprqkraw3v6m" path="res://scripts/components/plants/Shooter.cs" id="3_a4ew1"]
|
||||
[ext_resource type="PackedScene" uid="uid://b2hrv0aqbui7u" path="res://scenes/projectiles/pea.tscn" id="4_saxds"]
|
||||
[ext_resource type="Script" uid="uid://bdk5iqtw4xbkl" path="res://scripts/components/plants/behaviours/PeashooterBehaviour.cs" id="5_7qiua"]
|
||||
[ext_resource type="Script" uid="uid://c4jy0cnbnx33h" path="res://scripts/components/TimeScalableTimer.cs" id="6_q58jr"]
|
||||
[ext_resource type="Script" uid="uid://dn53jvpjyg63l" path="res://scripts/components/plants/Eyesight.cs" id="7_2bki8"]
|
||||
[ext_resource type="Script" uid="uid://hccb0aee0x0o" path="res://scripts/components/plants/PlantEyesightLimiter.cs" id="8_nl4jc"]
|
||||
[ext_resource type="Script" uid="uid://c36bj8u7jghc7" path="res://scripts/audio/ChannelPlayer.cs" id="9_mbbd7"]
|
||||
|
|
@ -97,9 +98,11 @@ script = ExtResource("3_a4ew1")
|
|||
_projectile = ExtResource("4_saxds")
|
||||
_timer = NodePath("Timer")
|
||||
|
||||
[node name="Timer" type="Timer" parent="Shooter" index="0"]
|
||||
[node name="Timer" type="Timer" parent="Shooter" index="0" node_paths=PackedStringArray("entity")]
|
||||
wait_time = 1.5
|
||||
one_shot = true
|
||||
script = ExtResource("6_q58jr")
|
||||
entity = NodePath("../..")
|
||||
|
||||
[node name="Behaviour" type="Node" parent="." index="4" node_paths=PackedStringArray("_shootTimer", "_sight")]
|
||||
script = ExtResource("5_7qiua")
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=26 format=3 uid="uid://b5x35v3w2u8dx"]
|
||||
[gd_scene load_steps=27 format=3 uid="uid://b5x35v3w2u8dx"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://b1hjjbdwf1rtc" path="res://scenes/templates/plant_template.tscn" id="1_dj7ul"]
|
||||
[ext_resource type="Texture2D" uid="uid://c77o6ba0mw7a3" path="res://assets/sprites/atlases/plants/potato_mine.png" id="2_sneas"]
|
||||
|
|
@ -8,6 +8,7 @@
|
|||
[ext_resource type="PackedScene" uid="uid://ckanq33rao1ur" path="res://scenes/particles/potato_explosion.tscn" id="5_px4r0"]
|
||||
[ext_resource type="Script" uid="uid://c36bj8u7jghc7" path="res://scripts/audio/ChannelPlayer.cs" id="7_b1j2f"]
|
||||
[ext_resource type="AudioStream" uid="uid://dltjtpyfr1so0" path="res://assets/audio/sfx/potato_mine.mp3" id="8_3vqdc"]
|
||||
[ext_resource type="Script" uid="uid://c4jy0cnbnx33h" path="res://scripts/components/TimeScalableTimer.cs" id="8_824aq"]
|
||||
[ext_resource type="AudioStream" uid="uid://b27om1bw1x04e" path="res://assets/audio/sfx/dirt_rise.mp3" id="9_3vqdc"]
|
||||
|
||||
[sub_resource type="AnimationNodeTimeScale" id="AnimationNodeTimeScale_3vqdc"]
|
||||
|
|
@ -58,7 +59,6 @@ transitions = ["Start", "potato_mine_idle_unprimed", SubResource("AnimationNodeS
|
|||
graph_offset = Vector2(-16.3438, -67.832)
|
||||
|
||||
[sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_824aq"]
|
||||
graph_offset = Vector2(-427, 79)
|
||||
nodes/TimeScale/node = SubResource("AnimationNodeTimeScale_3vqdc")
|
||||
nodes/TimeScale/position = Vector2(100, 120)
|
||||
nodes/Tree/node = SubResource("AnimationNodeStateMachine_nfn7b")
|
||||
|
|
@ -84,7 +84,7 @@ MaxHP = 20.0
|
|||
texture = ExtResource("2_sneas")
|
||||
hframes = 7
|
||||
vframes = 4
|
||||
frame = 14
|
||||
frame = 7
|
||||
|
||||
[node name="AnimationPlayer" parent="." index="1"]
|
||||
libraries = {
|
||||
|
|
@ -123,10 +123,12 @@ audioStream = ExtResource("8_3vqdc")
|
|||
channel = "explosion"
|
||||
metadata/_custom_type_script = "uid://c36bj8u7jghc7"
|
||||
|
||||
[node name="PrimeTimer" type="Timer" parent="." index="5"]
|
||||
[node name="PrimeTimer" type="Timer" parent="." index="5" node_paths=PackedStringArray("entity")]
|
||||
wait_time = 15.0
|
||||
one_shot = true
|
||||
autostart = true
|
||||
script = ExtResource("8_824aq")
|
||||
entity = NodePath("..")
|
||||
|
||||
[node name="Behaviour" type="Node" parent="." index="6" node_paths=PackedStringArray("_hitbox", "_unprimedShape", "_primedShape")]
|
||||
script = ExtResource("4_twx65")
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=18 format=3 uid="uid://bg7lomiorxo2c"]
|
||||
[gd_scene load_steps=19 format=3 uid="uid://bg7lomiorxo2c"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://b1hjjbdwf1rtc" path="res://scenes/templates/plant_template.tscn" id="1_bikjn"]
|
||||
[ext_resource type="Texture2D" uid="uid://b3tuidu8dag8u" path="res://assets/sprites/atlases/plants/sunflower.png" id="2_fwcda"]
|
||||
|
|
@ -6,6 +6,7 @@
|
|||
[ext_resource type="Script" uid="uid://b71gebny84s81" path="res://scripts/components/plants/PlantSunSpawner.cs" id="3_te0pl"]
|
||||
[ext_resource type="PackedScene" uid="uid://bpekho7leatr5" path="res://scenes/sun.tscn" id="4_b8hls"]
|
||||
[ext_resource type="Script" uid="uid://bth7gah4tn7uj" path="res://scripts/components/plants/behaviours/SunflowerBehaviour.cs" id="5_26je0"]
|
||||
[ext_resource type="Script" uid="uid://c4jy0cnbnx33h" path="res://scripts/components/TimeScalableTimer.cs" id="7_rlkb7"]
|
||||
|
||||
[sub_resource type="Animation" id="Animation_bfx6v"]
|
||||
length = 0.001
|
||||
|
|
@ -92,13 +93,17 @@ _amountPerSun = 25
|
|||
[node name="Behaviour" type="Node" parent="." index="4"]
|
||||
script = ExtResource("5_26je0")
|
||||
|
||||
[node name="Timer" type="Timer" parent="Behaviour" index="0"]
|
||||
[node name="Timer" type="Timer" parent="Behaviour" index="0" node_paths=PackedStringArray("entity")]
|
||||
wait_time = 24.25
|
||||
script = ExtResource("7_rlkb7")
|
||||
entity = NodePath("../..")
|
||||
|
||||
[node name="StartTimer" type="Timer" parent="Behaviour" index="1"]
|
||||
[node name="StartTimer" type="Timer" parent="Behaviour" index="1" node_paths=PackedStringArray("entity")]
|
||||
wait_time = 12.0
|
||||
one_shot = true
|
||||
autostart = true
|
||||
script = ExtResource("7_rlkb7")
|
||||
entity = NodePath("../..")
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox" index="0"]
|
||||
position = Vector2(0, 4)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue