Exemplo n.º 1
0
    void Awake()
    {
        // Cursor
        Cursor.visible   = false;
        Cursor.lockState = CursorLockMode.Locked;

        // Camera
        CameraSetup();

        // Rb
        m_Rb = GetComponent <Rigidbody>();

        // Transform
        m_MoveDir      = Vector3.zero;
        m_ForwardForce = Vector3.zero;
        m_StrafeForce  = Vector3.zero;

        m_NextLookRotation    = Vector2.zero;
        m_CurrentLookRotation = Vector2.zero;

        m_AccelScaler  = 50.0f;
        m_ForwardAccel = m_MoveAcceleration * m_AccelScaler;
        m_StrafeAccel  = m_MoveAcceleration * m_AccelScaler;

        // Temp gun
        m_Gunhandler = GetComponent <GunHandler>();
        m_Gunhandler.Init();
        m_CurrentGunIdx = m_Gunhandler.GetActiveGunIdx();
    }