W
class Main
{
private Holder _holder;
private void Start()
{
_holder.DoSmth(new Move());
}
}
class Holder: MonoBehaviour
{
public void DoSmth(IState state)
{
state.Process();
}
}
interface IState
{
void Process();
}
struct Move : IState
{
public void Process()
{
throw new System.NotImplementedException();
}
}
struct FindFood : IState
{
public void Process()
{
throw new System.NotImplementedException();
}
}