Пример #1
0
        public static void NewGame()
        {
            Objects      = new List <GameObject> ();
            Map          = new Tile[MAP_WIDTH, MAP_HEIGHT];
            Log          = new List <Message>();
            abilityGUI   = new AbilityGUI();
            statusGUI    = new StatusGUI();
            equipmentGUI = new EquipmentGUI(5);
            inventoryGUI = new InventoryGUI();

            Map = MapMaker.MakeTunnelMap(false);

            miniMap = new MiniMap(30, 20, Map);

            PlayerObject               = new GameObject(StartPosition.x, StartPosition.y, "hero", 120, 200, (int)(0.05 * Game1.WIDTH - 124.21), (int)(0.61 * Game1.HEIGHT - 670));
            PlayerObject.Player        = new Player(10);
            PlayerObject.Player.Owner  = PlayerObject;
            PlayerObject.Fighter       = new Fighter(2, 5, 0, 0);
            PlayerObject.Fighter.Owner = PlayerObject;

            Objects.Add(PlayerObject);
            DeathScreen.OnStart();
            Started  = true;
            ToRemove = new List <GameObject>();

            GoToPlaying();

            //Console.Out.WriteLine(PlayerObject.x.ToString() + ";" + PlayerObject.y.ToString());
            //Console.Out.WriteLine("Position : " + PlayerObject.Position.x.ToString() + ";" + PlayerObject.Position.y.ToString());
            //Console.Out.WriteLine("InventoryWidth:" + InventoryWidth.ToString());
        }