158 lines
4.4 KiB
C#
Raw Permalink Normal View History

2025-05-18 01:04:31 +08:00
//using UnityEngine;
//namespace G
//{
// public class NormalAtkBow : NormalAtkBase
// {
// private int[] ADD_RIGIDBODY_FORCE = new int[5]
// {
// 0,
// -30,
// -30,
// -30,
// -30
// };
// private int[] ADD_RIGIDBODY_FORCE2 = new int[5]
// {
// -30,
// -30,
// -30,
// -30,
// -30
// };
// private float[] INVOKE_FUN_DELAY = new float[5]
// {
// 0.3f,
// 0.7f,
// 0.8f,
// 0.8f,
// 0.8f
// };
// private float[] INVOKE_FUN_DELAY2 = new float[5]
// {
// 0.3f,
// 0.7f,
// 0.8f,
// 0.8f,
// 0.8f
// };
// private string[] INVOKE_FUN_NAME = new string[5]
// {
// nameof(OnBowAtk1),
// nameof(OnBowAtk1),
// nameof(OnBowAtk1),
// nameof(OnBowAtk2),
// nameof(OnBowAtk3)
// };
// private string[] INVOKE_FUN_NAME2 = new string[5]
// {
// nameof(OnBowAtk3),
// nameof(OnBowAtk3),
// nameof(OnBowAtk3),
// nameof(OnBowAtk3),
// nameof(OnBowAtk3)
// };
// public NormalAtkBow()
// {
// m_weaponType = 5;
// }
// 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.SetCurDir(vector);
// return result;
// }
// public void OnBowAtk1()
// {
// Transform transform = null;// PrefabManager.Instance().Spawn("ef_attack_gj_1", m_unit.GetCurPos() + Vector3.up * 0.05f, m_unit.GetCurRotation());
// transform.gameObject.SetActive(false);
// transform.GetComponent<Ef_Scattering>().m_user = m_unit.transform;
// transform.GetComponent<Ef_Scattering>().m_param[0] = 0f;
// transform.GetComponent<Ef_Scattering>().num = 1;
// transform.gameObject.SetActive(true);
// CancelInvoke("OnBowAtk1");
// }
// public void OnBowAtk2()
// {
// Transform transform = null;// PrefabManager.Instance().Spawn("ef_attack_gj_1", m_unit.GetCurPos() + Vector3.up * 0.05f, m_unit.GetCurRotation());
// transform.gameObject.SetActive(false);
// transform.GetComponent<Ef_Scattering>().m_user = m_unit.transform;
// transform.GetComponent<Ef_Scattering>().m_param[0] = 1f;
// transform.GetComponent<Ef_Scattering>().num = 2;
// transform.gameObject.SetActive(true);
// CancelInvoke("OnBowAtk2");
// }
// public void OnBowAtk3()
// {
// Transform transform = null;// PrefabManager.Instance().Spawn("ef_attack_gj_1", m_unit.GetCurPos() + Vector3.up * 0.05f, m_unit.GetCurRotation());
// transform.gameObject.SetActive(false);
// transform.GetComponent<Ef_Scattering>().m_user = m_unit.transform;
// transform.GetComponent<Ef_Scattering>().m_param[0] = 1f;
// transform.GetComponent<Ef_Scattering>().num = 3;
// transform.gameObject.SetActive(true);
// CancelInvoke("OnBowAtk3");
// }
// public void OnGeneralAtk()
// {
// Transform transform = null;// PrefabManager.Instance().Spawn("ef_atk_general_bow", m_unit.GetCurPos() + Vector3.up * 0.05f, m_unit.GetCurRotation());
// transform.gameObject.SetActive(false);
// transform.GetComponent<Ef_BulletArrowMulti>().m_user = m_unit.transform;
// transform.GetComponent<Ef_BulletArrowMulti>().m_param[0] = 0f;
// transform.GetComponent<Ef_BulletArrowMulti>().m_param[1] = 60f;
// transform.gameObject.SetActive(true);
// }
// public override void CancelAtk()
// {
// base.CancelAtk();
// CancelInvoke("OnBowAtk3");
// }
// }
//}