Esempio n. 1
0
 void Start()
 {
     playerMotor   = GetComponent <PlayerMotor>();
     controller    = GetComponent <CharacterController>();
     frictionMotor = GetComponent <FrictionMotor>();
     climbingMotor = GetComponent <ClimbingMotor>();
     stepDetector  = GetComponent <PlayerStepDetector>();
     myTransform   = playerMotor.transform;
 }
 void Start()
 {
     player          = GameManager.Instance.PlayerEntity;
     playerMotor     = GetComponent <PlayerMotor>();
     groundMotor     = GetComponent <PlayerGroundMotor>();
     levitateMotor   = GetComponent <LevitateMotor>();
     controller      = GetComponent <CharacterController>();
     playerEnterExit = GetComponent <PlayerEnterExit>();
     acrobatMotor    = GetComponent <AcrobatMotor>();
     speedChanger    = GetComponent <PlayerSpeedChanger>();
     stepDetector    = GetComponent <PlayerStepDetector>();
 }
        void Start()
        {
            controller      = GetComponent <CharacterController>();
            speedChanger    = GetComponent <PlayerSpeedChanger>();
            speed           = speedChanger.GetBaseSpeed();
            groundMotor     = GetComponent <PlayerGroundMotor>();
            climbingMotor   = GetComponent <ClimbingMotor>();
            heightChanger   = GetComponent <PlayerHeightChanger>();
            levitateMotor   = GetComponent <LevitateMotor>();
            frictionMotor   = GetComponent <FrictionMotor>();
            acrobatMotor    = GetComponent <AcrobatMotor>();
            stepDetector    = GetComponent <PlayerStepDetector>();
            playerEnterExit = GameManager.Instance.PlayerEnterExit;

            // Allow for resetting specific player state on new game or when game starts loading
            SaveLoadManager.OnStartLoad  += SaveLoadManager_OnStartLoad;
            StartGameBehaviour.OnNewGame += StartGameBehaviour_OnNewGame;
        }