Files
hsgj25-growth/growth/virus.tscn
2025-10-04 16:58:01 +02:00

60 lines
1.6 KiB
Plaintext

[gd_scene load_steps=7 format=3 uid="uid://bsv3h2lpv7h77"]
[ext_resource type="Script" uid="uid://bwhxwf77egesx" path="res://virus.gd" id="1_5nuwd"]
[ext_resource type="Texture2D" uid="uid://c764pu231ki6l" path="res://icon.svg" id="2_ifgnm"]
[sub_resource type="Shader" id="Shader_8v58v"]
code = "shader_type canvas_item;
void vertex() {
// Called for every vertex the material is visible on.
}
void fragment() {
COLOR.r = 1.0;
}
//void light() {
// // Called for every pixel for every light affecting the CanvasItem.
// // Uncomment to replace the default light processing function with this one.
//}
"
[sub_resource type="ShaderMaterial" id="ShaderMaterial_8fg0l"]
shader = SubResource("Shader_8v58v")
[sub_resource type="SpriteFrames" id="SpriteFrames_1xnis"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": ExtResource("2_ifgnm")
}],
"loop": true,
"name": &"default",
"speed": 5.0
}]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_ifgnm"]
size = Vector2(128, 128)
[node name="Virus" type="Node2D"]
script = ExtResource("1_5nuwd")
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
material = SubResource("ShaderMaterial_8fg0l")
sprite_frames = SubResource("SpriteFrames_1xnis")
[node name="Area2D" type="Area2D" parent="."]
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
shape = SubResource("RectangleShape2D_ifgnm")
[node name="RayCast2D" type="RayCast2D" parent="."]
[node name="SpawningTime" type="Timer" parent="."]
editor_description = "How long to mature from Spawning to Spawned"
one_shot = true
autostart = true
[connection signal="timeout" from="SpawningTime" to="." method="_on_mature"]