本文整理汇总了C#中MovingJoystick类的典型用法代码示例。如果您正苦于以下问题:C# MovingJoystick类的具体用法?C# MovingJoystick怎么用?C# MovingJoystick使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
MovingJoystick类属于命名空间,在下文中一共展示了MovingJoystick类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: On_JoystickMove
private void On_JoystickMove(MovingJoystick move)
{
float y = move.Axis2Angle(true);
base.transform.rotation = Quaternion.Euler(new Vector3(0f, y, 0f));
base.transform.Translate((Vector3) ((Vector3.forward * move.joystickValue.magnitude) * Time.deltaTime));
this.model.animation.CrossFade("Run");
}
示例2: On_JoystickMoveEnd
void On_JoystickMoveEnd (MovingJoystick move)
{
if ("Move_Turn_Joystick" == move.joystickName) {
throttle = 0.0f;
steer = 0.0f;
}
}
示例3: On_JoystickMoveEnd
private void On_JoystickMoveEnd(MovingJoystick move)
{
if (move.joystickName == "Move_Turn_Joystick")
{
base.animation.CrossFade("idle");
}
}
示例4: On_JoystickMove
void On_JoystickMove(MovingJoystick move)
{
if (move.joystickName == "PlayerInputJoystick")
{
if (!GameMain.Instance.SceneManager.ChangeSceneComplete)
{
CommonFunction.DebugMsgFormat("換場中,不能移動!!");
return;
}
if (GameMain.Instance.GameEventManager.DoingEvent)
{
CommonFunction.DebugMsgFormat("事件中,不能移動");
return;
}
CommonFunction.DebugMsg(string.Format("JoyStick移動中 ({0})", move.joystickAxis));
//
if (move.joystickAxis.sqrMagnitude >= 0.25)
{
GameMain.Instance.MyRole.CrossAnimation("run");
}
else if (move.joystickAxis.sqrMagnitude > 0)
{
GameMain.Instance.MyRole.CrossAnimation("walk");
}
GameMain.Instance.MyRole.Move(move.Axis2Angle(true), move.joystickAxis.magnitude);
}
}
示例5: On_JoystickMoveEnd
void On_JoystickMoveEnd (MovingJoystick move)
{
if ("Rotate_straff_Joystick" == move.joystickName) {
isShooting = false;
gun.StopShoot ();
}
}
示例6: On_JoystickMove
void On_JoystickMove( MovingJoystick move)
{
float angle = move.Axis2Angle(true);
transform.rotation = Quaternion.Euler( new Vector3(0,angle,0));
transform.Translate( Vector3.forward * move.joystickValue.magnitude * Time.deltaTime);
model.animation.CrossFade("Run");
}
示例7: OnJoystickMoveEnd
void OnJoystickMoveEnd(MovingJoystick move)
{
if (move.joystickName == "Myjoystick")
{
joyPositionX = 0;
joyPositionY = 0;
}
}
示例8: OnJoystickMoveEnd
//移动摇杆结束
void OnJoystickMoveEnd(MovingJoystick move)
{
if (move.joystickName != "WalkJoystick"){
return;
}
transform.Find("p1_walk").gameObject.GetComponent<Animator> ().SetBool ("Walk", false);
transform.Find("p2_walk").gameObject.GetComponent<Animator> ().SetBool ("Walk", false);
}
示例9: On_JoystickMove
void On_JoystickMove( MovingJoystick move)
{
if(!_playerAnim.getAnimBoolVar("isAttack") && !_playerAnim.getAnimBoolVar("isHit"))
{
_playerMovement.Move(move.joystickAxis.x, move.joystickAxis.y, speed);
_playerAnim.SetAnimVar("isRun", true);
}
}
示例10: OnJoystickMove
void OnJoystickMove(MovingJoystick move)
{
if (move.joystickName == "Movejoystick")
{
checkedMoving = true;
_database.SetData<KeyOpt>("KeyCode", KeyOpt.MovingJoyStick);
_database.SetData<MovingJoystick>("MovingJoystick", move);
}
}
示例11: OnJoystickMoveEnd
void OnJoystickMoveEnd(MovingJoystick move)
{
Debug.Log("OnJoystickMoveEnd : " + move.joystickName);
if (move.joystickName == "Movejoystick")
{
checkedMoving = false;
_database.RemoveData("KeyCode");
_database.RemoveData("MovingJoystick");
}
}
示例12: OnJoystickMoveEnd
//移动摇杆结束
void OnJoystickMoveEnd(MovingJoystick move)
{
//停止时,角色恢复idle
if (move.joystickName == "MovingJoystick")
{
}
}
示例13: On_JoystickMove
//处理摇杆事件
private void On_JoystickMove(MovingJoystick joystick)
{
if(joystick.joystickAxis.x < 0)
{
character.Run(-Vector2.right);
}
else if(joystick.joystickAxis.x > 0)
{
character.Run(Vector2.right);
}
}
示例14: OnJoystickMoveEnd
void OnJoystickMoveEnd(MovingJoystick move)
{
if (move.joystickName == "MoveJoystick")
{
gameObject.GetComponent<PlayerMove>().btnLeftPressed = false;
gameObject.GetComponent<PlayerMove>().btnRightPressed = false;
gameObject.GetComponent<PlayerMove>().btnDownPressed = false;
gameObject.GetComponent<PlayerMove>().btnUpPressed = false;
//animation.CrossFade("idle");
}
}
示例15: OnJoystickMove
//移动摇杆中
void OnJoystickMove(MovingJoystick move)
{
//获取摇杆中心偏移的坐标
float joyPositionX = move.joystickAxis.x;
float joyPositionY = move.joystickAxis.y;
if (joyPositionY != 0 || joyPositionX != 0)
{
print(joyPositionX+" "+joyPositionY);
}
}