當前位置: 首頁>>代碼示例>>C#>>正文


C# XmlSpawner.HasSubGroups方法代碼示例

本文整理匯總了C#中Server.Mobiles.XmlSpawner.HasSubGroups方法的典型用法代碼示例。如果您正苦於以下問題:C# XmlSpawner.HasSubGroups方法的具體用法?C# XmlSpawner.HasSubGroups怎麽用?C# XmlSpawner.HasSubGroups使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Server.Mobiles.XmlSpawner的用法示例。


在下文中一共展示了XmlSpawner.HasSubGroups方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: XmlSpawnerGump

        public XmlSpawnerGump(XmlSpawner spawner, int X, int Y, int extension, int textextension, int newpage, ReplacementEntry rentry)
            : base(X, Y)
        {
            if (spawner == null || spawner.Deleted)
                return;

            m_Spawner = spawner;
            spawner.SpawnerGump = this;
            xoffset = textextension;
            initial_maxcount = spawner.MaxCount;
            page = newpage;
            Rentry = rentry;

            AddPage(0);

            // automatically change the gump depending on whether sequential spawning and/or subgroups are activated

            if (spawner.SequentialSpawn >= 0 || spawner.HasSubGroups() || spawner.HasIndividualSpawnTimes())
            {
                // show the fully extended gump with subgroups and reset timer info
                m_ShowGump = 2;
            }
            /*
        else
            if(spawner.HasSubGroups() || spawner.SequentialSpawn >= 0)
        {
            // show partially extended gump with subgroups
            m_ShowGump = 1;
        }
        */

            if (extension > 0)
            {
                m_ShowGump = extension;
            }
            if (extension < 0)
            {
                m_ShowGump = 0;
            }

            // if the expanded gump toggle has been activated then override the auto settings.


            if (m_ShowGump > 1)
            {
                AddBackground(0, 0, 670 + xoffset + 30, 474, 5054);
                AddAlphaRegion(0, 0, 670 + xoffset + 30, 474);
            }
            else
                if (m_ShowGump > 0)
                {
                    AddBackground(0, 0, 335 + xoffset, 474, 5054);
                    AddAlphaRegion(0, 0, 335 + xoffset, 474);
                }
                else
                {
                    AddBackground(0, 0, 305 + xoffset, 474, 5054);
                    AddAlphaRegion(0, 0, 305 + xoffset, 474);
                }

            // spawner name area
            AddImageTiled(3, 5, 227, 23, 0x52);
            AddImageTiled(4, 6, 225, 21, 0xBBC);
            AddTextEntry(6, 5, 222, 21, 0, 999, spawner.Name); // changed from color 50

            AddButton(5, 450, 0xFAE, 0xFAF, 4, GumpButtonType.Reply, 0);
            AddLabel(38, 450, 0x384, "Goto");

            //AddButton( 5, 428, 0xFB7, 0xFB9, 1, GumpButtonType.Reply, 0 );
            AddButton(5, 428, 0xFAE, 0xFAF, 1, GumpButtonType.Reply, 0);
            AddLabel(38, 428, 0x384, "Help");

            AddButton(80, 428, 0xFB4, 0xFB6, 2, GumpButtonType.Reply, 0);
            AddLabel(113, 428, 0x384, "Bring Home");

            AddButton(80, 450, 0xFA8, 0xFAA, 3, GumpButtonType.Reply, 0);
            AddLabel(113, 450, 0x384, "Respawn");

            // Props button
            AddButton(200, 428, 0xFAB, 0xFAD, 9999, GumpButtonType.Reply, 0);
            AddLabel(233, 428, 0x384, "Props");

            // Sort button
            AddButton(200, 450, 0xFAB, 0xFAD, 702, GumpButtonType.Reply, 0);
            AddLabel(233, 450, 0x384, "Sort");

            // Reset button
            AddButton(80, 406, 0xFA2, 0xFA3, 701, GumpButtonType.Reply, 0);
            AddLabel(113, 406, 0x384, "Reset");

            // Refresh button
            AddButton(200, 406, 0xFBD, 0xFBE, 9998, GumpButtonType.Reply, 0);
            AddLabel(233, 406, 0x384, "Refresh");

            // add run status display
            if (m_Spawner.Running)
            {
                AddButton(5, 399, 0x2A4E, 0x2A3A, 700, GumpButtonType.Reply, 0);
                AddLabel(38, 406, 0x384, "On");
            }
//.........這裏部分代碼省略.........
開發者ID:greeduomacro,項目名稱:UO-Forever,代碼行數:101,代碼來源:XmlSpawnerGumps.cs


注:本文中的Server.Mobiles.XmlSpawner.HasSubGroups方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。