public void SetCallbacks(IInputActions instance)
 {
     if (m_Wrapper.m_InputActionsCallbackInterface != null)
     {
         @Directional.started   -= m_Wrapper.m_InputActionsCallbackInterface.OnDirectional;
         @Directional.performed -= m_Wrapper.m_InputActionsCallbackInterface.OnDirectional;
         @Directional.canceled  -= m_Wrapper.m_InputActionsCallbackInterface.OnDirectional;
         @Primary.started       -= m_Wrapper.m_InputActionsCallbackInterface.OnPrimary;
         @Primary.performed     -= m_Wrapper.m_InputActionsCallbackInterface.OnPrimary;
         @Primary.canceled      -= m_Wrapper.m_InputActionsCallbackInterface.OnPrimary;
         @Secondary.started     -= m_Wrapper.m_InputActionsCallbackInterface.OnSecondary;
         @Secondary.performed   -= m_Wrapper.m_InputActionsCallbackInterface.OnSecondary;
         @Secondary.canceled    -= m_Wrapper.m_InputActionsCallbackInterface.OnSecondary;
     }
     m_Wrapper.m_InputActionsCallbackInterface = instance;
     if (instance != null)
     {
         @Directional.started   += instance.OnDirectional;
         @Directional.performed += instance.OnDirectional;
         @Directional.canceled  += instance.OnDirectional;
         @Primary.started       += instance.OnPrimary;
         @Primary.performed     += instance.OnPrimary;
         @Primary.canceled      += instance.OnPrimary;
         @Secondary.started     += instance.OnSecondary;
         @Secondary.performed   += instance.OnSecondary;
         @Secondary.canceled    += instance.OnSecondary;
     }
 }
예제 #2
0
    private void Start()
    {
        mainCamera = Camera.main;

        sunRoot = GameObject.FindGameObjectWithTag(Constants.SUN_TAG).transform;

        inputActions = GetComponent <IInputActions>();
    }
예제 #3
0
 public void SetCallbacks(IInputActions instance)
 {
     if (m_Wrapper.m_InputActionsCallbackInterface != null)
     {
         @Move.started         -= m_Wrapper.m_InputActionsCallbackInterface.OnMove;
         @Move.performed       -= m_Wrapper.m_InputActionsCallbackInterface.OnMove;
         @Move.canceled        -= m_Wrapper.m_InputActionsCallbackInterface.OnMove;
         @Look.started         -= m_Wrapper.m_InputActionsCallbackInterface.OnLook;
         @Look.performed       -= m_Wrapper.m_InputActionsCallbackInterface.OnLook;
         @Look.canceled        -= m_Wrapper.m_InputActionsCallbackInterface.OnLook;
         @Attack.started       -= m_Wrapper.m_InputActionsCallbackInterface.OnAttack;
         @Attack.performed     -= m_Wrapper.m_InputActionsCallbackInterface.OnAttack;
         @Attack.canceled      -= m_Wrapper.m_InputActionsCallbackInterface.OnAttack;
         @Hide.started         -= m_Wrapper.m_InputActionsCallbackInterface.OnHide;
         @Hide.performed       -= m_Wrapper.m_InputActionsCallbackInterface.OnHide;
         @Hide.canceled        -= m_Wrapper.m_InputActionsCallbackInterface.OnHide;
         @Newaction2.started   -= m_Wrapper.m_InputActionsCallbackInterface.OnNewaction2;
         @Newaction2.performed -= m_Wrapper.m_InputActionsCallbackInterface.OnNewaction2;
         @Newaction2.canceled  -= m_Wrapper.m_InputActionsCallbackInterface.OnNewaction2;
         @Interact.started     -= m_Wrapper.m_InputActionsCallbackInterface.OnInteract;
         @Interact.performed   -= m_Wrapper.m_InputActionsCallbackInterface.OnInteract;
         @Interact.canceled    -= m_Wrapper.m_InputActionsCallbackInterface.OnInteract;
         @Throw.started        -= m_Wrapper.m_InputActionsCallbackInterface.OnThrow;
         @Throw.performed      -= m_Wrapper.m_InputActionsCallbackInterface.OnThrow;
         @Throw.canceled       -= m_Wrapper.m_InputActionsCallbackInterface.OnThrow;
     }
     m_Wrapper.m_InputActionsCallbackInterface = instance;
     if (instance != null)
     {
         @Move.started         += instance.OnMove;
         @Move.performed       += instance.OnMove;
         @Move.canceled        += instance.OnMove;
         @Look.started         += instance.OnLook;
         @Look.performed       += instance.OnLook;
         @Look.canceled        += instance.OnLook;
         @Attack.started       += instance.OnAttack;
         @Attack.performed     += instance.OnAttack;
         @Attack.canceled      += instance.OnAttack;
         @Hide.started         += instance.OnHide;
         @Hide.performed       += instance.OnHide;
         @Hide.canceled        += instance.OnHide;
         @Newaction2.started   += instance.OnNewaction2;
         @Newaction2.performed += instance.OnNewaction2;
         @Newaction2.canceled  += instance.OnNewaction2;
         @Interact.started     += instance.OnInteract;
         @Interact.performed   += instance.OnInteract;
         @Interact.canceled    += instance.OnInteract;
         @Throw.started        += instance.OnThrow;
         @Throw.performed      += instance.OnThrow;
         @Throw.canceled       += instance.OnThrow;
     }
 }
