Ejemplo n.º 1
0
        /// <summary>
        /// Start
        /// </summary>
        private void Start()
        {
            spaceshipController = GetComponent <SpaceshipControllerScript>();
            swarmController     = FindObjectOfType <SwarmControllerScript>();
            PlayerControllerScript player_controller = FindObjectOfType <PlayerControllerScript>();

            if (player_controller != null)
            {
                targetTransform = player_controller.transform;
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Start
        /// </summary>
        private void Start()
        {
            PlayerControllerScript player_controller = FindObjectOfType <PlayerControllerScript>();

            if (player_controller != null)
            {
                spaceshipController = player_controller.GetComponent <SpaceshipControllerScript>();
                Health = ((spaceshipController == null) ? 0.0f : spaceshipController.Health);
            }
            UpdateHUD();
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Start
 /// </summary>
 private void Start()
 {
     if (followSpaceshipController == null)
     {
         PlayerControllerScript player_controller = FindObjectOfType <PlayerControllerScript>();
         if (player_controller != null)
         {
             followSpaceshipController = player_controller.GetComponent <SpaceshipControllerScript>();
         }
     }
 }