Working on item rescue

This commit is contained in:
2024-12-19 15:42:40 -08:00
parent d135be4318
commit e525ede13d
43 changed files with 794 additions and 25 deletions

View File

@@ -209,6 +209,7 @@ locale/translations_pot_files=PackedStringArray("res://src/dialog/Dialogue.dialo
3d_physics/layer_8="Dialogue" 3d_physics/layer_8="Dialogue"
3d_physics/layer_9="Teleport" 3d_physics/layer_9="Teleport"
3d_physics/layer_10="Minimap" 3d_physics/layer_10="Minimap"
3d_physics/layer_11="ItemRescue"
[physics] [physics]

View File

@@ -6,3 +6,4 @@
shader = ExtResource("1_fbp5a") shader = ExtResource("1_fbp5a")
shader_parameter/progress = 0.0 shader_parameter/progress = 0.0
shader_parameter/meltiness = 1.0 shader_parameter/meltiness = 1.0
shader_parameter/reverse = false

View File

@@ -4,6 +4,7 @@ namespace GameJamDungeon;
using Chickensoft.AutoInject; using Chickensoft.AutoInject;
using Chickensoft.GodotNodeInterfaces; using Chickensoft.GodotNodeInterfaces;
using Chickensoft.Introspection; using Chickensoft.Introspection;
using GameJamDungeon.src.item_rescue;
using Godot; using Godot;
public interface IGame : IProvide<IGameRepo>, IProvide<IGameEventDepot>, IProvide<IGame>, INode3D public interface IGame : IProvide<IGameRepo>, IProvide<IGameEventDepot>, IProvide<IGame>, INode3D
@@ -12,6 +13,8 @@ public interface IGame : IProvide<IGameRepo>, IProvide<IGameEventDepot>, IProvid
public IPlayer Player { get; } public IPlayer Player { get; }
public RescuedItemDatabase RescuedItems { get; }
public void DropItem(IInventoryItem item); public void DropItem(IInventoryItem item);
public void ThrowItem(IInventoryItem item); public void ThrowItem(IInventoryItem item);
@@ -65,6 +68,8 @@ public partial class Game : Node3D, IGame
[Node] public InGameAudio InGameAudio { get; set; } = default!; [Node] public InGameAudio InGameAudio { get; set; } = default!;
#endregion #endregion
public RescuedItemDatabase RescuedItems { get; set; } = default!;
public void Setup() public void Setup()
{ {
GameRepo = new GameRepo(); GameRepo = new GameRepo();
@@ -74,6 +79,7 @@ public partial class Game : Node3D, IGame
GameLogic.Set(AppRepo); GameLogic.Set(AppRepo);
GameLogic.Set(GameEventDepot); GameLogic.Set(GameEventDepot);
Instantiator = new Instantiator(GetTree()); Instantiator = new Instantiator(GetTree());
RescuedItems = new RescuedItemDatabase();
} }
public void OnResolved() public void OnResolved()
@@ -234,15 +240,8 @@ public partial class Game : Node3D, IGame
private void Inventory_RaiseStatRequest(InventoryItemStats itemStats) private void Inventory_RaiseStatRequest(InventoryItemStats itemStats)
{ {
//if (itemStats.RaiseHPAmount > 0 && GameRepo.PlayerData.CurrentHP.Value.Equals(GameRepo.PlayerData.MaximumHP.Value))
// RaiseHP(itemStats.RaiseHPAmount);
//else if (itemStats.HealHPAmount > 0)
HealHP(itemStats.HealHPAmount); HealHP(itemStats.HealHPAmount);
HealVT(itemStats.HealVTAmount); HealVT(itemStats.HealVTAmount);
//if (itemStats.RaiseVTAmount > 0 && GameRepo.PlayerData.CurrentVT.Value.Equals(GameRepo.PlayerData.MaximumVT.Value))
// RaiseVT(itemStats.RaiseVTAmount);
//else if (itemStats.HealVTAmount > 0)
} }
private void SetPauseMode(bool isPaused) private void SetPauseMode(bool isPaused)

View File

@@ -0,0 +1,22 @@
using Chickensoft.AutoInject;
using Chickensoft.Introspection;
using GameJamDungeon;
using Godot;
[Meta(typeof(IAutoNode))]
public partial class ItemRescue : Area3D
{
public override void _Notification(int what) => this.Notify(what);
public void Initialize()
{
BodyEntered += OnItemRescueEntered;
}
public void OnItemRescueEntered(Node3D item)
{
GD.Print("Item rescue entered");
if (item is IDroppedItem droppedItem)
droppedItem.RescueItem();
}
}

View File

@@ -0,0 +1,20 @@
[gd_scene load_steps=4 format=3 uid="uid://duis2vhf5ojy3"]
[ext_resource type="Script" path="res://src/item_rescue/ItemRescue.cs" id="1_j1jha"]
[sub_resource type="BoxShape3D" id="BoxShape3D_ykgmd"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_j1jha"]
transparency = 1
albedo_color = Color(0.486275, 1, 0.443137, 0.309804)
[node name="Item Rescue" type="Area3D"]
collision_layer = 0
collision_mask = 1024
script = ExtResource("1_j1jha")
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
shape = SubResource("BoxShape3D_ykgmd")
[node name="SenseSphere" type="CSGSphere3D" parent="."]
material = SubResource("StandardMaterial3D_j1jha")

View File

@@ -0,0 +1,14 @@
using System.Collections.Generic;
namespace GameJamDungeon.src.item_rescue
{
public class RescuedItemDatabase
{
public List<IInventoryItem> Items;
public RescuedItemDatabase()
{
Items = new List<IInventoryItem>();
}
}
}

View File

@@ -0,0 +1,32 @@
using Chickensoft.AutoInject;
using Chickensoft.Introspection;
using GameJamDungeon;
using Godot;
[Meta(typeof(IAutoNode))]
public partial class RescuedItems : Marker3D
{
public override void _Notification(int what) => this.Notify(what);
[Dependency] public IGame Game => this.DependOn<IGame>();
public void SpawnRescuedItems()
{
foreach (var item in Game.RescuedItems.Items)
{
var droppedScene = GD.Load<PackedScene>("res://src/items/dropped/DroppedItem.tscn");
var dropped = droppedScene.Instantiate<DroppedItem>();
dropped.Item = item;
dropped.GlobalPosition = GlobalPosition;
AddChild(dropped);
}
Game.RescuedItems.Items.Clear();
}
public void OnSpawnItemsEntered(Node3D body)
{
GD.Print("Spawn items");
SpawnRescuedItems();
}
}

View File

@@ -0,0 +1,6 @@
[gd_scene load_steps=2 format=3 uid="uid://tc5kdfoggrng"]
[ext_resource type="Script" path="res://src/item_rescue/RescuedItems.cs" id="1_m08l5"]
[node name="Rescued Items" type="Marker3D"]
script = ExtResource("1_m08l5")

View File

@@ -1,11 +1,17 @@
using Chickensoft.AutoInject; using Chickensoft.AutoInject;
using Chickensoft.GodotNodeInterfaces;
using Chickensoft.Introspection; using Chickensoft.Introspection;
using Godot; using Godot;
namespace GameJamDungeon namespace GameJamDungeon
{ {
public interface IDroppedItem : IRigidBody3D
{
void RescueItem();
}
[Meta(typeof(IAutoNode))] [Meta(typeof(IAutoNode))]
public partial class DroppedItem : RigidBody3D public partial class DroppedItem : RigidBody3D, IDroppedItem
{ {
public override void _Notification(int what) => this.Notify(what); public override void _Notification(int what) => this.Notify(what);
@@ -13,7 +19,7 @@ namespace GameJamDungeon
[Dependency] public IGame Game => this.DependOn<IGame>(); [Dependency] public IGame Game => this.DependOn<IGame>();
[Node] public Sprite3D Sprite { get; set; } = default!; [Node] public Sprite2D Sprite { get; set; } = default!;
public IInventoryItem Item { get; set; } public IInventoryItem Item { get; set; }
@@ -32,6 +38,42 @@ namespace GameJamDungeon
RemoveCollisionExceptionWith((Node)Game.Player); RemoveCollisionExceptionWith((Node)Game.Player);
} }
public void RescueItem()
{
ContactMonitor = false;
PlayRescueAnimation();
Game.RescuedItems.Items.Add(Item);
}
private void PlayRescueAnimation()
{
LoadShader("res://src/vfx/shaders/PixelMelt.gdshader");
var tweener = GetTree().CreateTween();
SetShaderValue(true);
tweener.TweenMethod(Callable.From((float x) => SetShaderValue(x)), 0.0f, 0.3f, 2f);
tweener.TweenCallback(Callable.From(QueueFree));
}
private void LoadShader(string shaderPath)
{
var shader = GD.Load<Shader>(shaderPath);
Sprite.Material = new ShaderMaterial();
var shaderMaterial = (ShaderMaterial)Sprite.Material;
shaderMaterial.Shader = shader;
}
private void SetShaderValue(float shaderValue)
{
var shaderMaterial = (ShaderMaterial)Sprite.Material;
shaderMaterial.SetShaderParameter("progress", shaderValue);
}
private void SetShaderValue(bool shaderValue)
{
var shaderMaterial = (ShaderMaterial)Sprite.Material;
shaderMaterial.SetShaderParameter("reverse", shaderValue);
}
private void DroppedItem_BodyEntered(Node body) private void DroppedItem_BodyEntered(Node body)
{ {
if (body is IPlayer player) if (body is IPlayer player)

View File

@@ -1,12 +1,54 @@
[gd_scene load_steps=4 format=3 uid="uid://brq11lswpqxei"] [gd_scene load_steps=9 format=3 uid="uid://brq11lswpqxei"]
[ext_resource type="Script" path="res://src/items/dropped/DroppedItem.cs" id="1_67jk4"] [ext_resource type="Script" path="res://src/items/dropped/DroppedItem.cs" id="1_67jk4"]
[ext_resource type="Texture2D" uid="uid://mi70lolgtf3n" path="res://src/items/throwable/textures/GEOMANCER-DICE.png" id="2_cu1v3"] [ext_resource type="Texture2D" uid="uid://mi70lolgtf3n" path="res://src/items/throwable/textures/GEOMANCER-DICE.png" id="2_cu1v3"]
[ext_resource type="Material" uid="uid://x2bv1q51mcjq" path="res://src/enemy/PixelMelt.tres" id="2_eat5q"]
[sub_resource type="SphereShape3D" id="SphereShape3D_28r8g"] [sub_resource type="SphereShape3D" id="SphereShape3D_28r8g"]
[sub_resource type="Animation" id="Animation_x5q15"]
resource_name = "ItemRescued"
length = 2.0
step = 0.0666667
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite3D:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 1.99543),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [Vector3(0.0207178, 0.192374, 0), Vector3(0.0207178, 1.26338, 0)]
}
[sub_resource type="Animation" id="Animation_eat5q"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite3D:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector3(0.0207178, 0.192374, 0)]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_eat5q"]
_data = {
&"ItemRescued": SubResource("Animation_x5q15"),
&"RESET": SubResource("Animation_eat5q")
}
[sub_resource type="ViewportTexture" id="ViewportTexture_x5q15"]
viewport_path = NodePath("Sprite3D/SubViewport")
[node name="DroppedItem" type="RigidBody3D"] [node name="DroppedItem" type="RigidBody3D"]
collision_layer = 0 collision_layer = 1024
collision_mask = 5 collision_mask = 5
axis_lock_angular_x = true axis_lock_angular_x = true
axis_lock_angular_y = true axis_lock_angular_y = true
@@ -19,8 +61,29 @@ script = ExtResource("1_67jk4")
[node name="CollisionShape3D" type="CollisionShape3D" parent="."] [node name="CollisionShape3D" type="CollisionShape3D" parent="."]
shape = SubResource("SphereShape3D_28r8g") shape = SubResource("SphereShape3D_28r8g")
[node name="Sprite" type="Sprite3D" parent="."] [node name="AnimationPlayer" type="AnimationPlayer" parent="."]
unique_name_in_owner = true libraries = {
pixel_size = 0.0005 &"": SubResource("AnimationLibrary_eat5q")
}
[node name="Sprite3D" type="Sprite3D" parent="."]
transform = Transform3D(0.41, 0, 0, 0, 0.41, 0, 0, 0, 0.41, 0.0207178, 0.192374, 0)
billboard = 2 billboard = 2
shaded = true
texture_filter = 0
render_priority = 100
texture = SubResource("ViewportTexture_x5q15")
[node name="SubViewport" type="SubViewport" parent="Sprite3D"]
disable_3d = true
transparent_bg = true
handle_input_locally = false
render_target_update_mode = 4
[node name="Sprite" type="Sprite2D" parent="Sprite3D/SubViewport"]
unique_name_in_owner = true
material = ExtResource("2_eat5q")
scale = Vector2(0.1, 0.1)
texture = ExtResource("2_cu1v3") texture = ExtResource("2_cu1v3")
centered = false
offset = Vector2(2000, 2000)

View File

@@ -20,3 +20,7 @@ A wand fitted with charms said to cleanse and purify that which belongs to other
It's unaligned nature has the power to balance all that it comes into contact with, should the wielder have the will." It's unaligned nature has the power to balance all that it comes into contact with, should the wielder have the will."
Texture = ExtResource("1_wiylj") Texture = ExtResource("1_wiylj")
SpawnRate = 0.5 SpawnRate = 0.5
ThrowSpeed = 12.0
HealHPAmount = 0
HealVTAmount = 0
ThrowDamage = 5

Binary file not shown.

View File

@@ -0,0 +1,37 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://8vb66kepiclk"
path="res://.godot/imported/CORRIDOR_AREA1.glb-6fdba59bbcd327a9dc80fb62b7803496.scn"
[deps]
source_file="res://src/map/dungeon/corridor/CORRIDOR_AREA1.glb"
dest_files=["res://.godot/imported/CORRIDOR_AREA1.glb-6fdba59bbcd327a9dc80fb62b7803496.scn"]
[params]
nodes/root_type=""
nodes/root_name=""
nodes/apply_root_scale=true
nodes/root_scale=1.0
nodes/import_as_skeleton_bones=false
nodes/use_node_type_suffixes=true
meshes/ensure_tangents=true
meshes/generate_lods=true
meshes/create_shadow_meshes=true
meshes/light_baking=1
meshes/lightmap_texel_size=0.2
meshes/force_disable_compression=false
skins/use_named_skins=true
animation/import=true
animation/fps=30
animation/trimming=false
animation/remove_immutable_tracks=true
animation/import_rest_as_RESET=false
import_script/path=""
_subresources={}
gltf/naming_version=1
gltf/embedded_image_handling=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

View File

@@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cl1jm7jmlse6t"
path="res://.godot/imported/CORRIDOR_AREA1_TILE4.png-301ebf3004322ed19d27efa27f8141b6.ctex"
metadata={
"vram_texture": false
}
generator_parameters={
"md5": "7b53babe76d0484b408a519f8fc329b5"
}
[deps]
source_file="res://src/map/dungeon/corridor/CORRIDOR_AREA1_TILE4.png"
dest_files=["res://.godot/imported/CORRIDOR_AREA1_TILE4.png-301ebf3004322ed19d27efa27f8141b6.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=true
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=0

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

View File

@@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dtrlc04s8t5du"
path="res://.godot/imported/CORRIDOR_AREA1_WALL TILE 1.jpg-4e527f52fe3bab40c9844a512bc5ad0a.ctex"
metadata={
"vram_texture": false
}
generator_parameters={
"md5": "c591bfa502b4a13cdf376c08035fb58d"
}
[deps]
source_file="res://src/map/dungeon/corridor/CORRIDOR_AREA1_WALL TILE 1.jpg"
dest_files=["res://.godot/imported/CORRIDOR_AREA1_WALL TILE 1.jpg-4e527f52fe3bab40c9844a512bc5ad0a.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=true
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=0

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://2r1jcblfvu82"
path="res://.godot/imported/CORRIDOR_AREA1_brick_corridor_corrected.png-55c207dc9993a6b38c34daf432efcc77.ctex"
metadata={
"vram_texture": false
}
generator_parameters={
"md5": "01d2dbbb6734168b9ef81eb42bfdb764"
}
[deps]
source_file="res://src/map/dungeon/corridor/CORRIDOR_AREA1_brick_corridor_corrected.png"
dest_files=["res://.godot/imported/CORRIDOR_AREA1_brick_corridor_corrected.png-55c207dc9993a6b38c34daf432efcc77.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=true
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=0

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

View File

@@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://c7p8vhnu2st23"
path="res://.godot/imported/CORRIDOR_AREA1_concrete_0003_color_1k.png-b4b7d53bf6107f1df3921eca3ba2ca2b.ctex"
metadata={
"vram_texture": false
}
generator_parameters={
"md5": "e9d0d15dfb27e2595fee02f430f1a3df"
}
[deps]
source_file="res://src/map/dungeon/corridor/CORRIDOR_AREA1_concrete_0003_color_1k.png"
dest_files=["res://.godot/imported/CORRIDOR_AREA1_concrete_0003_color_1k.png-b4b7d53bf6107f1df3921eca3ba2ca2b.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=true
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=0

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

View File

@@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dix0or3fxli6x"
path="res://.godot/imported/CORRIDOR_AREA1_darkbrick.png-bf23a1b304b04732f26606bb6bbadefd.ctex"
metadata={
"vram_texture": false
}
generator_parameters={
"md5": "68c10aa0eb12d3ce4e6477c9edb3c294"
}
[deps]
source_file="res://src/map/dungeon/corridor/CORRIDOR_AREA1_darkbrick.png"
dest_files=["res://.godot/imported/CORRIDOR_AREA1_darkbrick.png-bf23a1b304b04732f26606bb6bbadefd.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=true
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=0

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

View File

@@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://kkumn4qfoifs"
path="res://.godot/imported/CORRIDOR_AREA1_lower_corridor_lower.png-14e40e95e00bb260a0c1bbb6cb073698.ctex"
metadata={
"vram_texture": false
}
generator_parameters={
"md5": "11718783be351bc85b6cb01552e92311"
}
[deps]
source_file="res://src/map/dungeon/corridor/CORRIDOR_AREA1_lower_corridor_lower.png"
dest_files=["res://.godot/imported/CORRIDOR_AREA1_lower_corridor_lower.png-14e40e95e00bb260a0c1bbb6cb073698.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=true
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=0

Binary file not shown.

View File

@@ -0,0 +1,37 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://r31exqbqjee4"
path="res://.godot/imported/CORRIDOR_AREA2.glb-f6e3876102bc7577a4e90420f1f27624.scn"
[deps]
source_file="res://src/map/dungeon/corridor/CORRIDOR_AREA2.glb"
dest_files=["res://.godot/imported/CORRIDOR_AREA2.glb-f6e3876102bc7577a4e90420f1f27624.scn"]
[params]
nodes/root_type=""
nodes/root_name=""
nodes/apply_root_scale=true
nodes/root_scale=1.0
nodes/import_as_skeleton_bones=false
nodes/use_node_type_suffixes=true
meshes/ensure_tangents=true
meshes/generate_lods=true
meshes/create_shadow_meshes=true
meshes/light_baking=1
meshes/lightmap_texel_size=0.2
meshes/force_disable_compression=false
skins/use_named_skins=true
animation/import=true
animation/fps=30
animation/trimming=false
animation/remove_immutable_tracks=true
animation/import_rest_as_RESET=false
import_script/path=""
_subresources={}
gltf/naming_version=1
gltf/embedded_image_handling=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

View File

@@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bf86sqft20ggu"
path="res://.godot/imported/CORRIDOR_AREA2_AREA_2_MAIN_222STONE.png-4dbe0e4f9c8915825ea70fd9b2ec1c9e.ctex"
metadata={
"vram_texture": false
}
generator_parameters={
"md5": "11027637ea8e7d257bd13c57efd3b5b4"
}
[deps]
source_file="res://src/map/dungeon/corridor/CORRIDOR_AREA2_AREA_2_MAIN_222STONE.png"
dest_files=["res://.godot/imported/CORRIDOR_AREA2_AREA_2_MAIN_222STONE.png-4dbe0e4f9c8915825ea70fd9b2ec1c9e.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=true
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=0

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

View File

@@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://lahpftigxu6s"
path="res://.godot/imported/CORRIDOR_AREA2_COLUMN_WHITE.png-f2f34e6940fe73a3b416a4393145cfb4.ctex"
metadata={
"vram_texture": false
}
generator_parameters={
"md5": "0e8fa39a22324fd5345ebb4d3f1deeec"
}
[deps]
source_file="res://src/map/dungeon/corridor/CORRIDOR_AREA2_COLUMN_WHITE.png"
dest_files=["res://.godot/imported/CORRIDOR_AREA2_COLUMN_WHITE.png-f2f34e6940fe73a3b416a4393145cfb4.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=true
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=0

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

View File

@@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cdbhdxctjtinw"
path="res://.godot/imported/CORRIDOR_AREA2_CORRIDOR_PANEL_UPPER.png-be379b89b73b909eab481203be68cdb6.ctex"
metadata={
"vram_texture": false
}
generator_parameters={
"md5": "7a00947386bf978ae4a905d05098510a"
}
[deps]
source_file="res://src/map/dungeon/corridor/CORRIDOR_AREA2_CORRIDOR_PANEL_UPPER.png"
dest_files=["res://.godot/imported/CORRIDOR_AREA2_CORRIDOR_PANEL_UPPER.png-be379b89b73b909eab481203be68cdb6.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=true
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=0

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

View File

@@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cijco1lyolksn"
path="res://.godot/imported/CORRIDOR_AREA2_WHITE_TILE2.png-1cf9ea4ebb93d2b8957a8b7bc98b22a5.ctex"
metadata={
"vram_texture": false
}
generator_parameters={
"md5": "c01abbdce6f043b60cd28e6f386bf90d"
}
[deps]
source_file="res://src/map/dungeon/corridor/CORRIDOR_AREA2_WHITE_TILE2.png"
dest_files=["res://.godot/imported/CORRIDOR_AREA2_WHITE_TILE2.png-1cf9ea4ebb93d2b8957a8b7bc98b22a5.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=true
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=0

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

View File

@@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dyy6sau430drq"
path="res://.godot/imported/CORRIDOR_AREA2_WHITE_layer_brick1.png-7d99d7c32f339debdf92d3b0c902721f.ctex"
metadata={
"vram_texture": false
}
generator_parameters={
"md5": "e5a6977947c858572c0564e939e8513c"
}
[deps]
source_file="res://src/map/dungeon/corridor/CORRIDOR_AREA2_WHITE_layer_brick1.png"
dest_files=["res://.godot/imported/CORRIDOR_AREA2_WHITE_layer_brick1.png-7d99d7c32f339debdf92d3b0c902721f.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=true
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=0

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

View File

@@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://l75ustywh8jm"
path="res://.godot/imported/CORRIDOR_AREA2_area_2_tile_3.png-0d919f933b74d0b7a29afa311c4e7d51.ctex"
metadata={
"vram_texture": false
}
generator_parameters={
"md5": "819a5d534963bc6ec1b5baf551805ca8"
}
[deps]
source_file="res://src/map/dungeon/corridor/CORRIDOR_AREA2_area_2_tile_3.png"
dest_files=["res://.godot/imported/CORRIDOR_AREA2_area_2_tile_3.png-0d919f933b74d0b7a29afa311c4e7d51.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=true
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=0

View File

@@ -1,9 +1,17 @@
[gd_scene load_steps=3 format=3 uid="uid://dl6h1djc27ddl"] [gd_scene load_steps=7 format=3 uid="uid://dl6h1djc27ddl"]
[ext_resource type="Script" path="res://src/map/dungeon/code/Overworld.cs" id="1_2ce63"] [ext_resource type="Script" path="res://src/map/dungeon/code/Overworld.cs" id="1_2ce63"]
[ext_resource type="PackedScene" uid="uid://duis2vhf5ojy3" path="res://src/item_rescue/ItemRescue.tscn" id="2_4ixnb"]
[ext_resource type="PackedScene" uid="uid://tc5kdfoggrng" path="res://src/item_rescue/RescuedItems.tscn" id="3_tbcl3"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_pb22g"] [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_pb22g"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_tbcl3"]
transparency = 1
albedo_color = Color(0.129412, 1, 1, 0.8)
[sub_resource type="SphereShape3D" id="SphereShape3D_tbcl3"]
[node name="Floor0" type="Node3D"] [node name="Floor0" type="Node3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.63488, -5.13176) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.63488, -5.13176)
script = ExtResource("1_2ce63") script = ExtResource("1_2ce63")
@@ -18,17 +26,34 @@ shadow_opacity = 0.75
shadow_blur = 4.224 shadow_blur = 4.224
directional_shadow_fade_start = 0.63 directional_shadow_fade_start = 0.63
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
[node name="PlayerSpawnPoint" type="Marker3D" parent="."] [node name="PlayerSpawnPoint" type="Marker3D" parent="."]
unique_name_in_owner = true unique_name_in_owner = true
transform = Transform3D(-0.0104718, 0, 0.999945, 0, 1, 0, -0.999945, 0, -0.0104718, 3.6247, 1.51594, 2.81014) transform = Transform3D(-0.0104718, 0, 0.999945, 0, 1, 0, -0.999945, 0, -0.0104718, 3.6247, -0.688422, 2.81014)
[node name="ExitSpawnPoint" type="Marker3D" parent="."] [node name="ExitSpawnPoint" type="Marker3D" parent="."]
unique_name_in_owner = true unique_name_in_owner = true
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -3.05854, -1.04714, 1.38579) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -3.05854, -1.04714, 1.38579)
[node name="CSGBox3D" type="CSGBox3D" parent="."] [node name="CSGBox3D" type="CSGBox3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1.84864, 0) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -2.01065, 0)
size = Vector3(10, 1, 10) use_collision = true
size = Vector3(20, 1, 20)
material = SubResource("StandardMaterial3D_pb22g") material = SubResource("StandardMaterial3D_pb22g")
[node name="Item Rescue" parent="." instance=ExtResource("2_4ixnb")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.669859, -4.39116)
[node name="Rescued Items" parent="." instance=ExtResource("3_tbcl3")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -6.34283, -0.312653, -4.84554)
[node name="Spawn Rescued Items" type="CSGSphere3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.602379, 2.09154)
material = SubResource("StandardMaterial3D_tbcl3")
[node name="Area3D" type="Area3D" parent="Spawn Rescued Items"]
collision_mask = 3
[node name="CollisionShape3D" type="CollisionShape3D" parent="Spawn Rescued Items/Area3D"]
shape = SubResource("SphereShape3D_tbcl3")
[connection signal="body_entered" from="Spawn Rescued Items/Area3D" to="Rescued Items" method="OnSpawnItemsEntered"]

View File

@@ -49,6 +49,11 @@ namespace GameJamDungeon
[Export] [Export]
public PlayerStatResource PlayerStatResource { get; set; } = default!; public PlayerStatResource PlayerStatResource { get; set; } = default!;
[Export]
private WeaponStats _defaultWeapon { get; set; } = default!;
[Export]
private ArmorStats _defaultArmor { get; set; } = default!;
public PlayerLogic.Settings Settings { get; set; } = default!; public PlayerLogic.Settings Settings { get; set; } = default!;
public PlayerLogic PlayerLogic { get; set; } = default!; public PlayerLogic PlayerLogic { get; set; } = default!;
@@ -113,6 +118,14 @@ namespace GameJamDungeon
PlayerLogic.Set(GameRepo); PlayerLogic.Set(GameRepo);
PlayerLogic.Set(PlayerData); PlayerLogic.Set(PlayerData);
var defaultWeapon = new Weapon() { WeaponStats = _defaultWeapon };
var defaultArmor = new Armor() { ArmorStats = _defaultArmor };
PlayerData.Inventory.TryAdd(defaultWeapon);
PlayerData.Inventory.TryAdd(defaultArmor);
PlayerData.Inventory.Equip(defaultWeapon);
PlayerData.Inventory.Equip(defaultArmor);
PlayerData.Inventory.EquippedAccessory.Sync += EquippedAccessory_Sync; PlayerData.Inventory.EquippedAccessory.Sync += EquippedAccessory_Sync;
PlayerData.CurrentHP.Sync += CurrentHP_Sync; PlayerData.CurrentHP.Sync += CurrentHP_Sync;
@@ -256,11 +269,11 @@ namespace GameJamDungeon
{ {
if (PlayerData.Inventory.EquippedAccessory.Value.AccessoryStats.AccessoryTags.Contains(AccessoryTag.HalfVTConsumption)) if (PlayerData.Inventory.EquippedAccessory.Value.AccessoryStats.AccessoryTags.Contains(AccessoryTag.HalfVTConsumption))
{ {
if (reduceOnTick)
PlayerData.SetCurrentVT(PlayerData.CurrentVT.Value - 1);
reduceOnTick = !reduceOnTick; reduceOnTick = !reduceOnTick;
} }
PlayerData.SetCurrentHP(PlayerData.CurrentHP.Value + 1); PlayerData.SetCurrentHP(PlayerData.CurrentHP.Value + 1);
if (reduceOnTick)
PlayerData.SetCurrentVT(PlayerData.CurrentVT.Value - 1);
} }
else else
PlayerData.SetCurrentHP(PlayerData.CurrentHP.Value - 1); PlayerData.SetCurrentHP(PlayerData.CurrentHP.Value - 1);

View File

@@ -1,8 +1,10 @@
[gd_scene load_steps=47 format=3 uid="uid://cfecvvav8kkp6"] [gd_scene load_steps=49 format=3 uid="uid://cfecvvav8kkp6"]
[ext_resource type="Script" path="res://src/player/Player.cs" id="1_xcol5"] [ext_resource type="Script" path="res://src/player/Player.cs" id="1_xcol5"]
[ext_resource type="Script" path="res://src/hitbox/Hitbox.cs" id="2_lb3qc"] [ext_resource type="Script" path="res://src/hitbox/Hitbox.cs" id="2_lb3qc"]
[ext_resource type="Script" path="res://src/player/PlayerStatResource.cs" id="2_xq68d"] [ext_resource type="Script" path="res://src/player/PlayerStatResource.cs" id="2_xq68d"]
[ext_resource type="Resource" uid="uid://b7xr0l4a8g1gk" path="res://src/items/weapons/resources/SealingRod.tres" id="3_ebyyx"]
[ext_resource type="Resource" uid="uid://ce2vfa2t3io67" path="res://src/items/armor/resources/AtonersAdornments.tres" id="4_bj1ma"]
[ext_resource type="Texture2D" uid="uid://c6r3dhnkuw22w" path="res://src/vfx/hit_effects/FIRE_STRIKE_1.0.png" id="5_wr6lo"] [ext_resource type="Texture2D" uid="uid://c6r3dhnkuw22w" path="res://src/vfx/hit_effects/FIRE_STRIKE_1.0.png" id="5_wr6lo"]
[ext_resource type="Texture2D" uid="uid://b5qjlbcesth53" path="res://src/vfx/Weapon Strikes/NON ELEMENTAL SLASH.png" id="6_p34sl"] [ext_resource type="Texture2D" uid="uid://b5qjlbcesth53" path="res://src/vfx/Weapon Strikes/NON ELEMENTAL SLASH.png" id="6_p34sl"]
[ext_resource type="Texture2D" uid="uid://mjobx7ph7hf1" path="res://src/vfx/playerdot.png" id="7_8hi2n"] [ext_resource type="Texture2D" uid="uid://mjobx7ph7hf1" path="res://src/vfx/playerdot.png" id="7_8hi2n"]
@@ -347,6 +349,8 @@ collision_layer = 806
collision_mask = 775 collision_mask = 775
script = ExtResource("1_xcol5") script = ExtResource("1_xcol5")
PlayerStatResource = SubResource("Resource_btp2w") PlayerStatResource = SubResource("Resource_btp2w")
_defaultWeapon = ExtResource("3_ebyyx")
_defaultArmor = ExtResource("4_bj1ma")
[node name="Hitbox" type="Area3D" parent="."] [node name="Hitbox" type="Area3D" parent="."]
unique_name_in_owner = true unique_name_in_owner = true

View File

@@ -6,6 +6,8 @@ uniform float progress: hint_range(0.0, 1.0) = 0.0;
// How jagged each band of melting pixels are // How jagged each band of melting pixels are
uniform float meltiness: hint_range(0.0, 16.0) = 1.0; uniform float meltiness: hint_range(0.0, 16.0) = 1.0;
uniform bool reverse = false;
float psuedo_rand(float x) { float psuedo_rand(float x) {
return mod(x * 2048103.0 + cos(x * 1912.0), 1.0); return mod(x * 2048103.0 + cos(x * 1912.0), 1.0);
} }
@@ -14,8 +16,11 @@ void fragment() {
vec2 uv = UV; vec2 uv = UV;
// Move pixels near the top faster // Move pixels near the top faster
uv.y -= progress / UV.y; if (reverse)
uv.y += progress / UV.y;
else
uv.y -= progress / UV.y;
// Created jagged edges for each pixel on the x-axis // Created jagged edges for each pixel on the x-axis
uv.y -= progress * meltiness * psuedo_rand(UV.x - mod(UV.x, TEXTURE_PIXEL_SIZE.x)); uv.y -= progress * meltiness * psuedo_rand(UV.x - mod(UV.x, TEXTURE_PIXEL_SIZE.x));