public override IEnumerable <Message> Handle(Model model) { if (model.FindEntity(id) == null) { yield return(new GetEntity(id)); } }
public override IEnumerable<Message> Handle(Model model) { var e = model.FindEntity(id); if (e.Get<PushComponent>() == null) e.Set<PushComponent>(new PushComponent()); e.Get<PushComponent>().Push(v); return null; }
public override System.Collections.Generic.IEnumerable<Message> Handle(Model model) { var e = model.FindEntity(id); if (e == null) yield return new GetEntity(id); else e.Get<HealthComponent>().Health += dhp; }
public override System.Collections.Generic.IEnumerable<Message> Handle(Model model) { var e = model.FindEntity(entityId); if (e == null) yield return new GetEntity(entityId); else { e.Get<WeaponComponent>().UpdateWeapon(weapon); } }
public override IEnumerable <Message> Handle(Model model) { if (model.FindEntity(entity.Id) != null) { return(null); } model.Add(entity); return(null); }
public override IEnumerable <Message> Handle(Model model) { var e = model.FindEntity(id); if (e.Get <PushComponent>() == null) { e.Set <PushComponent>(new PushComponent()); } e.Get <PushComponent>().Push(v); return(null); }
public override System.Collections.Generic.IEnumerable <Message> Handle(Model model) { var e = model.FindEntity(id); if (e == null) { yield return(new GetEntity(id)); } else { e.Get <HealthComponent>().Health += dhp; } }
public override System.Collections.Generic.IEnumerable <Message> Handle(Model model) { var e = model.FindEntity(entityId); if (e == null) { yield return(new GetEntity(entityId)); } else { e.Get <WeaponComponent>().UpdateWeapon(weapon); } }
public override IEnumerable <Message> Handle(Model model) { var e = model.FindEntity(entityId); if (e == null) { yield return(new GetEntity(entityId)); } else { e.Set(componentName, component); } }
public override IEnumerable <Message> Handle(Model model) { var entity = model.FindEntity(id); if (entity != null) { yield return(new NewEntity(entity)); } else { //throw new Exception("Entity not found!"); } }