Fix texture stuff
This commit is contained in:
12
Zennysoft.Game.Ma.Implementation/Item/IInventory.cs
Normal file
12
Zennysoft.Game.Ma.Implementation/Item/IInventory.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
namespace Zennysoft.Ma.Adapter;
|
||||
|
||||
public interface IInventory
|
||||
{
|
||||
public List<InventoryItem> Items { get; }
|
||||
|
||||
public bool TryAdd(InventoryItem inventoryItem);
|
||||
|
||||
public void Remove(InventoryItem inventoryItem);
|
||||
|
||||
public void Sort();
|
||||
}
|
||||
24
Zennysoft.Game.Ma.Implementation/Item/InventoryItem.cs
Normal file
24
Zennysoft.Game.Ma.Implementation/Item/InventoryItem.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using Chickensoft.Introspection;
|
||||
using Chickensoft.Serialization;
|
||||
using Godot;
|
||||
|
||||
namespace Zennysoft.Ma.Adapter;
|
||||
|
||||
[Meta, Id("inventory_item")]
|
||||
public abstract partial class InventoryItem : Node3D
|
||||
{
|
||||
[Save("inventory_item_id")]
|
||||
public Guid ID => Guid.NewGuid();
|
||||
[Save("inventory_item_name")]
|
||||
public abstract string ItemName { get; }
|
||||
[Save("inventory_item_description")]
|
||||
public abstract string Description { get; }
|
||||
[Save("inventory_item_spawn_rate")]
|
||||
public abstract float SpawnRate { get; }
|
||||
[Save("inventory_item_throw_damage")]
|
||||
public abstract double ThrowDamage { get; }
|
||||
[Save("inventory_item_throw_speed")]
|
||||
public abstract float ThrowSpeed { get; }
|
||||
|
||||
public abstract Texture2D GetTexture();
|
||||
}
|
||||
17
Zennysoft.Game.Ma.Implementation/Item/RescuedItemDatabase.cs
Normal file
17
Zennysoft.Game.Ma.Implementation/Item/RescuedItemDatabase.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using Chickensoft.Introspection;
|
||||
using Chickensoft.Serialization;
|
||||
using Zennysoft.Game.Abstractions;
|
||||
|
||||
namespace Zennysoft.Ma.Adapter;
|
||||
|
||||
[Meta, Id("rescued_items")]
|
||||
public partial class RescuedItemDatabase
|
||||
{
|
||||
[Save("rescued_item_list")]
|
||||
public List<InventoryItem> Items { get; init; }
|
||||
|
||||
public RescuedItemDatabase()
|
||||
{
|
||||
Items = new List<InventoryItem>();
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Zennysoft.Ma.Godot.Adapter;
|
||||
namespace Zennysoft.Ma.Adapter;
|
||||
|
||||
public enum AccessoryTag
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Zennysoft.Ma.Godot.Adapter;
|
||||
namespace Zennysoft.Ma.Adapter;
|
||||
|
||||
public enum BoxItemTag
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Zennysoft.Ma.Godot.Adapter;
|
||||
namespace Zennysoft.Ma.Adapter;
|
||||
|
||||
public enum ElementType
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Zennysoft.Ma.Godot.Adapter;
|
||||
namespace Zennysoft.Ma.Adapter;
|
||||
|
||||
public enum ItemTag
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Zennysoft.Ma.Godot.Adapter;
|
||||
namespace Zennysoft.Ma.Adapter;
|
||||
|
||||
public enum ThrowableItemTag
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Zennysoft.Ma.Godot.Adapter;
|
||||
namespace Zennysoft.Ma.Adapter;
|
||||
|
||||
public enum UsableItemTag
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Zennysoft.Ma.Godot.Adapter;
|
||||
namespace Zennysoft.Ma.Adapter;
|
||||
|
||||
public enum WeaponTag
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user