public DieState m_cDieState; //死亡状态 public StateWrap(GfxObject obj) { this.m_cIdleState = new IdleState(obj); this.m_cAttackState = new AttackState(obj); this.m_cMoveState = new MoveState(obj); this.m_cMoveBackState = new MoveBackState(obj); this.m_cHurtState = new HurtState(obj); this.m_cSkillState = new SkillState(obj); this.m_cDieState = new DieState(obj); }
private Vector3 SHAKE_DIS = new Vector3(0, 0.2f, 0); //抖动距离 public HurtState(GfxObject obj) : base(obj) { }
private Vector3 m_vecLastPos; //最近坐标 public MoveBackState(GfxObject obj) : base(obj) { }
public SkillState(GfxObject obj) : base(obj) { // }
public IdleState(GfxObject obj) : base(obj) { }
private Vector3 END_SCALE = new Vector3(0, 1.5f, 1); //最终大小 public DieState(GfxObject obj) : base(obj) { // }
/// <summary> /// 设置 /// </summary> /// <param name="target"></param> public void Set(GfxObject target) { this.m_cTargetObj = target; }
public AttackState(GfxObject obj) : base(obj) { }
protected GfxObject m_cObj; //物体 public StateBase(GfxObject obj) { this.m_cObj = obj; }
public StateControl(GfxObject obj) { this.m_cStateWrap = new StateWrap(obj); this.m_cCurrentState = null; }