This commit is contained in:
Marco 2025-03-02 15:37:14 +01:00
commit 2be069eab4
17 changed files with 255 additions and 45 deletions

View file

@ -0,0 +1,19 @@
[gd_resource type="Resource" script_class="LootItem" load_steps=3 format=3 uid="uid://dodwpect0ldjf"]
[ext_resource type="Script" uid="uid://epnwjptvks3t" path="res://Scripts/Resources/LootItem.cs" id="1_hyh2l"]
[ext_resource type="Texture2D" uid="uid://dlkqy5jgchwy" path="res://Sprites/Items/Heart_Pickup.png" id="1_xg75n"]
[resource]
script = ExtResource("1_hyh2l")
ItemName = "Extend"
ItemDescription = "Gives back 20 Health on use"
ItemKey = "Heart"
Item = 4
Amount = 1
Max = 10
PickupIfMaxed = false
ConsumeOnUse = true
UiType = 0
Selectable = true
InventorySprite = ExtResource("1_xg75n")
metadata/_custom_type_script = "uid://epnwjptvks3t"

View file

@ -8,7 +8,7 @@ using Godot.Collections;
public partial class Interactable : Area2D
{
[Export] public Array<LootItem> Requirements = new Array<LootItem>();
[Export] public Array<LootItem> Requirements = [];
protected InventoryManager _inventoryManager;

View file

@ -0,0 +1,35 @@
[gd_scene load_steps=8 format=3 uid="uid://b2tihw3iawd2l"]
[ext_resource type="Script" uid="uid://b3h7b30kerf60" path="res://Scripts/Interactables/ItemPickup.cs" id="1_j5s0a"]
[ext_resource type="Script" uid="uid://epnwjptvks3t" path="res://Scripts/Resources/LootItem.cs" id="2_4oifc"]
[ext_resource type="Resource" uid="uid://dodwpect0ldjf" path="res://Resources/Items/Heart_Pickup.tres" id="3_dqwsj"]
[ext_resource type="Texture2D" uid="uid://dlkqy5jgchwy" path="res://Sprites/Items/Heart_Pickup.png" id="4_iu1v6"]
[sub_resource type="CircleShape2D" id="CircleShape2D_6vv2s"]
[sub_resource type="AtlasTexture" id="AtlasTexture_16lwt"]
atlas = ExtResource("4_iu1v6")
region = Rect2(0, 0, 16, 16)
[sub_resource type="SpriteFrames" id="SpriteFrames_f6vxc"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_16lwt")
}],
"loop": true,
"name": &"default",
"speed": 5.0
}]
[node name="HeartPickup" type="Area2D" groups=["Interactable"]]
collision_layer = 4
collision_mask = 2
script = ExtResource("1_j5s0a")
LootTable = Array[ExtResource("2_4oifc")]([ExtResource("3_dqwsj")])
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("CircleShape2D_6vv2s")
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
sprite_frames = SubResource("SpriteFrames_f6vxc")

View file

@ -1,38 +1,54 @@
[gd_scene load_steps=7 format=3 uid="uid://e80xujqyjoh"]
[gd_scene load_steps=9 format=3 uid="uid://e80xujqyjoh"]
[ext_resource type="Script" uid="uid://cpx2fxtumgmud" path="res://Scenes/Barrel.cs" id="1_w8rm7"]
[ext_resource type="PackedScene" uid="uid://dpaobtgb3l4ft" path="res://Scenes/Props/Box_Red_Broken.tscn" id="2_s8k4s"]
[ext_resource type="PackedScene" uid="uid://bkr1rv30ww4xt" path="res://Scenes/Props/Box_Vertical_Broken.tscn" id="2_xajnp"]
[ext_resource type="PackedScene" uid="uid://jmijre3eaf8m" path="res://Scenes/Explosion.tscn" id="3_384ns"]
[ext_resource type="Texture2D" uid="uid://b1xpvkxylpath" path="res://Sprites/Props/VerticalStorage.png" id="4_yhmvo"]
[sub_resource type="AtlasTexture" id="AtlasTexture_xajnp"]
atlas = ExtResource("4_yhmvo")
region = Rect2(0, 0, 16, 32)
[sub_resource type="SpriteFrames" id="SpriteFrames_xu8ef"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_xajnp")
}],
"loop": true,
"name": &"default",
"speed": 5.0
}]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_2ewfl"]
size = Vector2(14, 28)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_ss2y0"]
size = Vector2(12, 24)
[node name="Red Box" type="Area2D" groups=["Destroyable"]]
[node name="Vertical Box" type="Area2D" groups=["Destroyable"]]
y_sort_enabled = true
position = Vector2(0, -9)
collision_layer = 64
collision_mask = 10
script = ExtResource("1_w8rm7")
Health = 4.0
ExplosionRadius = 0.0
ExplosionDamage = 0.0
DebrisScene = ExtResource("2_s8k4s")
DebrisScene = ExtResource("2_xajnp")
ExplosionParticles = ExtResource("3_384ns")
metadata/_edit_group_ = true
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
position = Vector2(0, -9)
sprite_frames = SubResource("SpriteFrames_xu8ef")
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
visible = false
position = Vector2(0, -1)
shape = SubResource("RectangleShape2D_2ewfl")
[node name="Sprite2D" type="Sprite2D" parent="."]
texture = ExtResource("4_yhmvo")
[node name="RigidBody2D" type="RigidBody2D" parent="."]
position = Vector2(0, -9)
collision_layer = 64
collision_mask = 10
gravity_scale = 0.0

