Ejemplo n.º 1
0
 protected override void InitAi()
 {
     if (activated)
     {
         return;
     }
     if (choseRandomPath)
     {
         if (!formationTarget)
         {
             formationTarget = transform;
         }
         formationTarget.position = PathManager.ChosePath(formationTarget.position);
     }
     else
     {
         // move to init location on x axis
         if (!isRandomized)
         {
             transform.position = new Vector2(initLocation.position.x, transform.position.y);
         }
     }
     if (guns)
     {
         guns.Activate(0);
     }
     if (disableAfterInit)
     {
         enabled = false;
     }
 }