Add initial resource and presenter classes for game entities and effects

This commit is contained in:
2025-10-13 12:11:50 +02:00
commit ad3e631d8c
75 changed files with 1423 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
using Godot;
using Godot.Collections;
namespace CryptonymThunder.Code.Resources;
[GlobalClass]
public partial class ArchetypeDatabase : Resource
{
[Export] public Dictionary<string, EntityArchetype> Archetypes { get; set; } = new();
}

View File

@@ -0,0 +1 @@
uid://df10ksb6f0pjt

View File

@@ -0,0 +1,10 @@
using Godot;
using Attribute = GameCore.Attributes.Attribute;
namespace CryptonymThunder.Code.Resources;
[GlobalClass]
public partial class AttributeComponentResource : Resource
{
[Export] public Godot.Collections.Dictionary<Attribute, float> BaseValues { get; set; } = new();
}

View File

@@ -0,0 +1 @@
uid://dc7wq2ij5kwj5

View File

@@ -0,0 +1,9 @@
using Godot;
namespace CryptonymThunder.Code.Resources;
[GlobalClass]
public partial class CharacterStateComponentResource : Resource
{
}

View File

@@ -0,0 +1 @@
uid://cdpbn8eiypfbd

View File

@@ -0,0 +1,9 @@
using Godot;
namespace CryptonymThunder.Code.Resources;
[GlobalClass]
public partial class EffectResource : Resource
{
}

View File

@@ -0,0 +1 @@
uid://bdo6vrtrsr0an

View File

@@ -0,0 +1,9 @@
using Godot;
namespace CryptonymThunder.Code.Resources.Effects;
[GlobalClass]
public partial class DamageEffectResource : EffectResource
{
[Export] public float Amount { get; set; } = 10f;
}

View File

@@ -0,0 +1 @@
uid://btv24gsw1p850

View File

@@ -0,0 +1,12 @@
using Godot;
namespace CryptonymThunder.Code.Resources.Effects;
[GlobalClass]
public partial class FireProjectileEffectResource : EffectResource
{
[Export] public string ProjectileArchetypeId { get; set; }
[Export(PropertyHint.Range, "1,50,1")] public int Count { get; set; } = 1;
[Export(PropertyHint.Range, "0,90,0.1")] public float SpreadAngle { get; set; } = 0f;
[Export] public float ProjectileSpeed { get; set; } = 30f;
}

View File

@@ -0,0 +1 @@
uid://cht6trljihvle

View File

@@ -0,0 +1,9 @@
using Godot;
namespace CryptonymThunder.Code.Resources.Effects;
[GlobalClass]
public partial class HitscanEffectResource : EffectResource
{
[Export] public float Range { get; set; } = 100f;
}

View File

@@ -0,0 +1 @@
uid://chc0d0rjcbl65

View File

@@ -0,0 +1,11 @@
using Godot;
using Godot.Collections;
namespace CryptonymThunder.Code.Resources;
[GlobalClass]
public partial class EntityArchetype : Resource
{
[Export] public PackedScene Scene { get; set; }
[Export] public Array<Resource> ComponentResources { get; set; } = [];
}

View File

@@ -0,0 +1 @@
uid://coe688e2jkyjq

View File

@@ -0,0 +1,9 @@
using Godot;
namespace CryptonymThunder.Code.Resources;
[GlobalClass]
public partial class InputStateComponentResource : Resource
{
}

View File

@@ -0,0 +1 @@
uid://y4cbuh2wxigy

View File

@@ -0,0 +1,9 @@
using Godot;
namespace CryptonymThunder.Code.Resources;
[GlobalClass]
public partial class PlayerComponentResource : Resource
{
}

View File

@@ -0,0 +1 @@
uid://p4vr80n70vkt

View File

@@ -0,0 +1,9 @@
using Godot;
namespace CryptonymThunder.Code.Resources;
[GlobalClass]
public partial class PositionComponentResource : Resource
{
}

View File

@@ -0,0 +1 @@
uid://df5wmj1jp2oy5

View File

@@ -0,0 +1,10 @@
using Godot;
namespace CryptonymThunder.Code.Resources;
[GlobalClass]
public partial class ProjectileComponentResource : Resource
{
[Export] public float Speed { get; set; } = 50.0f;
[Export] public float Lifetime { get; set; } = 5.0f;
}

View File

@@ -0,0 +1 @@
uid://ddryrwjq33832

View File

@@ -0,0 +1,9 @@
using Godot;
namespace CryptonymThunder.Code.Resources;
[GlobalClass]
public partial class RotationComponentResource : Resource
{
}

View File

@@ -0,0 +1 @@
uid://blm62f85g7icn

View File

@@ -0,0 +1,9 @@
using Godot;
namespace CryptonymThunder.Code.Resources;
[GlobalClass]
public partial class SimulationConfigResource : Resource
{
[Export] public float GravityStrength { get; set; } = 9.81f;
}

View File

@@ -0,0 +1 @@
uid://uearpvfk21ym

View File

@@ -0,0 +1,9 @@
using Godot;
namespace CryptonymThunder.Code.Resources;
[GlobalClass]
public partial class VelocityComponentResource : Resource
{
}

View File

@@ -0,0 +1 @@
uid://t4j1urlupxxv

View File

@@ -0,0 +1,9 @@
using Godot;
namespace CryptonymThunder.Code.Resources;
[GlobalClass]
public partial class WeaponComponentResource : Resource
{
[Export] public WeaponResource WeaponData { get; set; }
}

View File

@@ -0,0 +1 @@
uid://bp7mufswr41w6

View File

@@ -0,0 +1,14 @@
using GameCore.Combat;
using Godot;
namespace CryptonymThunder.Code.Resources;
[GlobalClass]
public partial class WeaponResource : Resource
{
[Export] public float FireRate { get; set; } = 1.0f;
[ExportGroup("Effects")]
[Export] public Godot.Collections.Array<EffectResource> OnFireEffects { get; set; } = [];
[Export] public Godot.Collections.Array<EffectResource> OnHitEffects { get; set; } = [];
}

View File

@@ -0,0 +1 @@
uid://hf0iut8o8do3