예제 #1
0
        public model.entities.physical.GEStockPile SpawnStockPile(int x, int y, int width, int height)
        {
            GEStockPile pile = new GEStockPile();

            pile.position.x       = x;
            pile.position.y       = y;
            pile.dimension.width  = width;
            pile.dimension.height = height;
            return(world.AddEntity(pile) as GEStockPile);
        }
예제 #2
0
        public void TestSpawnStockPile()
        {
            GEStockPile stockPile = factory.SpawnStockPile(10, 20, 5, 8);

            Assert.IsNotNull(stockPile);
            Assert.IsTrue(world.ContainsEntity(stockPile));
            Assert.IsTrue(stockPile.position.x == 10);
            Assert.IsTrue(stockPile.position.y == 20);
            Assert.IsTrue(stockPile.dimension.width == 5);
            Assert.IsTrue(stockPile.dimension.height == 8);
        }