94 lines
1.9 KiB
C#
94 lines
1.9 KiB
C#
![]() |
//using System.Collections.Generic;
|
|||
|
//using UnityEngine;
|
|||
|
//namespace G
|
|||
|
//{
|
|||
|
|
|||
|
// public class Stat_AvatarAction : Stat_BaseAction
|
|||
|
// {
|
|||
|
// private bool right = true;
|
|||
|
|
|||
|
// private int count;
|
|||
|
|
|||
|
// private Vector3[] pos = new Vector3[3];
|
|||
|
|
|||
|
// private float delay;
|
|||
|
|
|||
|
// private int stat;
|
|||
|
|
|||
|
// private int avatarID;
|
|||
|
|
|||
|
// public Stat_AvatarAction(Stat_StateManager statMgr)
|
|||
|
// : base(statMgr)
|
|||
|
// {
|
|||
|
// }
|
|||
|
|
|||
|
// public override bool Enter(Dictionary<string, object> param, bool clearDelegates = false)
|
|||
|
// {
|
|||
|
// base.Enter(param, clearDelegates);
|
|||
|
// string animName = m_char.GetAnimName("idle");
|
|||
|
// if (m_char.PlayAnimationByName(animName, true) == -1f)
|
|||
|
// {
|
|||
|
// return false;
|
|||
|
// }
|
|||
|
// avatarID = (int)param["avatar_id"];
|
|||
|
// m_char.EndAI(true);
|
|||
|
// m_char.invincible = true;
|
|||
|
// m_char.HideHpBar();
|
|||
|
// count = 0;
|
|||
|
// right = true;
|
|||
|
// stat = 0;
|
|||
|
// delay = 0f;
|
|||
|
// ref Vector3 reference = ref pos[0];
|
|||
|
// reference = m_char.GetCurPos() - m_char.transform.right * 0.01f;
|
|||
|
// ref Vector3 reference2 = ref pos[1];
|
|||
|
// reference2 = m_char.GetCurPos();
|
|||
|
// ref Vector3 reference3 = ref pos[2];
|
|||
|
// reference3 = m_char.GetCurPos() + m_char.transform.right * 0.01f;
|
|||
|
// BossSounds.Instance.PlayMenghuo3(m_char);
|
|||
|
// return true;
|
|||
|
// }
|
|||
|
|
|||
|
// public override bool UpdateDelegate()
|
|||
|
// {
|
|||
|
// delay += Time.deltaTime;
|
|||
|
// if (stat == 0)
|
|||
|
// {
|
|||
|
// if (count == 0)
|
|||
|
// {
|
|||
|
// right = true;
|
|||
|
// }
|
|||
|
// else if (count == 2)
|
|||
|
// {
|
|||
|
// right = false;
|
|||
|
// }
|
|||
|
// if (right)
|
|||
|
// {
|
|||
|
// count++;
|
|||
|
// }
|
|||
|
// else
|
|||
|
// {
|
|||
|
// count--;
|
|||
|
// }
|
|||
|
// m_char.SetCurPos(pos[count]);
|
|||
|
// if (delay > 0.7f)
|
|||
|
// {
|
|||
|
// stat = 1;
|
|||
|
// }
|
|||
|
// }
|
|||
|
// else
|
|||
|
// {
|
|||
|
// EnemyCtrl.instance.CreateBossAvatar(m_char as Boss, avatarID);
|
|||
|
// }
|
|||
|
// return true;
|
|||
|
// }
|
|||
|
|
|||
|
// public override bool CanTransition(enStat stat)
|
|||
|
// {
|
|||
|
// if (stat == enStat.STAT_ACTION_DEAD)
|
|||
|
// {
|
|||
|
// return true;
|
|||
|
// }
|
|||
|
// return false;
|
|||
|
// }
|
|||
|
// }
|
|||
|
//}
|