78 lines
2.0 KiB
C#
78 lines
2.0 KiB
C#
![]() |
//using System.Collections.Generic;
|
|||
|
//using UnityEngine;
|
|||
|
//namespace G
|
|||
|
//{
|
|||
|
|
|||
|
// public class Stat_Lvbu3SkillAction : Stat_SkillAction
|
|||
|
// {
|
|||
|
// private enCharacterType m_oldCharType;
|
|||
|
|
|||
|
// private Vector3 m_directionVector;
|
|||
|
|
|||
|
// private float m_speed;
|
|||
|
|
|||
|
// private float m_moveSpeed;
|
|||
|
|
|||
|
// private float m_startDelay;
|
|||
|
|
|||
|
// private float m_endDelay;
|
|||
|
|
|||
|
// private float m_delay;
|
|||
|
|
|||
|
// public Stat_Lvbu3SkillAction(Stat_StateManager statMgr)
|
|||
|
// : base(statMgr)
|
|||
|
// {
|
|||
|
// }
|
|||
|
|
|||
|
// public override bool Enter(Dictionary<string, object> param, bool clearDelegates = false)
|
|||
|
// {
|
|||
|
// bool flag = false;
|
|||
|
// flag = base.Enter(param, clearDelegates);
|
|||
|
// m_oldCharType = m_char.target.m_unitType;
|
|||
|
// m_speed = 0.2f;
|
|||
|
// m_moveSpeed = 0.35f;
|
|||
|
// m_startDelay = 1f;
|
|||
|
// m_endDelay = 3f;
|
|||
|
// m_delay = 0f;
|
|||
|
// m_char.GetComponent<SphereCollider>().enabled = false;
|
|||
|
// return flag;
|
|||
|
// }
|
|||
|
|
|||
|
// public override bool UpdateDelegate()
|
|||
|
// {
|
|||
|
// base.UpdateDelegate();
|
|||
|
// m_delay += Time.deltaTime;
|
|||
|
// if (m_delay >= m_endDelay + 0.3f)
|
|||
|
// {
|
|||
|
// m_char.GetComponent<SphereCollider>().enabled = true;
|
|||
|
// m_char.HideWarning();
|
|||
|
// }
|
|||
|
// else
|
|||
|
// {
|
|||
|
// m_char.m_scriptSkill.UpdateArrowPos(4, m_char.GetCurPos());
|
|||
|
// }
|
|||
|
// if (m_delay < m_startDelay || m_delay >= m_endDelay)
|
|||
|
// {
|
|||
|
// return true;
|
|||
|
// }
|
|||
|
// if (m_char.target == null || m_char.target.IsDead() || !m_char.target.enabled)
|
|||
|
// {
|
|||
|
// if (m_oldCharType == enCharacterType.CHAR_TYPE_MYPLAYER)
|
|||
|
// {
|
|||
|
// return true;
|
|||
|
// }
|
|||
|
// if (m_oldCharType == enCharacterType.CHAR_TYPE_ATTENDANT)
|
|||
|
// {
|
|||
|
// m_char.target = Game.myPlayer;
|
|||
|
// }
|
|||
|
// }
|
|||
|
// m_directionVector = m_char.GetTargetPos() - m_char.GetCurPos();
|
|||
|
// m_directionVector[1] = 0f;
|
|||
|
// m_directionVector.Normalize();
|
|||
|
// Quaternion to = Quaternion.LookRotation(m_directionVector);
|
|||
|
// m_char.SetCurRotation(Quaternion.Lerp(m_char.GetCurRotation(), to, Time.deltaTime * m_speed));
|
|||
|
// m_char.Move(m_directionVector, m_moveSpeed);
|
|||
|
// return true;
|
|||
|
// }
|
|||
|
// }
|
|||
|
//}
|