177 lines
4.9 KiB
C#
177 lines
4.9 KiB
C#
//using UnityEngine;
|
|
//namespace G
|
|
//{
|
|
// public class NormalAtkMagic : NormalAtkBase
|
|
// {
|
|
// private int[] ADD_RIGIDBODY_FORCE = new int[5]
|
|
// {
|
|
// 10,
|
|
// 10,
|
|
// 10,
|
|
// -60,
|
|
// 80
|
|
// };
|
|
|
|
// private int[] ADD_RIGIDBODY_FORCE2 = new int[5]
|
|
// {
|
|
// 10,
|
|
// 10,
|
|
// 10,
|
|
// -60,
|
|
// 80
|
|
// };
|
|
|
|
// private string[] INVOKE_FUN_NAME = new string[5]
|
|
// {
|
|
// "OnMagicShoot2",
|
|
// "OnMagicShoot1",
|
|
// "OnMagicShoot1",
|
|
// "OnMagicShoot3",
|
|
// "OnMagicShoot1"
|
|
// };
|
|
|
|
// private string[] INVOKE_FUN_NAME2 = new string[5]
|
|
// {
|
|
// "OnGeneralMagic1",
|
|
// "OnGeneralMagic1",
|
|
// "OnGeneralMagic1",
|
|
// "OnGeneralMagic2",
|
|
// "OnGeneralMagic1"
|
|
// };
|
|
|
|
// private float[] INVOKE_FUN_DELAY = new float[5]
|
|
// {
|
|
// 0.2f,
|
|
// 0.4f,
|
|
// 0.3f,
|
|
// 0.5f,
|
|
// 0.3f
|
|
// };
|
|
|
|
// private float[] INVOKE_FUN_DELAY2 = new float[5]
|
|
// {
|
|
// 0.2f,
|
|
// 0.4f,
|
|
// 0.3f,
|
|
// 0.5f,
|
|
// 0.3f
|
|
// };
|
|
|
|
// public NormalAtkMagic()
|
|
// {
|
|
// m_weaponType = 6;
|
|
// }
|
|
|
|
// protected override float UpdateStep(int nStep)
|
|
// {
|
|
// float result = 0f;
|
|
// if (nStep < 0 || nStep > m_totalStep)
|
|
// {
|
|
// return result;
|
|
// }
|
|
// OnFog(0);
|
|
// int[] array = ADD_RIGIDBODY_FORCE;
|
|
// float[] array2 = INVOKE_FUN_DELAY;
|
|
// string[] array3 = INVOKE_FUN_NAME;
|
|
// if (m_chaType == enCharacterType.CHAR_TYPE_ATTENDANT || m_chaType == enCharacterType.CHAR_TYPE_ENEMY_ATTENDANT)
|
|
// {
|
|
// array = ADD_RIGIDBODY_FORCE2;
|
|
// array2 = INVOKE_FUN_DELAY2;
|
|
// array3 = INVOKE_FUN_NAME2;
|
|
// }
|
|
// m_unit.PlayAnimation(ANIM_NAME[nStep]);
|
|
// //result = m_unit.GetAnimationTime(ANIM_NAME[nStep]);
|
|
// //if (EX_ANIM_NAME[nStep].Length > 0)
|
|
// //{
|
|
// // m_tmpAttack = m_unit.PlayAnimationQueued(EX_ANIM_NAME[nStep]);
|
|
// // m_tmpAttack.speed = 0.24f;
|
|
// // if (m_chaType == enCharacterType.CHAR_TYPE_MYPLAYER || m_chaType == enCharacterType.CHAR_TYPE_ENEMY_PLAYER)
|
|
// // {
|
|
// // m_tmpAttack.speed *= 3f;
|
|
// // }
|
|
// // m_tmpAttack.layer = 1;
|
|
// //}
|
|
// float atkSpeed = m_unit.GetAtkSpeed();
|
|
// Vector3 value = m_target.GetCurPos() - m_unit.GetCurPos();
|
|
// value.y = 0f;
|
|
// Vector3 vector = Vector3.Normalize(value);
|
|
// if (array[nStep] != 0)
|
|
// {
|
|
// m_unit.MoveWithNormalAtk(vector * array[nStep]);
|
|
// }
|
|
// m_unit.LookToTarget(m_target.transform);
|
|
// Invoke(array3[nStep], array2[nStep] - atkSpeed);
|
|
// m_unit.LookToTarget(m_target.transform);
|
|
// m_unit.SetCurDir(vector);
|
|
// return result;
|
|
// }
|
|
|
|
// public void OnMagicShoot1()
|
|
// {
|
|
// string magicAtkEf = "";// m_unit.GetMagicAtkEf();
|
|
// if (!string.IsNullOrEmpty(magicAtkEf))
|
|
// {
|
|
// Transform transform = PrefabManager.Instance().Spawn(magicAtkEf, m_unit.GetCurPos(), m_unit.GetCurRotation());
|
|
// transform.gameObject.SetActive(false);
|
|
// transform.GetComponent<Ef_base>().m_user = m_unit.transform;
|
|
// transform.GetComponent<Ef_base>().m_param[0] = 0f;
|
|
// transform.gameObject.SetActive(true);
|
|
// }
|
|
// }
|
|
|
|
// public void OnMagicShoot2()
|
|
// {
|
|
// string magicAtkEf = ""; //m_unit.GetMagicAtkEf();
|
|
// if (!string.IsNullOrEmpty(magicAtkEf))
|
|
// {
|
|
// Transform transform = PrefabManager.Instance().Spawn(magicAtkEf, m_unit.GetCurPos(), m_unit.GetCurRotation());
|
|
// transform.gameObject.SetActive(false);
|
|
// transform.GetComponent<Ef_base>().m_user = m_unit.transform;
|
|
// transform.GetComponent<Ef_base>().m_param[0] = 1f;
|
|
// transform.gameObject.SetActive(true);
|
|
// }
|
|
// }
|
|
|
|
// public void OnMagicShoot3()
|
|
// {
|
|
// string magicAtkEf = "";// m_unit.GetMagicAtkEf();
|
|
// if (!string.IsNullOrEmpty(magicAtkEf))
|
|
// {
|
|
// Transform transform = PrefabManager.Instance().Spawn(magicAtkEf, m_unit.GetCurPos(), m_unit.GetCurRotation());
|
|
// transform.gameObject.SetActive(false);
|
|
// transform.GetComponent<Ef_base>().m_user = m_unit.transform;
|
|
// transform.GetComponent<Ef_base>().m_param[0] = 1f;
|
|
// transform.gameObject.SetActive(true);
|
|
// }
|
|
// }
|
|
|
|
// public void OnGeneralMagic1()
|
|
// {
|
|
// Transform transform = PrefabManager.Instance().Spawn("ef_atk_general_magic1", m_unit.GetCurPos(), m_unit.GetCurRotation());
|
|
// transform.gameObject.SetActive(false);
|
|
// transform.GetComponent<Ef_base>().m_user = m_unit.transform;
|
|
// transform.GetComponent<Ef_base>().m_param[0] = 0f;
|
|
// transform.GetComponent<Ef_base>().m_param[1] = 60f;
|
|
// transform.gameObject.SetActive(true);
|
|
// }
|
|
|
|
// public void OnGeneralMagic2()
|
|
// {
|
|
// Transform transform = PrefabManager.Instance().Spawn("ef_atk_general_magic2", m_unit.GetTargetPos(), m_unit.GetCurRotation());
|
|
// transform.gameObject.SetActive(false);
|
|
// transform.GetComponent<Ef_base>().m_user = m_unit.transform;
|
|
// transform.GetComponent<Ef_base>().m_param[0] = 1f;
|
|
// transform.gameObject.SetActive(true);
|
|
// }
|
|
|
|
// public override void CancelAtk()
|
|
// {
|
|
// base.CancelAtk();
|
|
// CancelInvoke("OnMagicShoot1");
|
|
// CancelInvoke("OnMagicShoot2");
|
|
// CancelInvoke("OnMagicShoot3");
|
|
// CancelInvoke("OnGeneralMagic1");
|
|
// CancelInvoke("OnGeneralMagic2");
|
|
// }
|
|
// }
|
|
//} |