当前位置: 首页>>代码示例>>C#>>正文


C# MovingJoystick.Axis2Angle方法代码示例

本文整理汇总了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");
 }
开发者ID:Lessica,项目名称:Something-of-SHIPWAR-GAMES,代码行数:7,代码来源:ETPlayer.cs

示例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");
    }
开发者ID:GGJ-CBA-RD,项目名称:RaisingDark,代码行数:8,代码来源:Player.cs

示例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 ();
						}
				}
	}
开发者ID:gongchangyou,项目名称:Jackal,代码行数:13,代码来源:PlayerWeaponController.cs

示例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);
    }
开发者ID:kinkeika,项目名称:Sample001,代码行数:11,代码来源:PlayerController.cs

示例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);
        }
    }
开发者ID:HEIENTAI,项目名称:SoulOfSword,代码行数:29,代码来源:PlayerInput.cs


注:本文中的MovingJoystick.Axis2Angle方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。