예제 #1
0
    public float GetMaxGrappleDistance()
    {
        if (!grappleMotor)
        {
            grappleMotor = GetComponent <GrappleMotor>();
        }

        return(grappleMotor.maxRopeLength);
    }
예제 #2
0
    private void Awake()
    {
        controller   = GetComponent <CharacterController>();
        walkingMotor = GetComponent <WalkingMotor>();
        fallingMotor = GetComponent <FallingMotor>();
        startMotor   = GetComponent <StartMotor>();
        grappleMotor = GetComponent <GrappleMotor>();
        wallRunMotor = GetComponent <WallRunMotor>();

        audioSrc = GetComponent <AudioSource>();

        resetLocation = GameObject.Find("Reset Location").transform;
        streaks       = GameObject.Find("Speed Streaks").GetComponent <SpeedStreaks>();

        Cursor.lockState = CursorLockMode.Locked;
    }