public void RemoveService(BubbleService serviceToDelete) { if (serviceToDelete.RigidInService != null) { serviceToDelete.RigidInService.SetAwake(true); } this.ListOfServices.Remove(serviceToDelete); }
public void Update(GameTime gameTime) { BubbleService serviceToDie = null; foreach (var bubbleService in ListOfServices) { if (!bubbleService.ShouldDie) { bubbleService.Update(gameTime); } else { serviceToDie = bubbleService; } } if (serviceToDie != null) { this.RemoveService(serviceToDie); } }
public void AddNewService(BubbleService bubbleService) { this.ListOfServices.Add(bubbleService); }