public void OnMessage(EventMessageBase message) { if (m_CurrentState != null) { m_CurrentState.OnMessage(m_Object, message); } }
public void OnMessage(CPlayer type, EventMessageBase data) { if (data.eventMessageAction == (int)EnitityCommon.EnitityAction.ENITITY_ACTION_MOVETOP) { type.GetRenderObject().transform.Translate(Vector3.forward * CPlayerCommon.Player_Speed * 0.015f); } else if (data.eventMessageAction == (int)EnitityCommon.EnitityAction.ENITITY_ACTION_MOVEBOTTOM) { type.GetRenderObject().transform.Translate(Vector3.back * CPlayerCommon.Player_Speed * 0.015f); } else if (data.eventMessageAction == (int)EnitityCommon.EnitityAction.ENITITY_ACTION_MOVELEFT) { Vector3 angle = new Vector3(0, -1, 0); type.GetRenderObject().transform.eulerAngles += angle; } else if (data.eventMessageAction == (int)EnitityCommon.EnitityAction.ENITITY_ACTION_MOVERIGHT) { Vector3 angle = new Vector3(0, 1, 0); type.GetRenderObject().transform.eulerAngles += angle; } else if (data.eventMessageAction == (int)EnitityCommon.EnitityAction.ENITITY_ACTION_MOVEOVER) { type.m_stateMachine.ChangeState(PlayerIdelState.GetInstance()); } //type.m_stateMachine.ChangeState (PlayerIdelState.GetInstance ()); }
public void OnMessage(CMonster type, EventMessageBase data) { ; }
public void OnMessage(CPlayer type, EventMessageBase data) { ; }