Exemple #1
0
        /// <summary>
        /// Sets up the player ship data.
        /// </summary>
        virtual protected void Init()
        {
            health  = maxHealth;
            shields = maxShields;

            myDetector = GetComponent <SphereDetector>();
            myFaction  = GetComponent <Faction>();
            if (myFaction != null)
            {
                if (myShooter != null)
                {
                    myShooter.SetWeaponFaction(myFaction.FactionName);
                }
                if (mySecondaryShooter != null)
                {
                    mySecondaryShooter.SetWeaponFaction(myFaction.FactionName);
                }
            }

            // Set the current position as the desired destination
            //SetDestinationInput(transform.position);
        }