Example #1
0
 public bool SpiderLoop()
 {
     if (playerChoice == lure)
     {
         //Player lures the spiders with food
         this.mm.choiceSewerSpiders.setFlag();
         return(true);
         //In MissionEvent, spiders move out door toward "food"
     }
     else if (playerChoice == wait)
     {
         //Spiders don't move.  Nothing changes.
         new ActiveAction(mm.currentUI, true, 167, 1).execute();
         isChoosing.setFlag();
         return(false);
     }
     else if (playerChoice == attack)
     {
         //More spiders come.
         new ActiveAction(mm.currentUI, true, 168, 1).execute();
         isChoosing.setFlag();
         return(false);
     }
     else
     {
         return(false);            //Else should not occur unless player hasn't made decision.
     }
 }
 public bool CyclopsChoice()
 {
     if (playerChoice == correct)
     {
         int decision = cyclops.CorrectSuggestion();
         if (decision == Cyclops.APPLES)
         {
             this.mm.cyclopsChoice.setFlag();
             return(true);
             //In MissionEvent, cyclops agrees with player and thanks them.
         }
         else if (decision == Cyclops.SIT)
         {
             //Cyclops says "Hmmm... Let me think about that for a while."
             new TalkAction(mm.Cyclops, CyclopsThink, mm.currentUI, 154, 1).execute();
             isChoosing.setFlag();
             return(false);
         }
         else if (decision == Cyclops.ATTACK)
         {
             //Cyclops says "Why should I help people?  They never helped me!"
             new TalkAction(mm.Cyclops, CyclopsSelfish, mm.currentUI, 155, 1).execute();
             isChoosing.setFlag();
             return(false);
         }
         else
         {
             return(false);                //Else should not occur
         }
     }
     else if (playerChoice == neutral)
     {
         //Cyclops says "That won't change anything.  Nobody likes me."
         new TalkAction(mm.Cyclops, CyclopsCynical, mm.currentUI, 156, 1).execute();
         isChoosing.setFlag();
         return(false);
     }
     else if (playerChoice == incorrect)
     {
         cyclops.IncorrectSuggestion();
         //Cyclops says "Fine, then!  I'll just keep attacking!"
         new TalkAction(mm.Cyclops, CyclopsRage, mm.currentUI, 157, 1).execute();
         isChoosing.setFlag();
         return(false);
     }
     else
     {
         return(false);            //Else should not occur unless player hasn't made decision.
     }
 }
Example #3
0
    // Update is called once per frame
    void Update()
    {
        //If all of the thoughts have been defeated thoroughly, set the monster inactive and set hydraDefeated to true
        if (numTrumped == trumped.Length)
        {
            trigger.setFlag();
            this.gameObject.SetActive(false);
        }

        if (launchTimer < ballDelay)
        {
            launchTimer += Time.deltaTime;
        }
        else if (isFiring == true)
        {
            launchTimer = 0;
            a.SetTrigger("Launch");
            if (mon == Monster.Dragon)
            {
                GameObject Head = GameObject.Find("mountain_dragon_ Neck");
                Head.transform.LookAt(target.transform.position);
                print("turn?");
            }
            else
            {
                this.transform.LookAt(target.transform.position);
            }
        }
    }
Example #4
0
 public bool execute()
 {
     if (willBeSet)
     {
         thingToSet.setFlag();
     }
     else
     {
         thingToSet.resetFlag();
     }
     return(true);
 }
Example #5
0
 public bool Loop()
 {
     if (playerChoice == wait)
     {
         //Player waits for snakes to leave
         this.mm.choiceSnakes.setFlag();
         return(true);
         //In MissionEvent, snakes move off to the side and disappear
     }
     else if (playerChoice == attack)
     {
         //More snakes come.
         new ActiveAction(mm.currentUI, true, 216, 1).execute();
         isChoosing.setFlag();
         return(false);
     }
     else
     {
         return(false);            //Else should not occur unless player hasn't made decision.
     }
 }