void EnterGameOver() { gameOver = true; SpeechBubble.mainBubble.Activate(); SpeechBubble.AddMessage("your adventure has ended."); GameObject.Find("Combat").GetComponent <Canvas>().enabled = false; GameObject.Find("Navigation").GetComponent <Canvas>().enabled = false; }
public static void StartBattle(Room inputRoom) { instance.room = inputRoom; inCombat = true; SpeechBubble.mainBubble.Activate(); SpeechBubble.AddMessage("You encounter some baddies", false); Player.turnAvailable = true; }
// Update is called once per frame void Update() { if (!Player.turnAvailable && !GameController.frozen && EventQueue.instance.actionEvents.Count < 1) { if (room.enemies.Count < 1) { SpeechBubble.mainBubble.Activate(); SpeechBubble.AddMessage("all enemies eliminated", false); BattleController.inCombat = false; GameController.ExitEncounter(); } else { foreach (GameObject enemy in room.enemies) { enemy.GetComponent <Corgi> ().DoAction(); } } Player.turnAvailable = true; } }
public void Execute() { if (text != null) { SpeechBubble.AddMessage(text); } else { if (attackable != null) { IAttackable v = attackable.GetComponent(typeof(IAttackable)) as IAttackable; if (!destroy) { v.ReceiveHit(damage, damageType); } else { v.DestroyMe(); } } } executed = true; }