예제 #4
0
    private void Start()
    {
        inputActions = GetComponent <IInputActions>();
        selectRocket = GetComponent <ISelectRocket>();

        updateFireTimer   = new UpdateTimer(3, false);
        updateSensorTimer = new UpdateTimer(5, false);

        selectRocket.SelectRocket(0);

        overlapColliders = Physics.OverlapSphere(transform.position, aiRadius, 1 << LayerMask.NameToLayer(Constants.PLANET_LAYER));

        this.cameraMain = Camera.main;
    }
예제 #5
0
 public void SetCallbacks(IInputActions instance)
 {
     if (m_Wrapper.m_InputActionsCallbackInterface != null)
     {
         RightGrip.started       -= m_Wrapper.m_InputActionsCallbackInterface.OnRightGrip;
         RightGrip.performed     -= m_Wrapper.m_InputActionsCallbackInterface.OnRightGrip;
         RightGrip.canceled      -= m_Wrapper.m_InputActionsCallbackInterface.OnRightGrip;
         LeftGrip.started        -= m_Wrapper.m_InputActionsCallbackInterface.OnLeftGrip;
         LeftGrip.performed      -= m_Wrapper.m_InputActionsCallbackInterface.OnLeftGrip;
         LeftGrip.canceled       -= m_Wrapper.m_InputActionsCallbackInterface.OnLeftGrip;
         LeftPosition.started    -= m_Wrapper.m_InputActionsCallbackInterface.OnLeftPosition;
         LeftPosition.performed  -= m_Wrapper.m_InputActionsCallbackInterface.OnLeftPosition;
         LeftPosition.canceled   -= m_Wrapper.m_InputActionsCallbackInterface.OnLeftPosition;
         LeftRotation.started    -= m_Wrapper.m_InputActionsCallbackInterface.OnLeftRotation;
         LeftRotation.performed  -= m_Wrapper.m_InputActionsCallbackInterface.OnLeftRotation;
         LeftRotation.canceled   -= m_Wrapper.m_InputActionsCallbackInterface.OnLeftRotation;
         RightPosition.started   -= m_Wrapper.m_InputActionsCallbackInterface.OnRightPosition;
         RightPosition.performed -= m_Wrapper.m_InputActionsCallbackInterface.OnRightPosition;
         RightPosition.canceled  -= m_Wrapper.m_InputActionsCallbackInterface.OnRightPosition;
         RightRotation.started   -= m_Wrapper.m_InputActionsCallbackInterface.OnRightRotation;
         RightRotation.performed -= m_Wrapper.m_InputActionsCallbackInterface.OnRightRotation;
         RightRotation.canceled  -= m_Wrapper.m_InputActionsCallbackInterface.OnRightRotation;
     }
     m_Wrapper.m_InputActionsCallbackInterface = instance;
     if (instance != null)
     {
         RightGrip.started       += instance.OnRightGrip;
         RightGrip.performed     += instance.OnRightGrip;
         RightGrip.canceled      += instance.OnRightGrip;
         LeftGrip.started        += instance.OnLeftGrip;
         LeftGrip.performed      += instance.OnLeftGrip;
         LeftGrip.canceled       += instance.OnLeftGrip;
         LeftPosition.started    += instance.OnLeftPosition;
         LeftPosition.performed  += instance.OnLeftPosition;
         LeftPosition.canceled   += instance.OnLeftPosition;
         LeftRotation.started    += instance.OnLeftRotation;
         LeftRotation.performed  += instance.OnLeftRotation;
         LeftRotation.canceled   += instance.OnLeftRotation;
         RightPosition.started   += instance.OnRightPosition;
         RightPosition.performed += instance.OnRightPosition;
         RightPosition.canceled  += instance.OnRightPosition;
         RightRotation.started   += instance.OnRightRotation;
         RightRotation.performed += instance.OnRightRotation;
         RightRotation.canceled  += instance.OnRightRotation;
     }
 }
