private void OnBulletThrowEvent(BulletThrowEventPayload payload)
 {
     if (payload.Sender != m_playerEntity.transform)
     {
         return;
     }
     m_currentBullets -= 1;
     m_eventBus.Dispatch(PlayerUpdateBulletEventPayload.Create(m_currentBullets));
 }
 private void OnPlayerUpdateBulletEvent(PlayerUpdateBulletEventPayload payload)
 {
     m_eventBus.Dispatch(PlayerEnableShotEventPayload.Create(payload.Amount > 0));
 }
 private void OnPlayerAddBulletEvent(PlayerAddBulletEventPayload payload)
 {
     m_currentBullets += payload.Value;
     m_eventBus.Dispatch(PlayerUpdateBulletEventPayload.Create(m_currentBullets));
 }
Ejemplo n.º 4
0
 private void OnPlayerUpdateBulletEvent(PlayerUpdateBulletEventPayload payload)
 {
     m_bulletText.text = $"Bullets {payload.Amount}";
 }