From 6161ca3dce6d80b7a8b72feb68cc9239b00ce65a Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Sat, 2 Apr 2022 21:20:43 +0200 Subject: [PATCH] :wrench: Move Fire Sprite to its own node --- src/Fire.gd | 2 +- src/Fire.tscn | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Fire.gd b/src/Fire.gd index ce4e67e..a3978cb 100644 --- a/src/Fire.gd +++ b/src/Fire.gd @@ -1,4 +1,4 @@ -extends Sprite +extends Node2D export var intensity: float = 0.5 setget set_intensity diff --git a/src/Fire.tscn b/src/Fire.tscn index b064e4c..4d05bf8 100644 --- a/src/Fire.tscn +++ b/src/Fire.tscn @@ -7,8 +7,7 @@ [sub_resource type="RectangleShape2D" id=1] extents = Vector2( 16, 16 ) -[node name="Fire" type="Sprite"] -texture = ExtResource( 2 ) +[node name="Fire" type="Node2D"] script = ExtResource( 3 ) [node name="Light" type="Light2D" parent="."] @@ -20,3 +19,6 @@ color = Color( 1, 0.592157, 0.592157, 1 ) [node name="Shape" type="CollisionShape2D" parent="Body"] shape = SubResource( 1 ) + +[node name="Sprite" type="Sprite" parent="."] +texture = ExtResource( 2 )