Exemple #1
0
        public void Init(int mapId, int zoneCells)
        {
            Map.LoadMap(mapId);

            // Zone
            ZoneCells = zoneCells;

            int countY = (Map.SizeY + zoneCells - 1) / zoneCells;
            int countX = (Map.SizeX + zoneCells - 1) / zoneCells;

            Zones = new Zone[countY, countX];

            for (int y = 0; y < countY; y++)
            {
                for (int x = 0; x < countX; x++)
                {
                    Zones[y, x] = new Zone(y, x);
                }
            }


            // temp
            for (int i = 0; i < 300; i++)
            {
                Monster monster = ObjectManager.Instance.Add <Monster>();
                monster.Init(1);
                EnterGame(monster, randomPos: true);
            }
        }
Exemple #2
0
        public void Init(int mapId, int zoneCells)
        {
            Map.LoadMap(mapId);

            // Zone
            // ㅁㅁㅁ
            // ㅁㅁㅁ
            // ㅁㅁㅁ
            ZoneCells = zoneCells;

            int countY = (Map.SizeY + zoneCells - 1) / zoneCells;
            int countX = (Map.SizeX + zoneCells - 1) / zoneCells;

            Zones = new Zone[countY, countX];
            for (int y = 0; y < countY; y++)
            {
                for (int x = 0; x < countX; x++)
                {
                    Zones[y, x] = new Zone(y, x);
                }
            }

            // TEMP 테스트할몬스터 만들기
            for (int i = 0; i < 20; i++)
            {
                Monster monster = ObjectManager.Instance.Add <Monster>();
                monster.Init(1);
                this.Push(this.EnterGame, monster, true);
            }
        }