Compare commits

..

5 Commits

27 changed files with 615 additions and 145 deletions

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 743 B

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://c1garalf1clsp"
path="res://.godot/imported/flame-large.png-41b172a8bfc9c186ab97a98ae0c5a459.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Assets/Sprites/Misc/flame-large.png"
dest_files=["res://.godot/imported/flame-large.png-41b172a8bfc9c186ab97a98ae0c5a459.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 B

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bitpf645g0prl"
path="res://.godot/imported/torch-base.png-d14e78df3788bf6d3a9565b574d6c1a1.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Assets/Sprites/Misc/torch-base.png"
dest_files=["res://.godot/imported/torch-base.png-d14e78df3788bf6d3a9565b574d6c1a1.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 379 B

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cyfyelyq3o15s"
path="res://.godot/imported/torch-fire.png-a9f51cf7273c726b68014cb26a31d54c.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Assets/Sprites/Misc/torch-fire.png"
dest_files=["res://.godot/imported/torch-fire.png-a9f51cf7273c726b68014cb26a31d54c.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 379 B

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://i5ksh8i0q48o"
path="res://.godot/imported/torch-lamp-base-back.png-a6c17eff02f04f493c4e495a2d662d5a.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Assets/Sprites/Misc/torch-lamp-base-back.png"
dest_files=["res://.godot/imported/torch-lamp-base-back.png-a6c17eff02f04f493c4e495a2d662d5a.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 416 B

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://ca0htndnsb38k"
path="res://.godot/imported/torch-lamp-base.png-03b38ecb41ff35cadec5aeaad2c98e38.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Assets/Sprites/Misc/torch-lamp-base.png"
dest_files=["res://.godot/imported/torch-lamp-base.png-03b38ecb41ff35cadec5aeaad2c98e38.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

View File

@ -0,0 +1,70 @@
using Godot;
using System.Linq;
using System.Collections.Generic;
namespace SupaLidlGame.BoundingBoxes;
public partial class OcclusionTrigger : Area2D
{
[Export]
public double FadeDuration { get; set; }
[Export]
public Godot.Collections.Array<string> Groups { get; set; }
private Tween _tween = null;
public override void _Ready()
{
Connect(SignalName.BodyEntered, new Callable(this, nameof(OnBodyEntered)));
Connect(SignalName.BodyExited, new Callable(this, nameof(OnBodyExited)));
}
private IEnumerable<CanvasItem> GetCanvasItems()
{
IEnumerable<IEnumerable<CanvasItem>> pack()
{
foreach (string group in Groups)
{
var nodes = GetTree().GetNodesInGroup(group)
.OfType<CanvasItem>();
yield return nodes;
}
}
return pack().SelectMany(e => e);
}
private void OnBodyEntered(Node2D _)
{
if (IsInstanceValid(_tween))
{
_tween.Kill();
}
_tween = GetTree().CreateTween();
_tween.SetParallel();
foreach (var node in GetCanvasItems())
{
_tween.TweenProperty(node, "modulate", Colors.Transparent, FadeDuration);
}
}
private void OnBodyExited(Node2D _)
{
if (IsInstanceValid(_tween))
{
_tween.Kill();
}
_tween = GetTree().CreateTween();
_tween.SetParallel();
foreach (var node in GetCanvasItems())
{
_tween.TweenProperty(node, "modulate", Colors.White, FadeDuration);
}
}
}

View File

@ -17,11 +17,9 @@ gradient = SubResource("Gradient_uqfn8")
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_yg5po"] [sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_yg5po"]
particle_flag_disable_z = true particle_flag_disable_z = true
direction = Vector3(-1, 0, 0) direction = Vector3(-1, 0, 0)
gravity = Vector3(0, 0, 0)
initial_velocity_min = 4.0 initial_velocity_min = 4.0
initial_velocity_max = 8.0 initial_velocity_max = 8.0
orbit_velocity_min = 0.0 gravity = Vector3(0, 0, 0)
orbit_velocity_max = 0.0
scale_min = 2.0 scale_min = 2.0
scale_max = 2.0 scale_max = 2.0
color_ramp = SubResource("GradientTexture1D_te0n4") color_ramp = SubResource("GradientTexture1D_te0n4")
@ -41,6 +39,7 @@ texture = ExtResource("1_0im1r")
centered = false centered = false
[node name="Hitbox" parent="." instance=ExtResource("3_f4lib")] [node name="Hitbox" parent="." instance=ExtResource("3_f4lib")]
priority = 5
[node name="CollisionShape2D" parent="Hitbox" index="0"] [node name="CollisionShape2D" parent="Hitbox" index="0"]
position = Vector2(0, -0.5) position = Vector2(0, -0.5)

View File

@ -85,7 +85,7 @@ tracks/2/keys = {
"times": PackedFloat32Array(0, 0.7), "times": PackedFloat32Array(0, 0.7),
"transitions": PackedFloat32Array(1, 1), "transitions": PackedFloat32Array(1, 1),
"update": 0, "update": 0,
"values": [0.5, 0.0] "values": [1.0, 0.0]
} }
[sub_resource type="AnimationLibrary" id="AnimationLibrary_g3m4l"] [sub_resource type="AnimationLibrary" id="AnimationLibrary_g3m4l"]
@ -105,6 +105,7 @@ ProjectileName = "Lightning"
Hitbox = NodePath("Hitbox") Hitbox = NodePath("Hitbox")
[node name="Sprite2D" type="Sprite2D" parent="."] [node name="Sprite2D" type="Sprite2D" parent="."]
modulate = Color(4, 4, 4, 1)
material = SubResource("CanvasItemMaterial_3bsa7") material = SubResource("CanvasItemMaterial_3bsa7")
position = Vector2(0, 8) position = Vector2(0, 8)
texture = ExtResource("1_bf8ae") texture = ExtResource("1_bf8ae")
@ -119,6 +120,7 @@ libraries = {
[node name="Hitbox" parent="." instance=ExtResource("3_vlt1v")] [node name="Hitbox" parent="." instance=ExtResource("3_vlt1v")]
collision_layer = 0 collision_layer = 0
priority = 5
Damage = 20.0 Damage = 20.0
[node name="CollisionShape2D" parent="Hitbox" index="0"] [node name="CollisionShape2D" parent="Hitbox" index="0"]

View File

@ -1,59 +1,60 @@
[gd_scene load_steps=12 format=3 uid="uid://c1w7t6irnohfx"] [gd_scene load_steps=13 format=3 uid="uid://c1w7t6irnohfx"]
[ext_resource type="Texture2D" uid="uid://har1bd5u4dq3" path="res://Assets/Sprites/Misc/torch.png" id="1_14bgb"] [ext_resource type="Texture2D" uid="uid://cyfyelyq3o15s" path="res://Assets/Sprites/Misc/torch-fire.png" id="1_gnoxc"]
[ext_resource type="Texture2D" uid="uid://bitpf645g0prl" path="res://Assets/Sprites/Misc/torch-base.png" id="2_cwgtj"]
[ext_resource type="Texture2D" uid="uid://coarr28adgo1u" path="res://Assets/Sprites/Particles/point-light.png" id="2_hotvd"] [ext_resource type="Texture2D" uid="uid://coarr28adgo1u" path="res://Assets/Sprites/Particles/point-light.png" id="2_hotvd"]
[sub_resource type="AtlasTexture" id="AtlasTexture_js1l1"] [sub_resource type="AtlasTexture" id="AtlasTexture_vnjya"]
atlas = ExtResource("1_14bgb") atlas = ExtResource("1_gnoxc")
region = Rect2(0, 0, 8, 12) region = Rect2(0, 0, 8, 8)
[sub_resource type="AtlasTexture" id="AtlasTexture_gdxtl"] [sub_resource type="AtlasTexture" id="AtlasTexture_l2emm"]
atlas = ExtResource("1_14bgb") atlas = ExtResource("1_gnoxc")
region = Rect2(8, 0, 8, 12) region = Rect2(8, 0, 8, 8)
[sub_resource type="AtlasTexture" id="AtlasTexture_da7fw"] [sub_resource type="AtlasTexture" id="AtlasTexture_03weu"]
atlas = ExtResource("1_14bgb") atlas = ExtResource("1_gnoxc")
region = Rect2(16, 0, 8, 12) region = Rect2(16, 0, 8, 8)
[sub_resource type="AtlasTexture" id="AtlasTexture_rpccx"] [sub_resource type="AtlasTexture" id="AtlasTexture_1fqw1"]
atlas = ExtResource("1_14bgb") atlas = ExtResource("1_gnoxc")
region = Rect2(24, 0, 8, 12) region = Rect2(24, 0, 8, 8)
[sub_resource type="AtlasTexture" id="AtlasTexture_crwu1"] [sub_resource type="AtlasTexture" id="AtlasTexture_sj1bi"]
atlas = ExtResource("1_14bgb") atlas = ExtResource("1_gnoxc")
region = Rect2(32, 0, 8, 12) region = Rect2(32, 0, 8, 8)
[sub_resource type="AtlasTexture" id="AtlasTexture_r3kxc"] [sub_resource type="AtlasTexture" id="AtlasTexture_1xpxx"]
atlas = ExtResource("1_14bgb") atlas = ExtResource("1_gnoxc")
region = Rect2(40, 0, 8, 12) region = Rect2(40, 0, 8, 8)
[sub_resource type="AtlasTexture" id="AtlasTexture_225la"] [sub_resource type="AtlasTexture" id="AtlasTexture_dxfgw"]
atlas = ExtResource("1_14bgb") atlas = ExtResource("1_gnoxc")
region = Rect2(48, 0, 8, 12) region = Rect2(48, 0, 8, 8)
[sub_resource type="SpriteFrames" id="SpriteFrames_gf7ku"] [sub_resource type="SpriteFrames" id="SpriteFrames_gf7ku"]
animations = [{ animations = [{
"frames": [{ "frames": [{
"duration": 1.0, "duration": 1.0,
"texture": SubResource("AtlasTexture_js1l1") "texture": SubResource("AtlasTexture_vnjya")
}, { }, {
"duration": 1.0, "duration": 1.0,
"texture": SubResource("AtlasTexture_gdxtl") "texture": SubResource("AtlasTexture_l2emm")
}, { }, {
"duration": 1.0, "duration": 1.0,
"texture": SubResource("AtlasTexture_da7fw") "texture": SubResource("AtlasTexture_03weu")
}, { }, {
"duration": 1.0, "duration": 1.0,
"texture": SubResource("AtlasTexture_rpccx") "texture": SubResource("AtlasTexture_1fqw1")
}, { }, {
"duration": 1.0, "duration": 1.0,
"texture": SubResource("AtlasTexture_crwu1") "texture": SubResource("AtlasTexture_sj1bi")
}, { }, {
"duration": 1.0, "duration": 1.0,
"texture": SubResource("AtlasTexture_r3kxc") "texture": SubResource("AtlasTexture_1xpxx")
}, { }, {
"duration": 1.0, "duration": 1.0,
"texture": SubResource("AtlasTexture_225la") "texture": SubResource("AtlasTexture_dxfgw")
}], }],
"loop": true, "loop": true,
"name": &"default", "name": &"default",
@ -64,19 +65,28 @@ animations = [{
radius = 4.0 radius = 4.0
[node name="Torch" type="Node2D"] [node name="Torch" type="Node2D"]
y_sort_enabled = true
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."] [node name="Sprites" type="Node2D" parent="."]
texture_filter = 1
position = Vector2(0, -10) [node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="Sprites"]
modulate = Color(3.5, 3.5, 3, 1)
position = Vector2(0, -14)
sprite_frames = SubResource("SpriteFrames_gf7ku") sprite_frames = SubResource("SpriteFrames_gf7ku")
autoplay = "default" autoplay = "default"
frame_progress = 0.337799 frame_progress = 0.337799
[node name="Sprite2D" type="Sprite2D" parent="Sprites"]
position = Vector2(0, -8)
texture = ExtResource("2_cwgtj")
[node name="PointLight2D" type="PointLight2D" parent="."] [node name="PointLight2D" type="PointLight2D" parent="."]
color = Color(1, 0.811765, 0.537255, 1) color = Color(1, 0.811765, 0.537255, 1)
energy = 1.2
blend_mode = 2 blend_mode = 2
shadow_enabled = true shadow_enabled = true
shadow_filter_smooth = 3.0 shadow_filter_smooth = 3.0
shadow_item_cull_mask = 8
texture = ExtResource("2_hotvd") texture = ExtResource("2_hotvd")
offset = Vector2(0, 2) offset = Vector2(0, 2)
texture_scale = 0.25 texture_scale = 0.25

View File

@ -1,94 +1,96 @@
[gd_scene load_steps=16 format=3 uid="uid://ceadk7pam7vab"] [gd_scene load_steps=18 format=3 uid="uid://ceadk7pam7vab"]
[ext_resource type="Texture2D" uid="uid://cyldr0ck3yfrp" path="res://Assets/Sprites/Misc/torch-lamp.png" id="1_dlkl0"]
[ext_resource type="Texture2D" uid="uid://coarr28adgo1u" path="res://Assets/Sprites/Particles/point-light.png" id="2_0xpf8"] [ext_resource type="Texture2D" uid="uid://coarr28adgo1u" path="res://Assets/Sprites/Particles/point-light.png" id="2_0xpf8"]
[ext_resource type="Texture2D" uid="uid://c1garalf1clsp" path="res://Assets/Sprites/Misc/flame-large.png" id="2_a6lwn"]
[ext_resource type="Texture2D" uid="uid://ca0htndnsb38k" path="res://Assets/Sprites/Misc/torch-lamp-base.png" id="2_bq1kw"]
[ext_resource type="Texture2D" uid="uid://i5ksh8i0q48o" path="res://Assets/Sprites/Misc/torch-lamp-base-back.png" id="3_vh465"]
[sub_resource type="AtlasTexture" id="AtlasTexture_ikvnd"] [sub_resource type="AtlasTexture" id="AtlasTexture_dtmd3"]
atlas = ExtResource("1_dlkl0") atlas = ExtResource("2_a6lwn")
region = Rect2(0, 0, 12, 24) region = Rect2(0, 0, 12, 14)
[sub_resource type="AtlasTexture" id="AtlasTexture_b7wal"] [sub_resource type="AtlasTexture" id="AtlasTexture_irtpk"]
atlas = ExtResource("1_dlkl0") atlas = ExtResource("2_a6lwn")
region = Rect2(12, 0, 12, 24) region = Rect2(12, 0, 12, 14)
[sub_resource type="AtlasTexture" id="AtlasTexture_68y2k"] [sub_resource type="AtlasTexture" id="AtlasTexture_0gb20"]
atlas = ExtResource("1_dlkl0") atlas = ExtResource("2_a6lwn")
region = Rect2(24, 0, 12, 24) region = Rect2(24, 0, 12, 14)
[sub_resource type="AtlasTexture" id="AtlasTexture_eib4d"] [sub_resource type="AtlasTexture" id="AtlasTexture_5uhdg"]
atlas = ExtResource("1_dlkl0") atlas = ExtResource("2_a6lwn")
region = Rect2(36, 0, 12, 24) region = Rect2(36, 0, 12, 14)
[sub_resource type="AtlasTexture" id="AtlasTexture_7q5cd"] [sub_resource type="AtlasTexture" id="AtlasTexture_e4moo"]
atlas = ExtResource("1_dlkl0") atlas = ExtResource("2_a6lwn")
region = Rect2(48, 0, 12, 24) region = Rect2(48, 0, 12, 14)
[sub_resource type="AtlasTexture" id="AtlasTexture_k8jtr"] [sub_resource type="AtlasTexture" id="AtlasTexture_soja6"]
atlas = ExtResource("1_dlkl0") atlas = ExtResource("2_a6lwn")
region = Rect2(60, 0, 12, 24) region = Rect2(60, 0, 12, 14)
[sub_resource type="AtlasTexture" id="AtlasTexture_egan1"] [sub_resource type="AtlasTexture" id="AtlasTexture_sn741"]
atlas = ExtResource("1_dlkl0") atlas = ExtResource("2_a6lwn")
region = Rect2(72, 0, 12, 24) region = Rect2(72, 0, 12, 14)
[sub_resource type="AtlasTexture" id="AtlasTexture_eymjc"] [sub_resource type="AtlasTexture" id="AtlasTexture_r825r"]
atlas = ExtResource("1_dlkl0") atlas = ExtResource("2_a6lwn")
region = Rect2(84, 0, 12, 24) region = Rect2(84, 0, 12, 14)
[sub_resource type="AtlasTexture" id="AtlasTexture_go3ky"] [sub_resource type="AtlasTexture" id="AtlasTexture_75y5m"]
atlas = ExtResource("1_dlkl0") atlas = ExtResource("2_a6lwn")
region = Rect2(96, 0, 12, 24) region = Rect2(96, 0, 12, 14)
[sub_resource type="AtlasTexture" id="AtlasTexture_rvq52"] [sub_resource type="AtlasTexture" id="AtlasTexture_l8r4c"]
atlas = ExtResource("1_dlkl0") atlas = ExtResource("2_a6lwn")
region = Rect2(108, 0, 12, 24) region = Rect2(108, 0, 12, 14)
[sub_resource type="AtlasTexture" id="AtlasTexture_cjdtb"] [sub_resource type="AtlasTexture" id="AtlasTexture_7gxo8"]
atlas = ExtResource("1_dlkl0") atlas = ExtResource("2_a6lwn")
region = Rect2(120, 0, 12, 24) region = Rect2(120, 0, 12, 14)
[sub_resource type="AtlasTexture" id="AtlasTexture_vi5xh"] [sub_resource type="AtlasTexture" id="AtlasTexture_60wov"]
atlas = ExtResource("1_dlkl0") atlas = ExtResource("2_a6lwn")
region = Rect2(132, 0, 12, 24) region = Rect2(132, 0, 12, 14)
[sub_resource type="SpriteFrames" id="SpriteFrames_gf7ku"] [sub_resource type="SpriteFrames" id="SpriteFrames_gf7ku"]
animations = [{ animations = [{
"frames": [{ "frames": [{
"duration": 1.0, "duration": 1.0,
"texture": SubResource("AtlasTexture_ikvnd") "texture": SubResource("AtlasTexture_dtmd3")
}, { }, {
"duration": 1.0, "duration": 1.0,
"texture": SubResource("AtlasTexture_b7wal") "texture": SubResource("AtlasTexture_irtpk")
}, { }, {
"duration": 1.0, "duration": 1.0,
"texture": SubResource("AtlasTexture_68y2k") "texture": SubResource("AtlasTexture_0gb20")
}, { }, {
"duration": 1.0, "duration": 1.0,
"texture": SubResource("AtlasTexture_eib4d") "texture": SubResource("AtlasTexture_5uhdg")
}, { }, {
"duration": 1.0, "duration": 1.0,
"texture": SubResource("AtlasTexture_7q5cd") "texture": SubResource("AtlasTexture_e4moo")
}, { }, {
"duration": 1.0, "duration": 1.0,
"texture": SubResource("AtlasTexture_k8jtr") "texture": SubResource("AtlasTexture_soja6")
}, { }, {
"duration": 1.0, "duration": 1.0,
"texture": SubResource("AtlasTexture_egan1") "texture": SubResource("AtlasTexture_sn741")
}, { }, {
"duration": 1.0, "duration": 1.0,
"texture": SubResource("AtlasTexture_eymjc") "texture": SubResource("AtlasTexture_r825r")
}, { }, {
"duration": 1.0, "duration": 1.0,
"texture": SubResource("AtlasTexture_go3ky") "texture": SubResource("AtlasTexture_75y5m")
}, { }, {
"duration": 1.0, "duration": 1.0,
"texture": SubResource("AtlasTexture_rvq52") "texture": SubResource("AtlasTexture_l8r4c")
}, { }, {
"duration": 1.0, "duration": 1.0,
"texture": SubResource("AtlasTexture_cjdtb") "texture": SubResource("AtlasTexture_7gxo8")
}, { }, {
"duration": 1.0, "duration": 1.0,
"texture": SubResource("AtlasTexture_vi5xh") "texture": SubResource("AtlasTexture_60wov")
}], }],
"loop": true, "loop": true,
"name": &"default", "name": &"default",
@ -97,15 +99,26 @@ animations = [{
[node name="TorchLamp" type="Node2D"] [node name="TorchLamp" type="Node2D"]
[node name="Sprite2D2" type="Sprite2D" parent="."]
texture = ExtResource("3_vh465")
centered = false
offset = Vector2(-6, -16)
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."] [node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
modulate = Color(2.5, 2, 2, 1)
y_sort_enabled = true y_sort_enabled = true
texture_filter = 1 texture_filter = 1
position = Vector2(0, -6)
sprite_frames = SubResource("SpriteFrames_gf7ku") sprite_frames = SubResource("SpriteFrames_gf7ku")
autoplay = "default" autoplay = "default"
frame = 9 frame_progress = 0.557817
frame_progress = 0.966501
offset = Vector2(0, -12) offset = Vector2(0, -12)
[node name="Sprite2D" type="Sprite2D" parent="."]
texture = ExtResource("2_bq1kw")
centered = false
offset = Vector2(-6, -16)
[node name="PointLight2D" type="PointLight2D" parent="."] [node name="PointLight2D" type="PointLight2D" parent="."]
color = Color(1, 0.811765, 0.537255, 1) color = Color(1, 0.811765, 0.537255, 1)
energy = 1.2 energy = 1.2
@ -113,3 +126,13 @@ blend_mode = 2
shadow_filter_smooth = 3.0 shadow_filter_smooth = 3.0
texture = ExtResource("2_0xpf8") texture = ExtResource("2_0xpf8")
texture_scale = 0.25 texture_scale = 0.25
[node name="PointLight2D2" type="PointLight2D" parent="."]
visible = false
color = Color(1, 0.811765, 0.537255, 1)
energy = 1.2
blend_mode = 2
range_item_cull_mask = 8
shadow_filter_smooth = 3.0
texture = ExtResource("2_0xpf8")
texture_scale = 0.25

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=24 format=3 uid="uid://1y5r6sklwgrp"] [gd_scene load_steps=25 format=3 uid="uid://1y5r6sklwgrp"]
[ext_resource type="Script" path="res://Entities/UnwantedFrequency.cs" id="1_6sbe0"] [ext_resource type="Script" path="res://Entities/UnwantedFrequency.cs" id="1_6sbe0"]
[ext_resource type="PackedScene" uid="uid://du5vhccg75nrq" path="res://BoundingBoxes/Hitbox.tscn" id="2_gxtvd"] [ext_resource type="PackedScene" uid="uid://du5vhccg75nrq" path="res://BoundingBoxes/Hitbox.tscn" id="2_gxtvd"]
@ -10,17 +10,20 @@
[sub_resource type="RectangleShape2D" id="RectangleShape2D_30y8q"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_30y8q"]
size = Vector2(8, 8) size = Vector2(8, 8)
[sub_resource type="CanvasItemMaterial" id="CanvasItemMaterial_dhurx"]
light_mode = 1
[sub_resource type="Curve" id="Curve_eu273"] [sub_resource type="Curve" id="Curve_eu273"]
_data = [Vector2(0.0618557, 0), 0.0, 0.0, 0, 0, Vector2(0.489691, 1), 0.0, 0.0, 0, 0] _data = [Vector2(0.0618557, 0), 0.0, 0.0, 0, 0, Vector2(0.489691, 1), 0.0, 0.0, 0, 0]
point_count = 2 point_count = 2
[sub_resource type="Gradient" id="Gradient_dyqhb"] [sub_resource type="Gradient" id="Gradient_dyqhb"]
offsets = PackedFloat32Array(0.00662252, 0.715232, 1) offsets = PackedFloat32Array(0.00662252, 0.715232, 1)
colors = PackedColorArray(0.996078, 0, 0.164706, 0, 0.996045, 0, 0.166638, 1, 1, 1, 1, 1) colors = PackedColorArray(0.996078, 0, 0.164706, 0, 1.992, 0, 0.334, 1, 2, 2, 2, 1)
[sub_resource type="Gradient" id="Gradient_m1y6u"] [sub_resource type="Gradient" id="Gradient_m1y6u"]
offsets = PackedFloat32Array(0.00662252, 0.715232, 1) offsets = PackedFloat32Array(0.00662252, 0.715232, 1)
colors = PackedColorArray(0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1) colors = PackedColorArray(0, 0, 0, 0, 0, 0, 0, 1, 2, 2, 2, 1)
[sub_resource type="Gradient" id="Gradient_2q0ut"] [sub_resource type="Gradient" id="Gradient_2q0ut"]
offsets = PackedFloat32Array(0.525926, 0.740741, 1) offsets = PackedFloat32Array(0.525926, 0.740741, 1)
@ -132,11 +135,14 @@ Knockback = 324.0
shape = SubResource("RectangleShape2D_30y8q") shape = SubResource("RectangleShape2D_30y8q")
[node name="TrailRotation" type="Node2D" parent="."] [node name="TrailRotation" type="Node2D" parent="."]
material = SubResource("CanvasItemMaterial_dhurx")
[node name="TrailPosition" type="Node2D" parent="TrailRotation"] [node name="TrailPosition" type="Node2D" parent="TrailRotation"]
use_parent_material = true
[node name="Trail" parent="TrailRotation/TrailPosition" instance=ExtResource("3_67uhs")] [node name="Trail" parent="TrailRotation/TrailPosition" instance=ExtResource("3_67uhs")]
self_modulate = Color(2, 2, 2, 1) self_modulate = Color(2, 2, 2, 1)
use_parent_material = true
width = 2.0 width = 2.0
width_curve = SubResource("Curve_eu273") width_curve = SubResource("Curve_eu273")
default_color = Color(1, 0.0862745, 0.207843, 1) default_color = Color(1, 0.0862745, 0.207843, 1)
@ -148,9 +154,11 @@ MaximumPoints = 64
Frequency = 30 Frequency = 30
[node name="TrailPosition2" type="Node2D" parent="TrailRotation"] [node name="TrailPosition2" type="Node2D" parent="TrailRotation"]
use_parent_material = true
[node name="Trail" parent="TrailRotation/TrailPosition2" instance=ExtResource("3_67uhs")] [node name="Trail" parent="TrailRotation/TrailPosition2" instance=ExtResource("3_67uhs")]
self_modulate = Color(2, 2, 2, 1) self_modulate = Color(2, 2, 2, 1)
use_parent_material = true
width = 2.0 width = 2.0
width_curve = SubResource("Curve_eu273") width_curve = SubResource("Curve_eu273")
gradient = SubResource("Gradient_m1y6u") gradient = SubResource("Gradient_m1y6u")

View File

@ -1,4 +1,5 @@
using Godot; using Godot;
using SupaLidlGame.Extensions;
namespace SupaLidlGame.Items.Weapons; namespace SupaLidlGame.Items.Weapons;
@ -15,7 +16,14 @@ public partial class Bow : ProjectileSpawner
if (_isOnFire) if (_isOnFire)
{ {
GetNode<AnimatedSprite2D>("%Flame").Visible = false; var flame = GetNode<AnimatedSprite2D>("%Flame");
var newFlame = flame.Duplicate() as Node2D;
projectile.AddChild(newFlame);
newFlame.Position = Vector2.Zero;
flame.Visible = false;
// TODO: instead of doing 1.5x damage, create an "On Fire" debuff // TODO: instead of doing 1.5x damage, create an "On Fire" debuff
projectile.Hitbox.Damage *= 1.5f; projectile.Hitbox.Damage *= 1.5f;
_isOnFire = false; _isOnFire = false;
@ -30,8 +38,15 @@ public partial class Bow : ProjectileSpawner
_ignitionArea = GetNode<Area2D>("IgnitionArea"); _ignitionArea = GetNode<Area2D>("IgnitionArea");
var onAreaEntered = (Area2D area) => var onAreaEntered = (Area2D area) =>
{ {
GetNode<AnimatedSprite2D>("%Flame").Visible = true; if (!_isOnFire)
{
var flame = GetNode<AnimatedSprite2D>("%Flame");
flame.Visible = true;
flame.GetNode<AudioStreamPlayer2D>("Ignite")
.OnWorld()
.PlayOneShot();
_isOnFire = true; _isOnFire = true;
}
}; };
_ignitionArea.Connect( _ignitionArea.Connect(
Area2D.SignalName.AreaEntered, Area2D.SignalName.AreaEntered,

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=28 format=3 uid="uid://cgg0sfm2qeiwn"] [gd_scene load_steps=29 format=3 uid="uid://cgg0sfm2qeiwn"]
[ext_resource type="Texture2D" uid="uid://dam6aigkw8xs" path="res://Assets/Sprites/Items/bow-and-arrow.png" id="1_1ghvv"] [ext_resource type="Texture2D" uid="uid://dam6aigkw8xs" path="res://Assets/Sprites/Items/bow-and-arrow.png" id="1_1ghvv"]
[ext_resource type="Script" path="res://Items/Weapons/Bow.cs" id="1_ikgu2"] [ext_resource type="Script" path="res://Items/Weapons/Bow.cs" id="1_ikgu2"]
@ -12,6 +12,7 @@
[ext_resource type="Texture2D" uid="uid://coarr28adgo1u" path="res://Assets/Sprites/Particles/point-light.png" id="9_tk6lc"] [ext_resource type="Texture2D" uid="uid://coarr28adgo1u" path="res://Assets/Sprites/Particles/point-light.png" id="9_tk6lc"]
[ext_resource type="AudioStream" uid="uid://cwy4giq8eod5g" path="res://Assets/Sounds/bow-release.wav" id="9_v051g"] [ext_resource type="AudioStream" uid="uid://cwy4giq8eod5g" path="res://Assets/Sounds/bow-release.wav" id="9_v051g"]
[ext_resource type="Texture2D" uid="uid://dj1vsctgh1scr" path="res://Assets/Sprites/Misc/flame.png" id="9_xwcvy"] [ext_resource type="Texture2D" uid="uid://dj1vsctgh1scr" path="res://Assets/Sprites/Misc/flame.png" id="9_xwcvy"]
[ext_resource type="AudioStream" uid="uid://braj74by0oowo" path="res://Assets/Sounds/fire-burst-flash.wav" id="11_65ega"]
[sub_resource type="AtlasTexture" id="AtlasTexture_5af70"] [sub_resource type="AtlasTexture" id="AtlasTexture_5af70"]
atlas = ExtResource("9_xwcvy") atlas = ExtResource("9_xwcvy")
@ -94,7 +95,7 @@ tracks/1/keys = {
"times": PackedFloat32Array(0), "times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1), "transitions": PackedFloat32Array(1),
"update": 0, "update": 0,
"values": [Vector2(15, -8)] "values": [Vector2(15, -4)]
} }
tracks/2/type = "value" tracks/2/type = "value"
tracks/2/imported = false tracks/2/imported = false
@ -165,7 +166,7 @@ tracks/2/keys = {
"times": PackedFloat32Array(0), "times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1), "transitions": PackedFloat32Array(1),
"update": 0, "update": 0,
"values": [Vector2(15, -8)] "values": [Vector2(15, -4)]
} }
tracks/3/type = "value" tracks/3/type = "value"
tracks/3/imported = false tracks/3/imported = false
@ -220,7 +221,7 @@ tracks/2/keys = {
"times": PackedFloat32Array(0, 0.1, 0.2, 0.3, 0.4, 0.5), "times": PackedFloat32Array(0, 0.1, 0.2, 0.3, 0.4, 0.5),
"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1), "transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1),
"update": 1, "update": 1,
"values": [Vector2(15, -8), Vector2(14, -8), Vector2(13, -8), Vector2(12, -8), Vector2(11, -8), Vector2(9, -8)] "values": [Vector2(15, -4), Vector2(14, -4), Vector2(13, -4), Vector2(12, -4), Vector2(11, -4), Vector2(9, -4)]
} }
[sub_resource type="Animation" id="Animation_j5qtq"] [sub_resource type="Animation" id="Animation_j5qtq"]
@ -262,7 +263,7 @@ tracks/2/keys = {
"times": PackedFloat32Array(0), "times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1), "transitions": PackedFloat32Array(1),
"update": 0, "update": 0,
"values": [Vector2(15, -8)] "values": [Vector2(15, -4)]
} }
tracks/3/type = "value" tracks/3/type = "value"
tracks/3/imported = false tracks/3/imported = false
@ -370,15 +371,22 @@ hframes = 8
[node name="Flame" type="AnimatedSprite2D" parent="Anchor"] [node name="Flame" type="AnimatedSprite2D" parent="Anchor"]
unique_name_in_owner = true unique_name_in_owner = true
visible = false visible = false
position = Vector2(15, -8) modulate = Color(3, 3, 3, 1)
position = Vector2(15, -4)
sprite_frames = SubResource("SpriteFrames_b2khh") sprite_frames = SubResource("SpriteFrames_b2khh")
autoplay = "default" autoplay = "default"
frame_progress = 0.1652
offset = Vector2(0, -4)
[node name="PointLight2D" type="PointLight2D" parent="Anchor/Flame"] [node name="PointLight2D" type="PointLight2D" parent="Anchor/Flame"]
color = Color(1, 0.8, 0.701961, 1) color = Color(1, 0.8, 0.701961, 1)
energy = 0.5
texture = ExtResource("9_tk6lc") texture = ExtResource("9_tk6lc")
texture_scale = 0.13 texture_scale = 0.13
[node name="Ignite" type="AudioStreamPlayer2D" parent="Anchor/Flame"]
stream = ExtResource("11_65ega")
[node name="AnimationPlayer" type="AnimationPlayer" parent="."] [node name="AnimationPlayer" type="AnimationPlayer" parent="."]
libraries = { libraries = {
"": SubResource("AnimationLibrary_5vx8d") "": SubResource("AnimationLibrary_5vx8d")

View File

@ -10,7 +10,7 @@ physics_layer_1/collision_mask = 0
[sub_resource type="Environment" id="Environment_pxx66"] [sub_resource type="Environment" id="Environment_pxx66"]
background_mode = 3 background_mode = 3
glow_enabled = true glow_enabled = true
glow_hdr_threshold = 1.4 glow_hdr_threshold = 1.2
[node name="TileMap" type="Node2D" node_paths=PackedStringArray("Entities", "Areas", "Spawners", "Markers")] [node name="TileMap" type="Node2D" node_paths=PackedStringArray("Entities", "Areas", "Spawners", "Markers")]
process_mode = 1 process_mode = 1

File diff suppressed because one or more lines are too long

View File

@ -8,6 +8,9 @@ public partial class RangedIdleState : WeaponState
[Export] [Export]
public WeaponState FireState { get; set; } public WeaponState FireState { get; set; }
[Export]
public WeaponState AltFireState { get; set; }
[Export] [Export]
public Items.Weapons.Ranged Weapon { get; set; } public Items.Weapons.Ranged Weapon { get; set; }
@ -30,6 +33,12 @@ public partial class RangedIdleState : WeaponState
return FireState; return FireState;
} }
public override WeaponState UseAlt()
{
GD.Print("Alt fire");
return AltFireState;
}
public override void Exit(IState<WeaponState> nextState) public override void Exit(IState<WeaponState> nextState)
{ {
Weapon.Visible = true; Weapon.Visible = true;

View File

@ -61,6 +61,14 @@ ui_accept={
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":0,"pressure":0.0,"pressed":false,"script":null) , Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":0,"pressure":0.0,"pressed":false,"script":null)
] ]
} }
ui_focus_next={
"deadzone": 0.5,
"events": []
}
ui_focus_prev={
"deadzone": 0.5,
"events": []
}
ui_left={ ui_left={
"deadzone": 0.5, "deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":4194319,"physical_keycode":0,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) "events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":4194319,"physical_keycode":0,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
@ -198,6 +206,12 @@ cast={
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":67,"key_label":0,"unicode":99,"location":0,"echo":false,"script":null) "events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":67,"key_label":0,"unicode":99,"location":0,"echo":false,"script":null)
] ]
} }
inventory={
"deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194306,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":4,"pressure":0.0,"pressed":true,"script":null)
]
}
[internationalization] [internationalization]