61 lines
994 B
C#
61 lines
994 B
C#
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()
|
|
{}
|
|
|
|
public abstract void update();
|
|
|
|
public abstract void fixedUpdate();
|
|
|
|
public virtual void OnExit()
|
|
{}
|
|
|
|
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)
|
|
{
|
|
}
|
|
}
|