summaryrefslogtreecommitdiff
path: root/Assets/Scripts/AbilitySystem/Triggers/AbilityTrigger.cs
blob: 34dda3b2aa0abc42d9457d86f4d8519084b8dfe0 (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
29
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();
    }

}