mirror of
https://github.com/RYGhub/the-cold-night.git
synced 2024-11-25 06:04:19 +00:00
💥 Improve Fire
significantly
This commit is contained in:
parent
4276205c3a
commit
04ea003b6d
10 changed files with 46 additions and 33 deletions
|
@ -1,22 +0,0 @@
|
|||
[gd_scene load_steps=5 format=2]
|
||||
|
||||
[ext_resource path="res://src/mechanics/Light.png" type="Texture" id=1]
|
||||
[ext_resource path="res://src/mechanics/White.png" type="Texture" id=2]
|
||||
[ext_resource path="res://src/entities/Fire.gd" type="Script" id=3]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=1]
|
||||
extents = Vector2( 16, 16 )
|
||||
|
||||
[node name="Fire" type="StaticBody2D"]
|
||||
script = ExtResource( 3 )
|
||||
|
||||
[node name="Shape" type="CollisionShape2D" parent="."]
|
||||
shape = SubResource( 1 )
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="Shape"]
|
||||
texture = ExtResource( 2 )
|
||||
|
||||
[node name="Light" type="Light2D" parent="."]
|
||||
texture = ExtResource( 1 )
|
||||
texture_scale = 0.5
|
||||
color = Color( 1, 0.592157, 0.592157, 1 )
|
|
@ -18,7 +18,7 @@ signal intensity_reached_max
|
|||
func set_intensity(value):
|
||||
intensity = clamp(value, min_intensity, max_intensity)
|
||||
# Update everything that needs to be updated when the intensity changes
|
||||
$Light.texture_scale = value
|
||||
$Light.scale = Vector2(value, value)
|
||||
# Trigger signals
|
||||
emit_signal("intensity_changed", intensity)
|
||||
# max intensity signal
|
35
src/entities/fire/Fire.tscn
Normal file
35
src/entities/fire/Fire.tscn
Normal file
|
@ -0,0 +1,35 @@
|
|||
[gd_scene load_steps=7 format=2]
|
||||
|
||||
[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/Fire.gd" type="Script" id=3]
|
||||
[ext_resource path="res://src/entities/fire/FireFlame.png" type="Texture" id=4]
|
||||
|
||||
[sub_resource type="CapsuleShape2D" id=1]
|
||||
radius = 20.0
|
||||
height = 10.0
|
||||
|
||||
[sub_resource type="CanvasItemMaterial" id=2]
|
||||
blend_mode = 1
|
||||
|
||||
[node name="Fire" type="StaticBody2D"]
|
||||
script = ExtResource( 3 )
|
||||
|
||||
[node name="Shape" type="CollisionShape2D" parent="."]
|
||||
rotation = 1.5708
|
||||
shape = SubResource( 1 )
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="Shape"]
|
||||
rotation = -1.5708
|
||||
texture = ExtResource( 2 )
|
||||
|
||||
[node name="Light" type="Light2D" parent="."]
|
||||
texture = ExtResource( 1 )
|
||||
texture_scale = 0.5
|
||||
color = Color( 1, 0.607843, 0, 1 )
|
||||
|
||||
[node name="FlameSprite" type="Sprite" parent="Light"]
|
||||
material = SubResource( 2 )
|
||||
z_index = 1
|
||||
texture = ExtResource( 4 )
|
||||
offset = Vector2( 0, -20 )
|
|
@ -2,15 +2,15 @@
|
|||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/FireConcept.png-78e15c8363ed2ec1d29d99bca93f7c94.stex"
|
||||
path="res://.import/FireConcept.png-114933ab8aa79dd6fc3e46d793f2cacc.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://src/entities/FireConcept.png"
|
||||
dest_files=[ "res://.import/FireConcept.png-78e15c8363ed2ec1d29d99bca93f7c94.stex" ]
|
||||
source_file="res://src/entities/fire/FireConcept.png"
|
||||
dest_files=[ "res://.import/FireConcept.png-114933ab8aa79dd6fc3e46d793f2cacc.stex" ]
|
||||
|
||||
[params]
|
||||
|
|
@ -2,15 +2,15 @@
|
|||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/FireFlame.png-283ff91e5929cfb0390e695fe6fed3c7.stex"
|
||||
path="res://.import/FireFlame.png-7fced22da2a25087c1e84afb4e3fc0d5.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://src/entities/FireFlame.png"
|
||||
dest_files=[ "res://.import/FireFlame.png-283ff91e5929cfb0390e695fe6fed3c7.stex" ]
|
||||
source_file="res://src/entities/fire/FireFlame.png"
|
||||
dest_files=[ "res://.import/FireFlame.png-7fced22da2a25087c1e84afb4e3fc0d5.stex" ]
|
||||
|
||||
[params]
|
||||
|
|
@ -2,15 +2,15 @@
|
|||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/FirePit.png-ce1f95a9db5ce9d6bc65c2861c968bb8.stex"
|
||||
path="res://.import/FirePit.png-db9b6d2c86b1e6c12b4fd62d55729693.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://src/entities/FirePit.png"
|
||||
dest_files=[ "res://.import/FirePit.png-ce1f95a9db5ce9d6bc65c2861c968bb8.stex" ]
|
||||
source_file="res://src/entities/fire/FirePit.png"
|
||||
dest_files=[ "res://.import/FirePit.png-db9b6d2c86b1e6c12b4fd62d55729693.stex" ]
|
||||
|
||||
[params]
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
[ext_resource path="res://src/mechanics/Background.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://src/mechanics/Darkness.tscn" type="PackedScene" id=2]
|
||||
[ext_resource path="res://src/entities/Fire.tscn" type="PackedScene" id=3]
|
||||
[ext_resource path="res://src/entities/fire/Fire.tscn" type="PackedScene" id=3]
|
||||
[ext_resource path="res://src/entities/players/PhaseOnePlayer.tscn" type="PackedScene" id=4]
|
||||
[ext_resource path="res://src/mechanics/RNG.tscn" type="PackedScene" id=5]
|
||||
[ext_resource path="res://src/levels/Game.gd" type="Script" id=6]
|
||||
|
|
Loading…
Reference in a new issue