NewN_UAVPlane/Assets/Zion/Scripts/Adam/FiniteStateMachines/FiniteState.cs

41 lines
836 B
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
//============================================================
//支持中文文件使用UTF-8编码
//@author JiphuTzu
//@create 20220910
//@company Umawerse
//
//@description:
//============================================================
namespace Umawerse.FiniteStateMachines
{
public abstract class FiniteState
{
public StateName name { get; }
public FiniteState(StateName name)
{
this.name = name;
}
public abstract void Enter();
public virtual StateName Update()
{
return name;
}
public abstract void Exit();
}
public abstract class FiniteState<T>:FiniteState where T:MonoBehaviour
{
protected T root { get; }
public FiniteState(T root,StateName name):base(name)
{
this.root = root;
}
}
}