本文整理汇总了C#中MovingJoystick.Axis2Angle方法的典型用法代码示例。如果您正苦于以下问题:C# MovingJoystick.Axis2Angle方法的具体用法?C# MovingJoystick.Axis2Angle怎么用?C# MovingJoystick.Axis2Angle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MovingJoystick
的用法示例。
在下文中一共展示了MovingJoystick.Axis2Angle方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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_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");
}
示例3: On_JoystickMove
void On_JoystickMove( MovingJoystick move){
if ("Rotate_straff_Joystick" == move.joystickName) {
float angle = move.Axis2Angle (true);
// Debug.Log ("move.joystickAxis.sqrMagnitude=" + move.joystickAxis.sqrMagnitude);
Turret.transform.localRotation = Quaternion.Euler (new Vector3 (0, angle, 0));
if (!isShooting) {
isShooting = true;
gun.Shoot ();
}
}
}
示例4: On_JoystickMove
/**
* Occurs when joystick is moving.
*/
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);
SetGameState(PlayerState.Run);
}
示例5: 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);
}
}