hch
17 小时以前 ee7f8b5362d27b228274c197dba97b17cb6bda57
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
using UnityEngine;
using System.Collections.Generic;
 
public class DodgeFinishAction : RecordAction
{
    private bool isRun = false;
 
    public DodgeFinishAction(BattleField _battleField, BattleObject _dodgeObj)
        : base(RecordActionType.DodgeFinish, _battleField, _dodgeObj)
    {
 
    }
 
    public override bool IsFinished()
    {
        return isFinish;
    }
 
 
    public override void Run()
    {
        base.Run();
 
        if (isRun)
            return;
 
        battleObject.OnDodgeEnd();
        isFinish = true;
        isRun = true;
    }
 
    public override void ForceFinish()
    {
        if (isFinish)
            return;
 
        // 确保闪避状态正确结束
        if (battleObject != null && !isRun)
        {
            battleObject.OnDodgeEnd();
        }
 
        isRun = true;
        base.ForceFinish();
    }
}