Exemple #1
0
 //Update is called once per frame
 void Update()
 {
     //Only checks activation if deactive, it will keep trying to chase the player forever.
     if (!isActive)
     {
         isActive = ControllerMob.ActivationCheck(gameObject);
     }
     else
     {
         //Updates movement if Skitter returns true, enabling the bursts of skittering movement.
         UpdateMovement(UpdateSkitter());
     }
 }
Exemple #2
0
    //Update is divided into private methods
    //Most methods depend on current pause state.
    void Update()
    {
        //Checks for activation each tick (So that it does not keep spawning deactivated enemies when the player walks away)
        isActive = ControllerMob.ActivationCheck(gameObject);

        UpdateIsolation();

        if ((isActive) && (!ControllerGame.IsPaused))
        {
            if (isIsolated == false)
            {
                UpdateRotation();
                UpdateSpawn();
            }
        }
    }