private void OnServerDamage(DamageInfo info) { if (integrity.integrity - info.Damage <= 0) { ExplodeContainer(); integrity.RestoreIntegrity(integrity.initialIntegrity); } }
private void IncreaseMeat(int meatIncrease = 1) { meat += meatIncrease; //Restore 5% integrity integrity.RestoreIntegrity(integrity.initialIntegrity * 0.05f); if (meat < meatCost) { return; } meat -= meatCost; //Increase eggs ashwalkerEggs++; SetSprite(); GhostRoleManager.Instance.ServerUpdateRole(createdRoleKey, 1, ashwalkerEggs, -1); Chat.AddLocalMsgToChat("One of the eggs swells to an unnatural size and tumbles free. It's ready to hatch!", gameObject); }