Ejemplo n.º 1
0
        void Awake()
        {
            instance = this;

            Player = GameObject.FindGameObjectWithTag("Player");
            if (!Player)
            {
                throw new Exception("Player object not set in FloatingOrigin script.");
            }

            if (!StreamingWorld)
            {
                throw new Exception("StreamingWorld not set in FloatingOrigin script.");
            }

            playerMotor = Player.GetComponent <PlayerMotor>();
            if (!playerMotor)
            {
                throw new Exception("Player object does not have a PlayerMotor.");
            }

            acrobatMotor = Player.GetComponent <AcrobatMotor>();
            if (!acrobatMotor)
            {
                throw new Exception("Player object does not have an AcrobatMotor.");
            }

            groundMotor = Player.GetComponent <PlayerGroundMotor>();
            if (!groundMotor)
            {
                throw new Exception("Player object does not have a PlayerGroundMotor.");
            }
        }
Ejemplo n.º 2
0
 void Awake()
 {
     instance = this;
 }
Ejemplo n.º 3
0
        void Awake()
        {
            instance = this;

            Player = GameObject.FindGameObjectWithTag("Player");
            if (!Player)
                throw new Exception("Player object not set in FloatingOrigin script.");

            if (!StreamingWorld)
                throw new Exception("StreamingWorld not set in FloatingOrigin script.");

            playerMotor = Player.GetComponent<PlayerMotor>();
            if (!playerMotor)
                throw new Exception("Player object does not have a PlayerMotor.");
        }
Ejemplo n.º 4
0
 void Awake()
 {
     instance = this;
 }