예제 #1
0
파일: GameLogic.cs 프로젝트: mrenow/2D-Game
        public static void InitNew(int seed)
        {
            InitBefore();

            Terrain.CreateNew(seed);
            Terrain.Init();

            EntityManager.Init();
            Player.CreateNew();
            EntityManager.AddEntity(Player.Instance);
            Player.Instance.CorrectTerrainCollision();
            PlayerInventory.Init();
            PlayerInventory.Instance.LoadDefaultItems();


            //for (int i = 1; i <= 300; i++) {
            //    Shooter s = new Shooter(new Vector2(i * 20 * MathUtil.RandFloat(Program.Rand, 0.8f, 1.2f), 0), 100, 250);
            //    EntityManager.AddEntity(s);
            //    s.CorrectTerrainCollision();

            //    Squisher sq = new Squisher(new Vector2(i * 20 * MathUtil.RandFloat(Program.Rand, 0.8f, 1.2f), 0));
            //    EntityManager.AddEntity(sq);
            //    sq.CorrectTerrainCollision();
            //}
        }