SHADE_Y3/Assets/Scripts/Utility/UT_BaseSate.cs

61 lines
994 B
C#
Raw Permalink Normal View History

using SHADE;
using System;
public abstract class BaseState
{
protected string stateName = "Base State";
protected StateMachine machine;
protected string animationName = "";
public BaseState(StateMachine stateMachine, string animName = "")
{
machine = stateMachine;
animationName = animName;
}
public virtual void OnEnter()
2023-03-10 16:26:52 +08:00
{}
2022-11-13 21:56:28 +08:00
public abstract void update();
public abstract void fixedUpdate();
public virtual void OnExit()
2023-03-10 16:26:52 +08:00
{}
public string GetStateName()
{
return stateName;
}
public string GetAnimName()
{
return animationName;
}
public virtual void onCollisionEnter(CollisionInfo info)
{
}
public virtual void onCollisionStay(CollisionInfo info)
{
}
public virtual void onCollisionExit(CollisionInfo info)
{
}
public virtual void onTriggerEnter(CollisionInfo info)
{
}
public virtual void onTriggerStay(CollisionInfo info)
{
}
public virtual void onTriggerExit(CollisionInfo info)
{
}
}