Exemple #1
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();
        }
 /// <summary>
 /// Start
 /// </summary>
 private void Start()
 {
     if (followSpaceshipController == null)
     {
         PlayerControllerScript player_controller = FindObjectOfType <PlayerControllerScript>();
         if (player_controller != null)
         {
             followSpaceshipController = player_controller.GetComponent <SpaceshipControllerScript>();
         }
     }
 }