Exemplo n.º 1
0
        private void AddResourceToFraction(Entity resourceEntity, Army army)
        {
            Resource resource = resourceEntity.GetComponent <Resource>();
            AddResourceToFractionEvent addResourceToFractionEvent = new AddResourceToFractionEvent(resource, army.Fraction);

            _eventBus.Post(addResourceToFractionEvent);

            RemoveResourceOnWorldMapEvent removeResourceOnWorldMapEvent = new RemoveResourceOnWorldMapEvent(resourceEntity);

            _eventBus.Post(removeResourceOnWorldMapEvent);
        }
 public void RemoveResourceListener(RemoveResourceOnWorldMapEvent removeResourceOnWorldMapEvent)
 {
     entityWorld.DeleteEntity(removeResourceOnWorldMapEvent.Resource);
 }