本文整理汇总了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;
}
}
示例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;
}
}
示例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;
}
}
示例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;
}
示例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;
}
}
示例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;
}
}