private void CollectInput(float dt) { m_horizontalAxe.Update(dt); m_verticalAxe.Update(dt); m_jumpButton.Update(dt); m_dashButton.Update(dt); m_interactButton.Update(dt); ApplyVerticalInput(); // attack m_attackButton.Update(dt); if (m_attackButton.IsPress()) { // m_animator.SetTrigger(m_animBridge.atkTrigger); MessageDispatcher.Instance().Dispatch( m_stateAgent.GetEntityID(), m_stateAgent.GetEntityID(), MessageType.MT_TryAttack, null); } // dash if (m_dashButton.IsPress()) { MessageDispatcher.Instance().Dispatch( m_stateAgent.GetEntityID(), m_stateAgent.GetEntityID(), MessageType.MT_TryDash, null); } }
public override void OnBeHit(GameObject caster) { TakeDamageExtraInfo info = new TakeDamageExtraInfo(); info.caster = caster; MessageDispatcher.Instance().Dispatch( m_stateAgent.GetEntityID(), m_stateAgent.GetEntityID(), MessageType.MT_TakeDamage, info); }