summaryrefslogtreecommitdiff
path: root/Assets/Scripts/AbilitySystem/Triggers/AbilityTrigger.cs
blob: ab325866e71d3b34cce3d90b1cb45cdfa3a57b41 (plain)
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
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

/// <summary>
/// 在ability的某一帧切换到某个ability的trigger
/// </summary>
public class AbilityTrigger : Trigger
{
    AbilityBase m_TargetAbility;

    public AbilityTrigger(ConditionBase condition, AbilityBase target) 
        : base(condition)
    {
        m_TargetAbility = target;
    }

    public override bool Update()
    {
        // 如果满足条件,切换到下一个ability
        if (IsFulfilled())
        {
            return true;
        }
        return base.Update();
    }

}