public void SetUp() { this.world = MockWorld.Generate(); this.entity = this.world.CreateEntity(); this.interpreter = new Interpreter(Assembly.GetAssembly(typeof(ReverieGame))); Container inventory = new Container(10); this.entity.AddComponent(inventory); EntityDataCache entityDatas = WorldCache.GetCache(this.world).EntityDatas; Entity itemStack = this.world.CreateEntity(); itemStack.AddComponent(new EntityStack(3, 3)); itemStack.AddComponent(entityDatas[EntityType.Consumable]); Entity itemSingle = this.world.CreateEntity(); itemSingle.AddComponent(entityDatas[EntityType.Consumable]); Entity bag = this.world.CreateEntity(); Container container = new Container(3); EntityData bagEntityData = new EntityData( Guid.NewGuid(), "Bag", "Just a bag.", null, EntityType.Container); bag.AddComponent(bagEntityData); bag.AddComponent(container); container.AddEntity(itemStack); inventory.AddEntity(bag); inventory.AddEntity(itemSingle); }
public ReverieGame() { this.gameWorld = MockWorld.Generate(); this.interpreter = new CommandParser.Interpreter(Assembly.GetAssembly(typeof(ReverieGame))); }