コード例 #1
0
 protected override void PlayerSystemPlayerMoveEventHandler(PlayerMoveEvent data, Player group)
 {
     base.PlayerSystemPlayerMoveEventHandler(data, group);
     group.transform.Translate(new Vector3(data.movement.x, 0, data.movement.y) * (float)group.moveSpeed, Space.Self);
     group.transform.rotation = Quaternion.Euler(0, Camera.main.transform.rotation.eulerAngles.y, 0);
     //Vector3 temp = new Vector3(data.movement.x, 0, data.movement.y);
     //temp = Quaternion.AngleAxis(Camera.main.transform.rotation.eulerAngles.y, Vector3.up) * temp;
     //group.transform.Translate(temp * 1.5f, Space.Self);
 }
コード例 #2
0
 protected override void InputSystemUpdateRightHandler(WandRight group)
 {
     base.InputSystemUpdateRightHandler(group);
     if (rightController.GetTouch(touchPad))
     {
         var moveEvent = new PlayerMoveEvent();
         moveEvent.movement = rightController.GetAxis(touchPad) * Time.deltaTime;
         Publish(moveEvent);
     }
     if (rightController.GetPressDown(touchPad))
     {
         Publish(new JumpEvent());
     }
 }
コード例 #3
0
        protected void PlayerSystemPlayerMoveEventFilter(ViveDB.PlayerMoveEvent data)
        {
            var PlayerItems = PlayerManager.Components;

            for (var PlayerIndex = 0
                 ; PlayerIndex < PlayerItems.Count; PlayerIndex++
                 )
            {
                if (!PlayerItems[PlayerIndex].Enabled)
                {
                    continue;
                }
                this.PlayerSystemPlayerMoveEventHandler(data, PlayerItems[PlayerIndex]);
            }
        }
コード例 #4
0
 protected virtual void PlayerSystemPlayerMoveEventHandler(ViveDB.PlayerMoveEvent data, Player group)
 {
 }