Re-introduce prototype code
This commit is contained in:
8
src/items/ArmorItem.cs
Normal file
8
src/items/ArmorItem.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
using Godot;
|
||||
|
||||
[GlobalClass]
|
||||
public partial class ArmorItem : InventoryItem
|
||||
{
|
||||
[Export]
|
||||
public required int Defense { get; set; }
|
||||
}
|
||||
11
src/items/InventoryItem.cs
Normal file
11
src/items/InventoryItem.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using Godot;
|
||||
|
||||
[GlobalClass]
|
||||
public partial class InventoryItem : Resource
|
||||
{
|
||||
[Export]
|
||||
public string Name = string.Empty;
|
||||
|
||||
[Export]
|
||||
public string Description = string.Empty;
|
||||
}
|
||||
10
src/items/WeaponItem.cs
Normal file
10
src/items/WeaponItem.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
using Godot;
|
||||
|
||||
[GlobalClass]
|
||||
public partial class WeaponItem : InventoryItem
|
||||
{
|
||||
[Export]
|
||||
public required int Damage { get; set; }
|
||||
|
||||
public static WeaponItem Default => new WeaponItem() { Damage = 1 };
|
||||
}
|
||||
Reference in New Issue
Block a user