示例#1
0
    void Update()
    {
        //GUIの操作をここで受け取る
        if (CrossPlatformInputManager.GetButtonDown("AttackButton"))
        {
            pClrt.AttackButton();
        }

        if (CrossPlatformInputManager.GetButtonDown("CommandButton"))
        {
            Debug.Log("PushButton");
            cPanel.SetCurrentSelectToNext();
        }
        if (CrossPlatformInputManager.GetButtonDown("KaihiButton"))
        {
            pClrt.dodgeButton();
        }
        if (CrossPlatformInputManager.GetButtonDown("LookButton"))
        {
            fCamera.LookForward();
        }
        if (CrossPlatformInputManager.GetButtonDown("StopButton"))
        {
            gameMaster.GamePause();
        }

        //ジョイスティック操作
        PlayerDelta.Set(CrossPlatformInputManager.GetAxisRaw("Horizontal"), CrossPlatformInputManager.GetAxisRaw("Vertical"));

        /*
         *  // スライド開始地点.
         *  if (Input.GetButtonDown("Fire1"))
         *              slideStartPosition = GetCursorPosition();
         *
         *      // 画面の1割以上移動させたらスライド開始と判断する.
         *      if (Input.GetButton("Fire1")) {
         *              if (Vector2.Distance(slideStartPosition,GetCursorPosition()) >= (Screen.width * 0.1f))
         *                      moved = true;
         *      }
         *
         *      // スライド操作が終了したか.
         *      if (!Input.GetButtonUp("Fire1") && !Input.GetButton("Fire1"))
         *              moved = false; // スライドは終わった.
         *
         * // 移動量を求める.
         * if (moved )
         * {
         *  //Vector3 delta3 = GetCursorPosition() - slideStartPosition;
         *  delta = GetCursorPosition() - slideStartPosition;
         * }
         * else if (moved)
         *  delta = GetCursorPosition() - prevPosition;
         * else
         *  delta = Vector2.zero;
         *
         * // カーソル位置を更新.
         *  prevPosition = GetCursorPosition();
         */}