summaryrefslogtreecommitdiff
path: root/Assets/Scripts/AbilitySystem/Triggers/Trigger.cs
blob: 178932fd1aa03b4234c2ad1a621067b5da3803ed (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
30
31
32
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

/// <summary>
/// 不同效果的trigger基础这个基类
/// </summary>

public abstract class Trigger
{
    protected ConditionBase m_Condition;

    public Trigger(ConditionBase condition)
    {
        m_Condition = condition;
    }

    protected bool IsFulfilled()
    {
        return m_Condition.Evaluate();
    }

    /// <summary>
    /// 如果触发执行了,返回true,否则返回false
    /// </summary>
    /// <returns></returns>
    public virtual bool Update()
    {
        return false; 
    }

}