Beispiel #1
0
 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;
 }
Beispiel #2
0
 public static void StartBattle(Room inputRoom)
 {
     instance.room = inputRoom;
     inCombat      = true;
     SpeechBubble.mainBubble.Activate();
     SpeechBubble.AddMessage("You encounter some baddies", false);
     Player.turnAvailable = true;
 }
Beispiel #3
0
 // 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;
     }
 }
Beispiel #4
0
 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;
 }