mirror of
https://github.com/RYGhub/the-cold-night.git
synced 2024-11-24 21:54:18 +00:00
🔧 Animate the fire
This commit is contained in:
parent
93f1a398d8
commit
88d541b0e7
1 changed files with 32 additions and 4 deletions
|
@ -1,9 +1,20 @@
|
||||||
[gd_scene load_steps=8 format=2]
|
[gd_scene load_steps=20 format=2]
|
||||||
|
|
||||||
[ext_resource path="res://src/mechanics/Light.png" type="Texture" id=1]
|
[ext_resource path="res://src/mechanics/Light.png" type="Texture" id=1]
|
||||||
[ext_resource path="res://src/entities/fire/FirePit.png" type="Texture" id=2]
|
[ext_resource path="res://src/entities/fire/FirePit.png" type="Texture" id=2]
|
||||||
[ext_resource path="res://src/entities/fire/Fire.gd" type="Script" id=3]
|
[ext_resource path="res://src/entities/fire/Fire.gd" type="Script" id=3]
|
||||||
[ext_resource path="res://src/entities/fire/FireFlame.png" type="Texture" id=4]
|
[ext_resource path="res://src/entities/fire/Fire-v1-f0006.png" type="Texture" id=4]
|
||||||
|
[ext_resource path="res://src/entities/fire/Fire-v2-f0006.png" type="Texture" id=5]
|
||||||
|
[ext_resource path="res://src/entities/fire/Fire-v2-f0008.png" type="Texture" id=6]
|
||||||
|
[ext_resource path="res://src/entities/fire/Fire-v1-f0000.png" type="Texture" id=7]
|
||||||
|
[ext_resource path="res://src/entities/fire/Fire-v1-f0002.png" type="Texture" id=8]
|
||||||
|
[ext_resource path="res://src/entities/fire/Fire-v2-f0002.png" type="Texture" id=9]
|
||||||
|
[ext_resource path="res://src/entities/fire/Fire-v2-f0000.png" type="Texture" id=10]
|
||||||
|
[ext_resource path="res://src/entities/fire/Fire-v1-f0004.png" type="Texture" id=11]
|
||||||
|
[ext_resource path="res://src/entities/fire/Fire-v1-f0010.png" type="Texture" id=12]
|
||||||
|
[ext_resource path="res://src/entities/fire/Fire-v2-f0004.png" type="Texture" id=13]
|
||||||
|
[ext_resource path="res://src/entities/fire/Fire-v2-f0010.png" type="Texture" id=14]
|
||||||
|
[ext_resource path="res://src/entities/fire/Fire-v1-f0008.png" type="Texture" id=15]
|
||||||
|
|
||||||
[sub_resource type="CapsuleShape2D" id=1]
|
[sub_resource type="CapsuleShape2D" id=1]
|
||||||
radius = 20.0
|
radius = 20.0
|
||||||
|
@ -15,8 +26,22 @@ radius = 14.0
|
||||||
[sub_resource type="CanvasItemMaterial" id=2]
|
[sub_resource type="CanvasItemMaterial" id=2]
|
||||||
blend_mode = 1
|
blend_mode = 1
|
||||||
|
|
||||||
|
[sub_resource type="SpriteFrames" id=4]
|
||||||
|
animations = [ {
|
||||||
|
"frames": [ ExtResource( 10 ), ExtResource( 9 ), ExtResource( 13 ), ExtResource( 5 ), ExtResource( 6 ), ExtResource( 14 ) ],
|
||||||
|
"loop": true,
|
||||||
|
"name": "v2",
|
||||||
|
"speed": 5.0
|
||||||
|
}, {
|
||||||
|
"frames": [ ExtResource( 7 ), ExtResource( 8 ), ExtResource( 11 ), ExtResource( 4 ), ExtResource( 15 ), ExtResource( 12 ) ],
|
||||||
|
"loop": true,
|
||||||
|
"name": "v1",
|
||||||
|
"speed": 5.0
|
||||||
|
} ]
|
||||||
|
|
||||||
[node name="Fire" type="Node2D"]
|
[node name="Fire" type="Node2D"]
|
||||||
script = ExtResource( 3 )
|
script = ExtResource( 3 )
|
||||||
|
intensity = 1.0
|
||||||
|
|
||||||
[node name="Firepit" type="StaticBody2D" parent="."]
|
[node name="Firepit" type="StaticBody2D" parent="."]
|
||||||
|
|
||||||
|
@ -41,9 +66,12 @@ color = Color( 1, 0.792157, 0.392157, 1 )
|
||||||
position = Vector2( 0, -20 )
|
position = Vector2( 0, -20 )
|
||||||
shape = SubResource( 3 )
|
shape = SubResource( 3 )
|
||||||
|
|
||||||
[node name="FlameSprite" type="Sprite" parent="Flame/Shape"]
|
[node name="FlameSprite" type="AnimatedSprite" parent="Flame/Shape"]
|
||||||
material = SubResource( 2 )
|
material = SubResource( 2 )
|
||||||
z_index = 1
|
z_index = 1
|
||||||
texture = ExtResource( 4 )
|
frames = SubResource( 4 )
|
||||||
|
animation = "v1"
|
||||||
|
frame = 5
|
||||||
|
playing = true
|
||||||
|
|
||||||
[connection signal="body_entered" from="Flame" to="." method="_on_Flame_body_entered"]
|
[connection signal="body_entered" from="Flame" to="." method="_on_Flame_body_entered"]
|
||||||
|
|
Loading…
Reference in a new issue