public static void Initialize(int gold, int hp) { _gold = gold; _hp = hp; _enemiesKilledCount = 0; GoldChanges?.Invoke(_gold); HpChanges?.Invoke(_hp); }
public static bool TrySpendGold(int gold) { if (_gold - gold >= 0) { _gold -= gold; GoldChanges?.Invoke(_gold); return(true); } else { return(false); } }
public static void TryAddGold(int gold) { _gold += gold; GoldChanges?.Invoke(_gold); }