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


C# Spine.ToString方法代码示例

本文整理汇总了C#中Spine.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# Spine.ToString方法的具体用法?C# Spine.ToString怎么用?C# Spine.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Spine的用法示例。


在下文中一共展示了Spine.ToString方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Event

    public void Event(Spine.AnimationState state, int trackIndex, Spine.Event e)
    {
        // DEBUG event display
        debug_Event.text = e.ToString();
        debug_Event.fontSize = debug_Event.fontSize != 20 ? 20 : 15;
        //Debug.Log(trackIndex + " " + state.GetCurrent(trackIndex) + ": event " + e + ", " + e.Int);

        // EVENT LISTENER
        switch (e.ToString()) {
            case "footstep" :
                fxFootstep.Play();
                break;
            case "charge" :
                if (charging) {
                    // charge end
                    fxCharge.Stop();
                    charging = false;
                    cancelable = false;
                } else {
                    // start charging
                    fxCharge.Play();
                    charging = true;
                }
                break;
            case "recovery" :
                cancelable = true;
                break;
        }
    }
开发者ID:VQZX,项目名称:TAG,代码行数:29,代码来源:BattleInputController.cs

示例2: Event

    // DEFINE EVENT FUNCTIONS ---------------------------------------------------------------
    public void Event(Spine.AnimationState state, int trackIndex, Spine.Event e)
    {
        //Debug.Log(trackIndex + " " + state.GetCurrent(trackIndex) + ": event " + e + ", " + e.Int);

        // EVENT LISTENER
        switch (e.ToString()) {
            case "footstep" :
                fxFootstep.Play();
                break;
            case "charge" :
                if (charging) {
                    // CHARGE END
                    fxCharge.Stop();
                    charging = false;
                    cancelable = false;
                } else {
                    // START CHARGING
                    fxCharge.Play();
                    charging = true;
                }
                break;
            case "recovery" :
                cancelable = true;
                break;
        }
    }
开发者ID:VQZX,项目名称:TAG,代码行数:27,代码来源:SpineController1.cs

示例3: AnimationComplete

	void AnimationComplete( Spine.AnimationState animationState, int trackIndex, int loopCount ){
		switch( animationState.ToString( ) ){
		case "Idle" :
			runningAnimation = AnimationList.Idle;
			break;
		case "Walking":
			runningAnimation = AnimationList.Walking;
			break;
		case "Running":
			runningAnimation = AnimationList.Running;
			break;
		case "Activate":
			runningAnimation = AnimationList.Activate;
			break;
		}
	}
开发者ID:herman-rogers,项目名称:Relic,代码行数:16,代码来源:CharacterAnimations.cs

示例4: Event

 public void Event(Spine.AnimationState state, int trackIndex, Spine.Event e)
 {
     // EVENT DISPLAY
     debug_Event.text = e.ToString();
     debug_Event.fontSize = debug_Event.fontSize != 20 ? 20 : 15;
 }
开发者ID:VQZX,项目名称:TAG,代码行数:6,代码来源:TransformDebug.cs

示例5: End

	void End(Spine.AnimationState animState, int trackIndex) {

		if (animState.ToString().Contains("Land") == true)
		{
			if (state == "land")
			{
				state = "idle";
			}
		}

		switch (animState.ToString())
		{
		case "attack1":
		case "attack2": 
		case "attack3":
		case "Charge_horizontal":
		case "Charge_vertical":
		case "attackUp":
			if (state == "attack" || state == "chargeAttack")
				{
					if (device.GetInputMoveVector().x != 0f)
					{
						state = "run"; 
					} else {
						state = "idle";
					}
				}
			break;
		}
	}
开发者ID:JayArmstrongGames,项目名称:Camp-Fire-Journeys,代码行数:30,代码来源:PlayerControl.cs

示例6: Event

	void Event(Spine.AnimationState state, int trackIndex, Spine.Event e)
	{
		Debug.Log("EVENT: " +e.ToString());
		switch (e.ToString())
		{
			case "ATTACK_HIT":
				meleemanager.Attack();
			break;
			case "ATTACKUP_HIT":
				meleemanager.Attack("UP");
			break;
			case "CHARGE_VERTICAL_HIT":
				meleemanager.Attack();
			break;
			case "CHARGE_HORIZONTAL_HIT":
				meleemanager.Attack("CHARGEUP");
			break;
			case "FIRE_GUN":
			Bone gun = gameObject.GetComponentInChildren<SkeletonAnimation>().skeleton.FindBone("GunEnd");
			weaponmanager.transform.position = new Vector3(transform.position.x + (gun.worldX * skeletonAnimation.transform.localScale.x), transform.position.y + gun.WorldY - 0.7f);
			Vector3 gunFacing = weaponmanager.transform.localScale;gunFacing.x = skeletonAnimation.transform.localScale.x;weaponmanager.transform.localScale = gunFacing;
			weaponmanager.Fire(); gunKickBack = 20;
			break;
		}
	}
开发者ID:JayArmstrongGames,项目名称:Camp-Fire-Journeys,代码行数:25,代码来源:PlayerControl.cs


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