예제 #6
0
 public void SetCallbacks(IInputActions instance)
 {
     if (m_Wrapper.m_InputActionsCallbackInterface != null)
     {
         @Movement.started   -= m_Wrapper.m_InputActionsCallbackInterface.OnMovement;
         @Movement.performed -= m_Wrapper.m_InputActionsCallbackInterface.OnMovement;
         @Movement.canceled  -= m_Wrapper.m_InputActionsCallbackInterface.OnMovement;
         @Jump.started       -= m_Wrapper.m_InputActionsCallbackInterface.OnJump;
         @Jump.performed     -= m_Wrapper.m_InputActionsCallbackInterface.OnJump;
         @Jump.canceled      -= m_Wrapper.m_InputActionsCallbackInterface.OnJump;
     }
     m_Wrapper.m_InputActionsCallbackInterface = instance;
     if (instance != null)
     {
         @Movement.started   += instance.OnMovement;
         @Movement.performed += instance.OnMovement;
         @Movement.canceled  += instance.OnMovement;
         @Jump.started       += instance.OnJump;
         @Jump.performed     += instance.OnJump;
         @Jump.canceled      += instance.OnJump;
     }
 }
예제 #7
0
 public void SetCallbacks(IInputActions instance)
 {
     if (m_Wrapper.m_InputActionsCallbackInterface != null)
     {
         position.started        -= m_Wrapper.m_InputActionsCallbackInterface.OnPosition;
         position.performed      -= m_Wrapper.m_InputActionsCallbackInterface.OnPosition;
         position.cancelled      -= m_Wrapper.m_InputActionsCallbackInterface.OnPosition;
         input_forward.started   -= m_Wrapper.m_InputActionsCallbackInterface.OnInput_forward;
         input_forward.performed -= m_Wrapper.m_InputActionsCallbackInterface.OnInput_forward;
         input_forward.cancelled -= m_Wrapper.m_InputActionsCallbackInterface.OnInput_forward;
         input_back.started      -= m_Wrapper.m_InputActionsCallbackInterface.OnInput_back;
         input_back.performed    -= m_Wrapper.m_InputActionsCallbackInterface.OnInput_back;
         input_back.cancelled    -= m_Wrapper.m_InputActionsCallbackInterface.OnInput_back;
         input_right.started     -= m_Wrapper.m_InputActionsCallbackInterface.OnInput_right;
         input_right.performed   -= m_Wrapper.m_InputActionsCallbackInterface.OnInput_right;
         input_right.cancelled   -= m_Wrapper.m_InputActionsCallbackInterface.OnInput_right;
         input_left.started      -= m_Wrapper.m_InputActionsCallbackInterface.OnInput_left;
         input_left.performed    -= m_Wrapper.m_InputActionsCallbackInterface.OnInput_left;
         input_left.cancelled    -= m_Wrapper.m_InputActionsCallbackInterface.OnInput_left;
         input_func00.started    -= m_Wrapper.m_InputActionsCallbackInterface.OnInput_func00;
         input_func00.performed  -= m_Wrapper.m_InputActionsCallbackInterface.OnInput_func00;
         input_func00.cancelled  -= m_Wrapper.m_InputActionsCallbackInterface.OnInput_func00;
         input_func01.started    -= m_Wrapper.m_InputActionsCallbackInterface.OnInput_func01;
         input_func01.performed  -= m_Wrapper.m_InputActionsCallbackInterface.OnInput_func01;
         input_func01.cancelled  -= m_Wrapper.m_InputActionsCallbackInterface.OnInput_func01;
         input_func02.started    -= m_Wrapper.m_InputActionsCallbackInterface.OnInput_func02;
         input_func02.performed  -= m_Wrapper.m_InputActionsCallbackInterface.OnInput_func02;
         input_func02.cancelled  -= m_Wrapper.m_InputActionsCallbackInterface.OnInput_func02;
         input_func03.started    -= m_Wrapper.m_InputActionsCallbackInterface.OnInput_func03;
         input_func03.performed  -= m_Wrapper.m_InputActionsCallbackInterface.OnInput_func03;
         input_func03.cancelled  -= m_Wrapper.m_InputActionsCallbackInterface.OnInput_func03;
         input_func04.started    -= m_Wrapper.m_InputActionsCallbackInterface.OnInput_func04;
         input_func04.performed  -= m_Wrapper.m_InputActionsCallbackInterface.OnInput_func04;
         input_func04.cancelled  -= m_Wrapper.m_InputActionsCallbackInterface.OnInput_func04;
         input_func05.started    -= m_Wrapper.m_InputActionsCallbackInterface.OnInput_func05;
         input_func05.performed  -= m_Wrapper.m_InputActionsCallbackInterface.OnInput_func05;
         input_func05.cancelled  -= m_Wrapper.m_InputActionsCallbackInterface.OnInput_func05;
         input_func06.started    -= m_Wrapper.m_InputActionsCallbackInterface.OnInput_func06;
         input_func06.performed  -= m_Wrapper.m_InputActionsCallbackInterface.OnInput_func06;
         input_func06.cancelled  -= m_Wrapper.m_InputActionsCallbackInterface.OnInput_func06;
         input_func07.started    -= m_Wrapper.m_InputActionsCallbackInterface.OnInput_func07;
         input_func07.performed  -= m_Wrapper.m_InputActionsCallbackInterface.OnInput_func07;
         input_func07.cancelled  -= m_Wrapper.m_InputActionsCallbackInterface.OnInput_func07;
         input_func08.started    -= m_Wrapper.m_InputActionsCallbackInterface.OnInput_func08;
         input_func08.performed  -= m_Wrapper.m_InputActionsCallbackInterface.OnInput_func08;
         input_func08.cancelled  -= m_Wrapper.m_InputActionsCallbackInterface.OnInput_func08;
         input_func09.started    -= m_Wrapper.m_InputActionsCallbackInterface.OnInput_func09;
         input_func09.performed  -= m_Wrapper.m_InputActionsCallbackInterface.OnInput_func09;
         input_func09.cancelled  -= m_Wrapper.m_InputActionsCallbackInterface.OnInput_func09;
         input_func10.started    -= m_Wrapper.m_InputActionsCallbackInterface.OnInput_func10;
         input_func10.performed  -= m_Wrapper.m_InputActionsCallbackInterface.OnInput_func10;
         input_func10.cancelled  -= m_Wrapper.m_InputActionsCallbackInterface.OnInput_func10;
         input_func11.started    -= m_Wrapper.m_InputActionsCallbackInterface.OnInput_func11;
         input_func11.performed  -= m_Wrapper.m_InputActionsCallbackInterface.OnInput_func11;
         input_func11.cancelled  -= m_Wrapper.m_InputActionsCallbackInterface.OnInput_func11;
         input_func12.started    -= m_Wrapper.m_InputActionsCallbackInterface.OnInput_func12;
         input_func12.performed  -= m_Wrapper.m_InputActionsCallbackInterface.OnInput_func12;
         input_func12.cancelled  -= m_Wrapper.m_InputActionsCallbackInterface.OnInput_func12;
         input_func13.started    -= m_Wrapper.m_InputActionsCallbackInterface.OnInput_func13;
         input_func13.performed  -= m_Wrapper.m_InputActionsCallbackInterface.OnInput_func13;
         input_func13.cancelled  -= m_Wrapper.m_InputActionsCallbackInterface.OnInput_func13;
         input_func14.started    -= m_Wrapper.m_InputActionsCallbackInterface.OnInput_func14;
         input_func14.performed  -= m_Wrapper.m_InputActionsCallbackInterface.OnInput_func14;
         input_func14.cancelled  -= m_Wrapper.m_InputActionsCallbackInterface.OnInput_func14;
         input_func15.started    -= m_Wrapper.m_InputActionsCallbackInterface.OnInput_func15;
         input_func15.performed  -= m_Wrapper.m_InputActionsCallbackInterface.OnInput_func15;
         input_func15.cancelled  -= m_Wrapper.m_InputActionsCallbackInterface.OnInput_func15;
     }
     m_Wrapper.m_InputActionsCallbackInterface = instance;
     if (instance != null)
     {
         position.started        += instance.OnPosition;
         position.performed      += instance.OnPosition;
         position.cancelled      += instance.OnPosition;
         input_forward.started   += instance.OnInput_forward;
         input_forward.performed += instance.OnInput_forward;
         input_forward.cancelled += instance.OnInput_forward;
         input_back.started      += instance.OnInput_back;
         input_back.performed    += instance.OnInput_back;
         input_back.cancelled    += instance.OnInput_back;
         input_right.started     += instance.OnInput_right;
         input_right.performed   += instance.OnInput_right;
         input_right.cancelled   += instance.OnInput_right;
         input_left.started      += instance.OnInput_left;
         input_left.performed    += instance.OnInput_left;
         input_left.cancelled    += instance.OnInput_left;
         input_func00.started    += instance.OnInput_func00;
         input_func00.performed  += instance.OnInput_func00;
         input_func00.cancelled  += instance.OnInput_func00;
         input_func01.started    += instance.OnInput_func01;
         input_func01.performed  += instance.OnInput_func01;
         input_func01.cancelled  += instance.OnInput_func01;
         input_func02.started    += instance.OnInput_func02;
         input_func02.performed  += instance.OnInput_func02;
         input_func02.cancelled  += instance.OnInput_func02;
         input_func03.started    += instance.OnInput_func03;
         input_func03.performed  += instance.OnInput_func03;
         input_func03.cancelled  += instance.OnInput_func03;
         input_func04.started    += instance.OnInput_func04;
         input_func04.performed  += instance.OnInput_func04;
         input_func04.cancelled  += instance.OnInput_func04;
         input_func05.started    += instance.OnInput_func05;
         input_func05.performed  += instance.OnInput_func05;
         input_func05.cancelled  += instance.OnInput_func05;
         input_func06.started    += instance.OnInput_func06;
         input_func06.performed  += instance.OnInput_func06;
         input_func06.cancelled  += instance.OnInput_func06;
         input_func07.started    += instance.OnInput_func07;
         input_func07.performed  += instance.OnInput_func07;
         input_func07.cancelled  += instance.OnInput_func07;
         input_func08.started    += instance.OnInput_func08;
         input_func08.performed  += instance.OnInput_func08;
         input_func08.cancelled  += instance.OnInput_func08;
         input_func09.started    += instance.OnInput_func09;
         input_func09.performed  += instance.OnInput_func09;
         input_func09.cancelled  += instance.OnInput_func09;
         input_func10.started    += instance.OnInput_func10;
         input_func10.performed  += instance.OnInput_func10;
         input_func10.cancelled  += instance.OnInput_func10;
         input_func11.started    += instance.OnInput_func11;
         input_func11.performed  += instance.OnInput_func11;
         input_func11.cancelled  += instance.OnInput_func11;
         input_func12.started    += instance.OnInput_func12;
         input_func12.performed  += instance.OnInput_func12;
         input_func12.cancelled  += instance.OnInput_func12;
         input_func13.started    += instance.OnInput_func13;
         input_func13.performed  += instance.OnInput_func13;
         input_func13.cancelled  += instance.OnInput_func13;
         input_func14.started    += instance.OnInput_func14;
         input_func14.performed  += instance.OnInput_func14;
         input_func14.cancelled  += instance.OnInput_func14;
         input_func15.started    += instance.OnInput_func15;
         input_func15.performed  += instance.OnInput_func15;
         input_func15.cancelled  += instance.OnInput_func15;
     }
 }