shaoxiadiablo/Assets/AGame/Scripts/Game/Stat/NormalAtkSingle.cs

146 lines
2.9 KiB
C#
Raw Normal View History

2025-05-18 01:04:31 +08:00
//using UnityEngine;
//namespace G
//{
// public class NormalAtkSingle : NormalAtkBase
// {
// private bool[] EF_SWING1_ENABLE = new bool[5]
// {
// true,
// true,
// true,
// false,
// true
// };
// private Quaternion[] EF_SWING1_ROTATION = new Quaternion[5]
// {
// Quaternion.Euler(0f, 0f, 180f),
// Quaternion.Euler(0f, 0f, 40f),
// Quaternion.Euler(0f, 0f, 330f),
// Quaternion.identity,
// Quaternion.identity
// };
// private Vector3[] EF_SWING1_OFF = new Vector3[5]
// {
// Vector3.up * 0.055f,
// Vector3.up * 0.12f,
// Vector3.up * 0.1f,
// Vector3.zero,
// Vector3.up * 0.055f
// };
// private bool[] EF_SWING1_RISING = new bool[5]
// {
// false,
// true,
// false,
// false,
// true
// };
// private float[] EF_SWING1_DELAY = new float[5]
// {
// 0.15f,
// 0.15f,
// 0.2f,
// 0f,
// 0.21f
// };
// private int[] EF_SWING1_FORCE = new int[5]
// {
// 0,
// 0,
// 0,
// 0,
// 150
// };
// private int[] ADD_RIGIDBODY_FORCE = new int[5]
// {
// 110,
// 110,
// 110,
// 30,
// 0
// };
// private bool[] EF_THRUST_ENABLE = new bool[5]
// {
// false,
// false,
// false,
// true,
// false
// };
// public NormalAtkSingle()
// {
// m_weaponType = 1;
// }
// private void Start()
// {
// }
// protected override float UpdateStep(int nStep)
// {
// float result = 0f;
// if (nStep < 0 || nStep > m_totalStep)
// {
// return result;
// }
// if (nStep == 3)
// {
// Invoke("atk4FogCallback", 0.18f);
// }
// OnFog(0);
// Vector3 vector = m_target.GetCurPos() - m_unit.GetCurPos();
// vector.y = 0f;
// vector.Normalize();
// 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.719999969f;
// // m_tmpAttack.layer = 1;
// //}
// float atkSpeed = m_unit.GetAtkSpeed();
// int num = 0;
// m_unit.LookToTarget(m_target.transform);
// m_unit.MoveWithNormalAtk(vector * ADD_RIGIDBODY_FORCE[nStep]);
// if (EF_SWING1_ENABLE[nStep])
// {
// m_efSwing1.gameObject.SetActive(true);
// m_efSwing1.localRotation = EF_SWING1_ROTATION[nStep];
// m_efSwing1.position = m_transform.position + EF_SWING1_OFF[nStep];
// //m_swingScript.m_attackRising = EF_SWING1_RISING[nStep];
// num = EF_SWING1_FORCE[nStep];
// m_swingScript.SwingOn(EF_SWING1_DELAY[nStep] - atkSpeed, 2, 2, 20, 1, num);
// }
// if (EF_THRUST_ENABLE[nStep])
// {
// //m_thrustScript.m_attackRising = false;
// m_thrustScript.SwingOn(0.28f - atkSpeed, 4, 1, 20, 1, 100);
// }
// m_unit.SetCurDir(vector);
// return result;
// }
// public override void CancelAtk()
// {
// base.CancelAtk();
// m_swingScript.SwingOff();
// m_thrustScript.SwingOff();
// CancelInvoke("atk4FogCallback");
// }
// public void atk4FogCallback()
// {
// OnFog(1);
// }
// }
//}