コード例 #1
0
 public void Enter(IArea area)
 {
     CurrentArea = area;
     SpaceMap.Add(area.Locations);
     Trader.Enter(area);
     Worker.Enter(area);
     SpaceCamera.MoveTo(area);
 }
コード例 #2
0
        public SpaceMap CreateSmallTestMap()
        {
            SpaceMap spaceMap = new SpaceMap(5, 5);

            for (int x = 0; x < 5; x++)
            {
                for (int y = 0; y < 5; y++)
                {
                    //TODO: fix my SmallTestMap
                    //bool isEdge = x == 0 || y == 0 || x == 4 || y == 4;
                    var s = new Space()
                    {
                        //Terrain = isEdge ? ttWall : ttFloor
                    };
                    spaceMap.Add(s, (x, y));
                }
            }
            //var sp = spaceMap.GetItem((3, 4));
            //sp.Terrain = ttDoorClosed;

            return(spaceMap);
        }