View file

@ -0,0 +1,56 @@
[gd_scene load_steps=8 format=3 uid="uid://bkr1rv30ww4xt"]
[ext_resource type="Script" uid="uid://cpx2fxtumgmud" path="res://Scenes/Barrel.cs" id="1_xr0or"]
[ext_resource type="PackedScene" uid="uid://jmijre3eaf8m" path="res://Scenes/Explosion.tscn" id="3_v3lmq"]
[ext_resource type="Texture2D" uid="uid://b1xpvkxylpath" path="res://Sprites/Props/VerticalStorage.png" id="4_q2283"]
[sub_resource type="AtlasTexture" id="AtlasTexture_nrv7m"]
atlas = ExtResource("4_q2283")
region = Rect2(16, 0, 16, 32)
[sub_resource type="SpriteFrames" id="SpriteFrames_xr0or"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_nrv7m")
}],
"loop": true,
"name": &"default",
"speed": 5.0
}]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_2ewfl"]
size = Vector2(14, 28)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_ss2y0"]
size = Vector2(12, 24)
[node name="Broken Vertical Box" type="Area2D" groups=["Destroyable"]]
y_sort_enabled = true
collision_layer = 64
collision_mask = 10
script = ExtResource("1_xr0or")
Health = 4.0
ExplosionRadius = 0.0
ExplosionDamage = 0.0
ExplosionParticles = ExtResource("3_v3lmq")
metadata/_edit_group_ = true
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
position = Vector2(0, -9)
sprite_frames = SubResource("SpriteFrames_xr0or")
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
visible = false
position = Vector2(0, -1)
shape = SubResource("RectangleShape2D_2ewfl")
[node name="RigidBody2D" type="RigidBody2D" parent="."]
position = Vector2(0, -9)
collision_layer = 64
collision_mask = 10
gravity_scale = 0.0
[node name="CollisionShape2D" type="CollisionShape2D" parent="RigidBody2D"]
position = Vector2(0, -3)
shape = SubResource("RectangleShape2D_ss2y0")

File diff suppressed because one or more lines are too long

BIN
Sprites/Chest.aseprite (Stored with Git LFS)

Binary file not shown.

BIN
Sprites/Chest.png (Stored with Git LFS)

Binary file not shown.

BIN
Sprites/Items/Heart_Pickup.aseprite (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Sprites/Items/Heart_Pickup.png (Stored with Git LFS) Normal file

Binary file not shown.

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dlkqy5jgchwy"
path="res://.godot/imported/Heart_Pickup.png-c084640e86dc3933905325f27112cf15.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Sprites/Items/Heart_Pickup.png"
dest_files=["res://.godot/imported/Heart_Pickup.png-c084640e86dc3933905325f27112cf15.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

BIN
Sprites/Items/Power_Pickup.png (Stored with Git LFS)

Binary file not shown.

BIN
Sprites/Items/Shield_Pickup.aseprite (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Sprites/Items/Shield_Pickup.png (Stored with Git LFS) Normal file

Binary file not shown.

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://8n23xie4kore"
path="res://.godot/imported/Shield_Pickup.png-c9d93cacb432ecf2feaa4cda905a0d67.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Sprites/Items/Shield_Pickup.png"
dest_files=["res://.godot/imported/Shield_Pickup.png-c9d93cacb432ecf2feaa4cda905a0d67.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

BIN
Sprites/Props/VerticalStorage.aseprite (Stored with Git LFS)

Binary file not shown.

BIN
Sprites/Props/VerticalStorage.png (Stored with Git LFS)

Binary file not shown.