Exemplo n.º 1
0
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                Scene = null;
                User = null;

                MoveTime = 0;
                AttackTime = 0;
                NextRunTime = 0;
                CanMove = false;
                CanRun = false;

                MapControl = null;
                MainDialog = null;
                ChatDialog = null;
                ChatControl = null;
                InventoryDialog = null;
                CharacterDialog = null;
                StorageDialog = null;
                BeltDialog = null;
                MiniMapDialog = null;
                InspectDialog = null;
                OptionDialog = null;
                MenuDialog = null;
                NPCDialog = null;

                HoverItem = null;
                SelectedCell = null;
                PickedUpGold = false;

                UseItemTime = 0;
                PickUpTime = 0;
                InspectTime = 0;

                DisposeItemLabel();

                AMode = 0;
                PMode = 0;
                Lights = 0;

                NPCTime = 0;
                NPCID = 0;

                for (int i = 0; i < OutputLines.Length; i++)
                    if (OutputLines[i] != null && OutputLines[i].IsDisposed)
                        OutputLines[i].Dispose();

                OutputMessages.Clear();
                OutputMessages = null;
            }

            base.Dispose(disposing);
        }
Exemplo n.º 2
0
        public GameScene()
        {
            MapControl.AutoRun = false;
            Slaying = false;
            Thrusting = false;
            HalfMoon = false;
            CrossHalfMoon = false;
            DoubleSlash = false;
            TwinDrakeBlade = false;
            FlamingSword = false;

            GroupDialog.GroupList.Clear();

            Scene = this;
            BackColour = Color.Transparent;
            MoveTime = CMain.Time;

            KeyDown += GameScene_KeyDown;

            MainDialog = new MainDialog {Parent = this};
            ChatDialog = new ChatDialog {Parent = this};
            ChatControl = new ChatControlBar {Parent = this};
            InventoryDialog = new InventoryDialog {Parent = this};
            CharacterDialog = new CharacterDialog {Parent = this, Visible = false};
            BeltDialog = new BeltDialog {Parent = this};
            StorageDialog = new StorageDialog {Parent = this, Visible = false};
            MiniMapDialog = new MiniMapDialog {Parent = this};
            InspectDialog = new InspectDialog {Parent = this, Visible = false};
            OptionDialog = new OptionDialog {Parent = this, Visible = false};
            MenuDialog = new MenuDialog {Parent = this, Visible = false};
            NPCDialog = new NPCDialog {Parent = this, Visible = false};
            NPCGoodsDialog = new NPCGoodsDialog { Parent = this, Visible = false };
            NPCDropDialog = new NPCDropDialog { Parent = this, Visible = false };
            GroupDialog = new GroupDialog { Parent = this, Visible = false };
            BigMapDialog = new BigMapDialog {Parent = this, Visible = false};
            TrustMerchantDialog = new TrustMerchantDialog {Parent = this, Visible = false};

            for (int i = 0; i < OutputLines.Length; i++)
                OutputLines[i] = new MirLabel
                    {
                        AutoSize = true,
                        BackColour = Color.Transparent,
                        Font = new Font(Settings.FontName, 10F),
                        ForeColour = Color.LimeGreen,
                        Location = new Point(20, 20 + i*13),
                        OutLine = true,
                    };
        }