public void AnimEnter_Damage() { this.myState = TuruState.Damage; Smoke.GetComponent<ParticleSystem>().Play (); Debug.Log ("onDamage"); }
/// <summary> /// 触手の口が閉じる時のイベント /// </summary> public void AnimEnter_Close() { this.myState = TuruState.Close; this.mySSAnimator.Animation = this.SSAnimations [2]; this.mySSAnimator.PlayCount = 1; this.mySSAnimator.Play (); this.mySSAnimator.AnimationFinished = (SsSprite sprite) => { this.myMecanimAnimator.SetTrigger ("EndCloseAnimation"); }; }
/// <summary> /// お食事中のイベント /// </summary> public void AnimEnter_Eating() { this.myState = TuruState.Eating; this.mySSAnimator.Animation = this.SSAnimations [1]; this.mySSAnimator.PlayCount = 1; this.mySSAnimator.Speed = 1.0f; this.mySSAnimator.Play (); this.mySSAnimator.AnimationFinished = (SsSprite sprite) => { this.myMecanimAnimator.SetTrigger ("EndEatingAnimation"); }; }
///SpriteStudioのアニメーターEvent/// /// <summary> /// Idle状態に戻る時のイベント /// </summary> public void AnimEnter_Idle() { this.myState = TuruState.Idle; this.mySSAnimator.Animation = this.SSAnimations [0]; this.mySSAnimator.PlayCount = 0; this.mySSAnimator.Play (); }
public void AnimEnd_Damage() { Debug.Log ("DamageEnd"); Smoke.GetComponent<ParticleSystem>().Stop (); this.myState = TuruState.Idle; }
public void Init() { this.myMecanimAnimator = this.GetComponent<Animator> (); this.mySSAnimator = this.GetComponent<SsSprite> (); this.myState = TuruState.Idle; this.mySSAnimator.Animation = this.SSAnimations [0]; }
/// <summary> /// OpenIdle状態スタート時のイベント /// </summary> public void AnimEnter_OpenIdle() { this.myState = TuruState.OpenIdle; this.mySSAnimator.Animation = this.SSAnimations [3]; this.mySSAnimator.Speed = 1.0f; this.mySSAnimator.PlayCount = 0; this.mySSAnimator.Play (); }
/// <summary> /// 触手の口が開く時のイベント /// </summary> public void AnimEnter_Open() { this.myState = TuruState.Open; this.mySSAnimator.Animation = this.SSAnimations [4]; this.mySSAnimator.Speed = this.OpenSpeed; this.mySSAnimator.PlayCount = 1; this.mySSAnimator.Play (); this.mySSAnimator.AnimationFinished = (SsSprite sprite) => { this.myMecanimAnimator.SetTrigger ("EndOpenAnimation"); }; }