Beispiel #1
0
 void Start()
 {
     playerMotor   = GetComponent <PlayerMotor>();
     frictionMotor = GetComponent <FrictionMotor>();
     climbingMotor = GetComponent <ClimbingMotor>();
     myTransform   = playerMotor.transform;
 }
Beispiel #2
0
 private void Start()
 {
     playerMotor   = GetComponent <PlayerMotor>();
     groundMotor   = GetComponent <PlayerGroundMotor>();
     speedChanger  = GetComponent <PlayerSpeedChanger>();
     climbingMotor = GetComponent <ClimbingMotor>();
     playerCamera  = GameManager.Instance.MainCamera;
 }
Beispiel #3
0
 void Start()
 {
     controller   = GetComponent <CharacterController>();
     acrobatMotor = GetComponent <AcrobatMotor>();
     //playerMotor = GetComponent<PlayerMotor>();
     hangingMotor  = GetComponent <HangingMotor>();
     climbingMotor = GetComponent <ClimbingMotor>();
     HeadHitRadius = controller.radius * 0.85f;
 }
Beispiel #4
0
 void Start()
 {
     playerMotor   = GetComponent <PlayerMotor>();
     controller    = GetComponent <CharacterController>();
     frictionMotor = GetComponent <FrictionMotor>();
     climbingMotor = GetComponent <ClimbingMotor>();
     stepDetector  = GetComponent <PlayerStepDetector>();
     myTransform   = playerMotor.transform;
 }
Beispiel #5
0
 void Start()
 {
     playerMotor   = GetComponent <PlayerMotor>();
     controller    = GetComponent <CharacterController>();
     frictionMotor = GetComponent <FrictionMotor>();
     climbingMotor = GetComponent <ClimbingMotor>();
     playerScanner = GetComponent <PlayerMoveScanner>();
     rappelMotor   = GetComponent <RappelMotor>();
     myTransform   = playerMotor.transform;
 }
        void Start()
        {
            playerMotor     = GetComponent <PlayerMotor>();
            playerEnterExit = GetComponent <PlayerEnterExit>();
            climbingMotor   = GetComponent <ClimbingMotor>();
            mainCamera      = GameManager.Instance.MainCamera;
            restPos         = mainCamera.transform.localPosition;

            bobSpeed    = GetComponent <PlayerFootsteps>().WalkStepInterval / 2.0f; // 1.20f;
            bIsStopping = false;
        }
        private void Start()
        {
            player = GameManager.Instance.PlayerEntity;

            acrobatMotor  = GetComponent <AcrobatMotor>();
            controller    = GetComponent <CharacterController>();
            speedChanger  = GetComponent <PlayerSpeedChanger>();
            groundMotor   = GetComponent <PlayerGroundMotor>();
            climbingMotor = GetComponent <ClimbingMotor>();
            playerScanner = GetComponent <PlayerMoveScanner>();
            hangingMotor  = GetComponent <HangingMotor>();
        }
Beispiel #8
0
 private void Start()
 {
     //player = GameManager.Instance.PlayerEntity;
     playerMotor   = GetComponent <PlayerMotor>();
     acrobatMotor  = GetComponent <AcrobatMotor>();
     levitateMotor = GetComponent <LevitateMotor>();
     controller    = GetComponent <CharacterController>();
     speedChanger  = GetComponent <PlayerSpeedChanger>();
     groundMotor   = GetComponent <PlayerGroundMotor>();
     rappelMotor   = GetComponent <RappelMotor>();
     climbingMotor = GetComponent <ClimbingMotor>();
     scanner       = GetComponent <PlayerMoveScanner>();
     //camTransform = GameManager.Instance.MainCamera.transform;
 }
Beispiel #9
0
        private void Start()
        {
            player = GameManager.Instance.PlayerEntity;

            acrobatMotor  = GetComponent <AcrobatMotor>();
            controller    = GetComponent <CharacterController>();
            speedChanger  = GetComponent <PlayerSpeedChanger>();
            groundMotor   = GetComponent <PlayerGroundMotor>();
            climbingMotor = GetComponent <ClimbingMotor>();
            playerScanner = GetComponent <PlayerMoveScanner>();
            //hangingMotor = GetComponent<HangingMotor>();

            // Prevent save while rappeling, erializing that case is not worth the trouble
            GameManager.Instance.SaveLoadManager.RegisterPreventSaveCondition(() => rappelStage != RappelStage.Inactive);
        }
Beispiel #10
0
        void Start()
        {
            controller    = GetComponent <CharacterController>();
            speedChanger  = GetComponent <PlayerSpeedChanger>();
            myTransform   = transform;
            speed         = speedChanger.GetBaseSpeed();
            jumpTimer     = antiBunnyHopFactor;
            climbingMotor = GetComponent <ClimbingMotor>();
            heightChanger = GetComponent <PlayerHeightChanger>();
            levitateMotor = GetComponent <LevitateMotor>();
            frictionMotor = GetComponent <FrictionMotor>();

            // Allow for resetting specific player state on new game or when game starts loading
            SaveLoadManager.OnStartLoad  += SaveLoadManager_OnStartLoad;
            StartGameBehaviour.OnNewGame += StartGameBehaviour_OnNewGame;
        }
        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>();

            // Allow for resetting specific player state on new game or when game starts loading
            SaveLoadManager.OnStartLoad  += SaveLoadManager_OnStartLoad;
            StartGameBehaviour.OnNewGame += StartGameBehaviour_OnNewGame;
        }
Beispiel #12
0
        private void Start()
        {
            playerMotor    = GetComponent <PlayerMotor>();
            controller     = GetComponent <CharacterController>();
            headBobber     = GetComponent <HeadBobber>();
            mainCamera     = GameManager.Instance.MainCamera;
            levitateMotor  = GetComponent <LevitateMotor>();
            climbingMotor  = GetComponent <ClimbingMotor>();
            camSwimLevel   = controllerSwimHeight / 2f;
            camCrouchLevel = controllerCrouchHeight / 2f;
            camStandLevel  = controllerStandingHeight / 2f;
            camRideLevel   = controllerRideHeight / 2f - eyeHeight;
            //camSwimToCrouchDist = (controllerCrouchHeight - controllerSwimHeight) / 2f;
            camCrouchToStandDist = (controllerStandingHeight - controllerCrouchHeight) / 2f;
            //camStandToRideDist = (controllerRideHeight - controllerStandHeight) / 2f;

            // Use event to set whether player is crouched on load
            SaveLoadManager.OnStartLoad += SaveLoadManager_OnStartLoad;
        }