public EditorScreen() { _spriteRenderer = new SpriteRenderer(); _cache = new ResourceCache(); _entities = new EntitySet(); _generators = new Dictionary<string, IEntityGenerator>(); RegisterGenerators(); }
public Entity Generate(EntitySet set, ResourceCache cache, string entityName, Dictionary<string, object> parameters) { var e = set.Create(entityName); var visual = e.AddComponent<Sprite>(); visual.Load(cache, "Data/Texture/tree.png"); var clickArea = e.AddComponent<ClickArea>(); clickArea.BaseWidth = 96; clickArea.BaseHeight = 96; return e; }