| | |
| | | |
| | | private bool isWaitingNextAction = false; |
| | | private float waitTimer = 0f; |
| | | private const float waitInterval = 0f; |
| | | private const float waitInterval = 0.2f; |
| | | |
| | | private float speedRatio = 1.5f; |
| | | |
| | | public void Init(BattleField _battleField) |
| | | { |
| | |
| | | // 等待下一个action |
| | | if (isWaitingNextAction) |
| | | { |
| | | waitTimer += Time.deltaTime; |
| | | waitTimer += Time.deltaTime * speedRatio; |
| | | if (waitTimer >= waitInterval) |
| | | { |
| | | isWaitingNextAction = false; |
| | |
| | | recordActionQueue.Clear(); |
| | | immediatelyActionList.Clear(); |
| | | } |
| | | |
| | | public void SetSpeedRatio(float ratio) |
| | | { |
| | | speedRatio = ratio; |
| | | } |
| | | } |