コード例 #1
0
 public float RotateCameraH()
 {
     return (
         InputToFloat(XBGamePad.IsPressed(XBKeyCode.Button.RightShoulder, m_userCode))
         ) - (
         InputToFloat(XBGamePad.IsPressed(XBKeyCode.Button.LeftShoulder, m_userCode))
         );
 }
コード例 #2
0
        public bool Dbg_IsUnlimitedBullet()
        {
#if DEBUG
            return (XBGamePad.IsTriggered(XBKeyCode.Button.RightShoulder, m_userCode)) 
                && (XBGamePad.GetAxisRaw(XBKeyCode.Axis.Dpad, m_userCode).x >= 1.0f);
#else
            return false;
#endif
        }
コード例 #3
0
        public bool Dbg_IsReloadBonusCharm()
        {
#if DEBUG
            return (XBGamePad.IsTriggered(XBKeyCode.Button.RightShoulder, m_userCode))
                && (XBGamePad.GetAxisRaw(XBKeyCode.Axis.Dpad, m_userCode).x <= -1.0f);
#else
            return false;
#endif
        }
コード例 #4
0
        public bool Dbg_IsShot3Way()
        {
#if DEBUG
            return (XBGamePad.IsTriggered(XBKeyCode.Button.RightShoulder, m_userCode))
                && (XBGamePad.IsPressed(XBKeyCode.Button.Y, m_userCode));
#else
            return false;
#endif
        }
コード例 #5
0
    // Update is called once per frame
    void Update()
    {
        switch (m_sts)
        {
        case State.StartWait:
            m_time -= Time.deltaTime;
            if (m_time <= 0.0f)
            {
                m_time = 0.0f;
                InitializeAssignController();
                m_sts = State.AssignWait;
            }
            break;

        case State.AssignWait:
            AssignController();
            if (IsAllAssignController())
            {
                m_time = m_submitWaitTime;
                // TODO SubmitWaitEvent
                m_sts = State.SubmitWait;
            }
            break;

        case State.SubmitWait:
            m_time -= Time.deltaTime;
            if (m_time <= 0.0f)
            {
                m_time = 0.0f;
                if (XBGamePad.IsTriggered(XBKeyCode.Button.Start, XBKeyCode.UserCode.Any) ||
                    Input.GetKeyDown(KeyCode.Return))
                {
                    XLogger.Log("GoTo NextScene");
                    UnityEngine.SceneManagement.SceneManager.LoadScene("AlphaGameMain");     // HACK
                }
            }
            break;
        }
    }
コード例 #6
0
    /// <summary>
    /// Inputのラッパー
    /// </summary>
    private bool IsInputEvent(XBKeyCode.UserCode code)
    {
#if ENABLE_DEBUG_INPUT
        switch (code)
        {
        case XBKeyCode.UserCode.User1:
            return(Input.GetKeyDown(KeyCode.Alpha1) || XBGamePad.IsTriggered(m_submitKey, code));

        case XBKeyCode.UserCode.User2:
            return(Input.GetKeyDown(KeyCode.Alpha2) || XBGamePad.IsTriggered(m_submitKey, code));

        case XBKeyCode.UserCode.User3:
            return(Input.GetKeyDown(KeyCode.Alpha3) || XBGamePad.IsTriggered(m_submitKey, code));

        case XBKeyCode.UserCode.User4:
            return(Input.GetKeyDown(KeyCode.Alpha4) || XBGamePad.IsTriggered(m_submitKey, code));
        }
        return(false);
#else
        return(XBGamePad.IsTriggered(m_submitKey, code));
#endif
    }
コード例 #7
0
 public bool IsReload()
 {
     return XBGamePad.IsTriggered(XBKeyCode.Button.B, m_userCode);
 }
コード例 #8
0
 public bool IsLauncherStance()
 {
     return (
         (XBGamePad.GetTriggerRaw(XBKeyCode.Trigger.RightTrigger, m_userCode) > 0.0f)
         || (XBGamePad.GetTriggerRaw(XBKeyCode.Trigger.LeftTrigger, m_userCode) > 0.0f));
 }
コード例 #9
0
 public bool IsShotHolded()
 {
     return XBGamePad.IsPressed(XBKeyCode.Button.X, m_userCode);
 }
コード例 #10
0
 public bool IsShot()
 {
     return XBGamePad.IsTriggered(XBKeyCode.Button.X, m_userCode);
 }
コード例 #11
0
 public bool IsJump()
 {
     return XBGamePad.IsTriggered(XBKeyCode.Button.A, m_userCode);
 }
コード例 #12
0
 public Vector2 RotateLauncher()
 {
     return XBGamePad.GetAxis(XBKeyCode.Axis.LeftStick, m_userCode);
 }
コード例 #13
0
 public Vector2 Move()
 {
     return XBGamePad.GetAxis(XBKeyCode.Axis.LeftStick, m_userCode);
 }