private void ResetGame() { ring.Activate(false); ring.ResetRingLocation(); Creator.gameEndShown = false; gameOverUi.SetActive(false); gameWonUi.SetActive(false); tapToStart.SetActive(true); tapToRestart.SetActive(false); tapToContinue.SetActive(false); Time.timeScale = 1; AtMenu(); }
public virtual void RestoreFromBundle(Bundle bundle) { Backpack.Clear(); Backpack.RestoreFromBundle(bundle); Weapon = (KindOfWeapon)bundle.Get(WEAPON); if (Weapon != null) { Weapon.Activate(_owner); } Armor = (Armor)bundle.Get(ARMOR); Ring1 = (Ring)bundle.Get(RING1); if (Ring1 != null) { Ring1.Activate(_owner); } Ring2 = (Ring)bundle.Get(RING2); if (Ring2 != null) { Ring2.Activate(_owner); } }
public virtual void Resurrect(int depth) { foreach (var item in Backpack.Items.ToArray()) { var key = item as Key; if (key != null) { if (key.depth == depth) { key.DetachAll(Backpack); } } else if (!item.IsEquipped(_owner)) { item.DetachAll(Backpack); } } if (Weapon != null) { Weapon.cursed = false; Weapon.Activate(_owner); } if (Armor != null) { Armor.cursed = false; } if (Ring1 != null) { Ring1.cursed = false; Ring1.Activate(_owner); } if (Ring2 != null) { Ring2.cursed = false; Ring2.Activate(_owner); } }