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


C# MovingJoystick类代码示例

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

示例2: On_JoystickMoveEnd

	void On_JoystickMoveEnd (MovingJoystick move)
	{
		if ("Move_Turn_Joystick" == move.joystickName) {
			throttle = 0.0f;
			steer = 0.0f;
		}
	}
开发者ID:gongchangyou,项目名称:Jackal,代码行数:7,代码来源:PlayerCarController.cs

示例3: On_JoystickMoveEnd

 private void On_JoystickMoveEnd(MovingJoystick move)
 {
     if (move.joystickName == "Move_Turn_Joystick")
     {
         base.animation.CrossFade("idle");
     }
 }
开发者ID:Lessica,项目名称:Something-of-SHIPWAR-GAMES,代码行数:7,代码来源:JoystickEvent.cs

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

示例5: On_JoystickMoveEnd

	void On_JoystickMoveEnd (MovingJoystick move)
	{
		if ("Rotate_straff_Joystick" == move.joystickName) {
						isShooting = false;
						gun.StopShoot ();
				}
	}
开发者ID:gongchangyou,项目名称:Jackal,代码行数:7,代码来源:PlayerWeaponController.cs

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

示例7: OnJoystickMoveEnd

 void OnJoystickMoveEnd(MovingJoystick move)
 {
     if (move.joystickName == "Myjoystick")
     {
         joyPositionX = 0;
         joyPositionY = 0;
     }
 }
开发者ID:1510649869,项目名称:ARPG_project,代码行数:8,代码来源:TouchControl.cs

示例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);
 }
开发者ID:TzuChanChuang,项目名称:Revenge_UnityGame,代码行数:9,代码来源:walk.cs

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

示例10: OnJoystickMove

 void OnJoystickMove(MovingJoystick move)
 {
     if (move.joystickName == "Movejoystick")
     {
         checkedMoving = true;
         _database.SetData<KeyOpt>("KeyCode", KeyOpt.MovingJoyStick);
         _database.SetData<MovingJoystick>("MovingJoystick", move);
     }
 }
开发者ID:zs9024,项目名称:Jungle,代码行数:9,代码来源:BTCheckEasyJoystick.cs

示例11: OnJoystickMoveEnd

 void OnJoystickMoveEnd(MovingJoystick move)
 {
     Debug.Log("OnJoystickMoveEnd : " + move.joystickName);
     if (move.joystickName == "Movejoystick")
     {
         checkedMoving = false;
         _database.RemoveData("KeyCode");
         _database.RemoveData("MovingJoystick");
     }
 }
开发者ID:zs9024,项目名称:Jungle,代码行数:10,代码来源:BTCheckEasyJoystick.cs

示例12: OnJoystickMoveEnd

    //移动摇杆结束
    void OnJoystickMoveEnd(MovingJoystick move)
    {
        //停止时,角色恢复idle

        if (move.joystickName == "MovingJoystick")

        {

        }
    }
开发者ID:ChadCSong,项目名称:Unity3DCarGameSample,代码行数:11,代码来源:CarScript.cs

示例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);
     }
 }
开发者ID:NullPoint-Games,项目名称:Shingeki-no-Kise,代码行数:12,代码来源:PlayerController.cs

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

示例15: OnJoystickMove

    //移动摇杆中 
    void OnJoystickMove(MovingJoystick move)
    {
        //获取摇杆中心偏移的坐标 
        float joyPositionX = move.joystickAxis.x;
        float joyPositionY = move.joystickAxis.y;
        if (joyPositionY != 0 || joyPositionX != 0)
        {
            print(joyPositionX+"  "+joyPositionY);
        }

    }
开发者ID:YaFengYi,项目名称:Unity,代码行数:12,代码来源:MoveController.cs


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