Fix box issue
This commit is contained in:
@@ -15,12 +15,16 @@ public partial class ThrowableItem : Node3D, IBaseInventoryItem, IStackable
|
|||||||
|
|
||||||
[Node] private Sprite3D _sprite { get; set; } = default!;
|
[Node] private Sprite3D _sprite { get; set; } = default!;
|
||||||
|
|
||||||
|
public ThrowableItem()
|
||||||
|
{
|
||||||
|
var rng = new RandomNumberGenerator();
|
||||||
|
rng.Randomize();
|
||||||
|
Count = new AutoProp<int>(rng.RandiRange(1, 5));
|
||||||
|
}
|
||||||
|
|
||||||
public override void _Ready()
|
public override void _Ready()
|
||||||
{
|
{
|
||||||
_sprite.Texture = Stats.Texture;
|
_sprite.Texture = Stats.Texture;
|
||||||
var rng = new RandomNumberGenerator();
|
|
||||||
rng.Randomize();
|
|
||||||
Count = new AutoProp<int>(rng.RandiRange(Stats.MinimumCount, Stats.MaximumCount));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public string ItemName => Stats.Name;
|
public string ItemName => Stats.Name;
|
||||||
|
|||||||
Reference in New Issue
Block a user