public override bool OnMessage(NpcActor owner, IStateEvent t) { switch (t.EventType) { case StateEventType.BossCome: owner.ShowBoom(true); return(true); case StateEventType.BossLeave: owner.ShowBoom(false); return(true); case StateEventType.BossHit: EventDispatcher.TriggerEvent(BattleEvent.BossAngry); owner.StateMachine.ChangeState(new NpcStateScare()); return(true); case StateEventType.BossAbuse: EventDispatcher.TriggerEvent(BattleEvent.BossAngry); owner.ShowWater(); owner.RefreshWorkSate(WorkState.HitToWork); owner.StateMachine.ChangeState(new NpcStateWork()); return(true); } return(false); }
public override bool OnMessage(NpcActor owner, IStateEvent t) { switch (t.EventType) { case StateEventType.BossCome: owner.StateMachine.ChangeState(new NpcStateWork()); owner.RefreshWorkSate(WorkState.HitToWork); return(true); } return(false); }