当前位置: 首页>>代码示例>>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;未经允许,请勿转载。