mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-09 17:15:55 +00:00
Loot Drops
This commit is contained in:
parent
9d0b399052
commit
b7d241bf11
16 changed files with 129 additions and 6 deletions
13
Scripts/Resources/Loot/LootDrop.cs
Normal file
13
Scripts/Resources/Loot/LootDrop.cs
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
using Godot;
|
||||
|
||||
namespace Cirno.Scripts.Resources.Loot;
|
||||
|
||||
[GlobalClass]
|
||||
public partial class LootDrop : Resource
|
||||
{
|
||||
[Export]
|
||||
public LootItem Item { get; private set; }
|
||||
|
||||
[Export(PropertyHint.None, "suffix:%")]
|
||||
public float Chance { get; private set; }
|
||||
}
|
||||
1
Scripts/Resources/Loot/LootDrop.cs.uid
Normal file
1
Scripts/Resources/Loot/LootDrop.cs.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://cq65aed620ijo
|
||||
|
|
@ -19,7 +19,7 @@ public partial class LootItem : Resource
|
|||
[Export] public Texture2D InventorySprite;
|
||||
[Export] public SpriteFrames WorldSprite;
|
||||
[Export] public PackedScene HudItemScene;
|
||||
|
||||
[Export(PropertyHint.File)] public StringName DropScenePath { get; private set; } // Has to be a string path to avoid recursion issues
|
||||
}
|
||||
|
||||
public enum UiItemType
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue