public override void ActiveUpdate() { if (state == AirSpecialState.AirSpecialAttack) { if (Time.time > nextStateTime) { if (curHoldTime > reqHoldTime && PlayerInput.IsAttackPressed()) { state = AirSpecialState.AirSpecialHold; loopTime = Time.time + (0.55f / playSpeed); animator.speed = playSpeed; animator.CrossFade(HashLookup.airSpecialHash, 0.15f, 0, 0.04f); StartCoroutine(DelaySpawn(0.2f)); gc.controller.maxGravSpeed = 2f; } else { nextStateTime = Time.time + cooldownDuration; state = AirSpecialState.AirSpecialAttackEnd; animator.speed = 1f; gc.controller.maxGravSpeed = 12f; animator.CrossFade(HashLookup.loopJumpHash, 0.1f); } } } else if (state == AirSpecialState.AirSpecialAttackEnd) { if (curHoldTime > reqHoldTime && PlayerInput.IsAttackPressed()) { state = AirSpecialState.AirSpecialHold; loopTime = Time.time + (0.55f / playSpeed); animator.speed = playSpeed; animator.CrossFade(HashLookup.airSpecialHash, 0.15f, 0, 0.04f); StartCoroutine(DelaySpawn(0.2f)); gc.controller.maxGravSpeed = 2f; } else if(Time.time > nextStateTime) { ExitAction(); } } else if (state == AirSpecialState.AirSpecialHold) { if (!PlayerInput.IsAttackPressed()) { isHolding = false; } if (Time.time > loopTime) { loopTime = Time.time + (0.55f / playSpeed); animator.CrossFade(HashLookup.airSpecialHash, 0.1f, 0, 0.04f); } if (!isHolding || !gc.IsAirborne) { ExitAction(); } if (tempEffect != null) { Vector3 curAngles = tempEffect.localEulerAngles; tempEffect.localEulerAngles = new Vector3(curAngles.x, curAngles.y + 500f * Time.deltaTime, curAngles.z); } } }
public override void Execute() { base.Execute(); isActive = true; state = AirSpecialState.AirSpecialAttack; nextStateTime = Time.time + attackDuration; if (gc.controller.CurExternalVeloY < 3f) { gc.controller.CurExternalVeloY = 3f; } isHolding = true; animator.speed = 2.5f; animator.CrossFade(HashLookup.airSpecialHash, 0.1f, 0, 0); }