public Contexts() { action = new ActionContext(); factory = new FactoryContext(); game = new GameContext(); grid = new GridContext(); input = new InputContext(); mapEditor = new MapEditorContext(); meta = new MetaContext(); request = new RequestContext(); var postConstructors = System.Linq.Enumerable.Where( GetType().GetMethods(), method => System.Attribute.IsDefined(method, typeof(Entitas.CodeGeneration.Attributes.PostConstructorAttribute)) ); foreach (var postConstructor in postConstructors) { postConstructor.Invoke(this, null); } }
public static MapEditorEntity GetEntityWithId(this MapEditorContext context, int value) { return(((Entitas.PrimaryEntityIndex <MapEditorEntity, int>)context.GetEntityIndex(Contexts.Id)).GetEntity(value)); }
public static MapEditorEntity GetEntityWithAssetBay(this MapEditorContext context, int id) { return(((Entitas.PrimaryEntityIndex <MapEditorEntity, int>)context.GetEntityIndex(Contexts.AssetBay)).GetEntity(id)); }