using System.Collections;
using System.Collections.Generic;
using UnityEngine;
/*
状态类
状态本身具有三个方法
进入
退出
以及更新
*/
public class PlayerState
{
protected PlayerStateMachine stateMachine;
protected Player player;
private string animBoolName;
public PlayerState(Player _player,PlayerStateMachine _stateMachine,string _animBoolName)
{
this.player = _player;
this.stateMachine = _stateMachine;
this.animBoolName = _animBoolName;
}
public virtual void Enter()
{
Debug.Log("I enter" + animBoolName);
}
public virtual void Update()
{
Debug.Log("I'm in" + animBoolName);
}
public virtual void Exit()
{
Debug.Log("I exit" + animBoolName);
}
}
PlayerState
最新推荐文章于 2024-07-30 20:50:32 发布