public override void ComboEnd() { if (bReservedCombo) { if (curState == EState.Combo1) { AllStopAni(); CCombo2Ani ani = gameObject.GetComponentInChildren <CCombo2Ani>(); ani.InitAngle(RotateAngle); ani.PlayAni(); Vector3 EndPos = gameObject.transform.position; EndPos.x = RotateAngle == 0.0f ? EndPos.x + ani.AttackMove : EndPos.x - ani.AttackMove; Move(gameObject.transform.position, EndPos); curState = EState.Combo2; } else if (curState == EState.Combo2) { AllStopAni(); CCombo3Ani ani = gameObject.GetComponentInChildren <CCombo3Ani>(); ani.InitAngle(RotateAngle); ani.PlayAni(); Vector3 EndPos = gameObject.transform.position; EndPos.x = RotateAngle == 0.0f ? EndPos.x + ani.AttackMove : EndPos.x - ani.AttackMove; Move(gameObject.transform.position, EndPos); curState = EState.Combo3; } } bReservedCombo = false; }
public override void Attack2() { if (curState == EState.Idle || curState == EState.Move) { AllStopAni(); CCombo3Ani ani = gameObject.GetComponentInChildren <CCombo3Ani>(); ani.InitAngle(RotateAngle); ani.PlayAni(); Vector3 EndPos = gameObject.transform.position; EndPos.x = RotateAngle == 0.0f ? EndPos.x + ani.AttackMove : EndPos.x - ani.AttackMove; Move(gameObject.transform.position, EndPos); } }
public override void Attack2() { if (curHealthPoint < 11) { return; } if (curState == EState.Idle || curState == EState.Move) { AllStopAni(); CCombo3Ani ani = gameObject.GetComponentInChildren <CCombo3Ani>(); ani.PlayAni(); curState = EState.Combo3; if (ani.AttackMove != 0.0f) { Vector3 EndPos = gameObject.transform.position; EndPos.x = RotateAngle == 0.0f ? EndPos.x + ani.AttackMove : EndPos.x - ani.AttackMove; Move(gameObject.transform.position, EndPos, true); } curHealthPoint -= 10; } }