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


C# ChampionSpawnType類代碼示例

本文整理匯總了C#中ChampionSpawnType的典型用法代碼示例。如果您正苦於以下問題:C# ChampionSpawnType類的具體用法?C# ChampionSpawnType怎麽用?C# ChampionSpawnType使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


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

示例1: SetValue

 public void SetValue(ChampionSpawnType type, int value)
 {
     SetValue((int)type, value);
 }
開發者ID:brodock,項目名稱:genova-project,代碼行數:4,代碼來源:PlayerMobile.cs

示例2: Award

 public void Award(ChampionSpawnType type, int value)
 {
     Award((int)type, value);
 }
開發者ID:brodock,項目名稱:genova-project,代碼行數:4,代碼來源:PlayerMobile.cs

示例3: Deserialize

        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            m_DamageEntries = new Dictionary<Mobile, int>();

            int version = reader.ReadInt();

            switch (version)
            {
                case 5:
                    {
                        int entries = reader.ReadInt();
                        Mobile m;
                        int damage;
                        for (int i = 0; i < entries; ++i)
                        {
                            m = reader.ReadMobile();
                            damage = reader.ReadInt();

                            if (m == null)
                                continue;

                            m_DamageEntries.Add(m, damage);
                        }

                        goto case 4;
                    }
                case 4:
                    {
                        m_ConfinedRoaming = reader.ReadBool();
                        m_Idol = reader.ReadItem<IdolOfTheChampion>();
                        m_HasBeenAdvanced = reader.ReadBool();

                        goto case 3;
                    }
                case 3:
                    {
                        m_SpawnArea = reader.ReadRect2D();

                        goto case 2;
                    }
                case 2:
                    {
                        m_RandomizeType = reader.ReadBool();

                        goto case 1;
                    }
                case 1:
                    {
                        if (version < 3)
                        {
                            int oldRange = reader.ReadInt();

                            m_SpawnArea = new Rectangle2D(new Point2D(X - oldRange, Y - oldRange), new Point2D(X + oldRange, Y + oldRange));
                        }

                        m_Kills = reader.ReadInt();

                        goto case 0;
                    }
                case 0:
                    {
                        if (version < 1)
                            m_SpawnArea = new Rectangle2D(new Point2D(X - 24, Y - 24), new Point2D(X + 24, Y + 24));	//Default was 24

                        bool active = reader.ReadBool();
                        m_Type = (ChampionSpawnType)reader.ReadInt();
                        m_Creatures = reader.ReadStrongMobileList();
                        m_RedSkulls = reader.ReadStrongItemList();
                        m_WhiteSkulls = reader.ReadStrongItemList();
                        m_Platform = reader.ReadItem<ChampionPlatform>();
                        m_Altar = reader.ReadItem<ChampionAltar>();
                        m_ExpireDelay = reader.ReadTimeSpan();
                        m_ExpireTime = reader.ReadDeltaTime();
                        m_Champion = reader.ReadMobile();
                        m_RestartDelay = reader.ReadTimeSpan();

                        if (reader.ReadBool())
                        {
                            m_RestartTime = reader.ReadDeltaTime();
                            BeginRestart(m_RestartTime - DateTime.Now);
                        }

                        if (version < 4)
                        {
                            m_Idol = new IdolOfTheChampion(this);
                            m_Idol.MoveToWorld(new Point3D(X, Y, Z - 15), Map);
                        }

                        if (m_Platform == null || m_Altar == null || m_Idol == null)
                            Delete();
                        else if (active)
                            Start();

                        break;
                    }
            }

            Timer.DelayCall(TimeSpan.Zero, new TimerCallback(UpdateRegion));
//.........這裏部分代碼省略.........
開發者ID:PepeBiondi,項目名稱:runsa,代碼行數:101,代碼來源:ChampionSpawn.cs

示例4: GetValue

            private int m_Harrower;	//Harrower titles do NOT decay


            public int GetValue(ChampionSpawnType type)
            {
                return GetValue((int)type);
            }
開發者ID:brodock,項目名稱:genova-project,代碼行數:7,代碼來源:PlayerMobile.cs

示例5: GetInfo

		public static ChampionSpawnInfo GetInfo(ChampionSpawnType type)
		{
			var v = (int)type;

			return m_Table.InBounds(v) ? m_Table[v] : null;
		}
開發者ID:greeduomacro,項目名稱:UO-Forever,代碼行數:6,代碼來源:ChampionSpawnType.cs

示例6: GetInfo

        public static ChampionSpawnInfo GetInfo( ChampionSpawnType type )
        {
            int v = (int)type;

            if( v < 0 || v >= m_Table.Length )
                v = 0;

            return m_Table[v];
        }
開發者ID:kamronbatman,項目名稱:Defiance-AOS-Pre-2012,代碼行數:9,代碼來源:ChampionSpawnType.cs

示例7: Deserialize


//.........這裏部分代碼省略.........
                m_IsDeadPet = reader.ReadBool();
                m_IsBonded = reader.ReadBool();
                m_BondingBegin = reader.ReadDateTime();
                m_OwnerAbandonTime = reader.ReadDateTime();
            }

            if ( version >= 11 )
                m_HasGeneratedLoot = reader.ReadBool();
            else
                m_HasGeneratedLoot = true;

            if ( version >= 12 )
            {
                m_Paragon = reader.ReadBool();
                m_IsChampionMonster = reader.ReadBool();
            }
            else
            {
                m_Paragon = false;
                m_IsChampionMonster = false;
            }

            if ( version >= 13 && reader.ReadBool() )
                m_Friends = reader.ReadStrongMobileList();
            else if ( version < 13 && m_ControlOrder >= OrderType.Unfriend )
                ++m_ControlOrder;

            if ( version >= 14 )
                m_SpawnLevel = reader.ReadInt();
            else
                m_SpawnLevel = 0;

            if ( version >= 15 )
                m_ChampionType = (ChampionSpawnType) reader.ReadInt();

            if ( version >= 17 )
                m_StolenFrom = reader.ReadBool();

            if ( version >= 18 )
            {
                int count = reader.ReadInt();

                for ( int i = 0; i < count; i++ )
                {
                    Item rummaged = reader.ReadItem();
                    Mobile owner = reader.ReadMobile();

                    if ( rummaged != null && owner != null )
                        m_RummagedItems.Add( rummaged, owner );
                }
            }

            if ( version >= 20 )
            {
                m_IsMinichampMonster = reader.ReadBool();
                m_MinichampType = (MiniChampType) reader.ReadInt();
            }

            if ( version >= 21 )
            {
                m_NextTastyTreat = reader.ReadDateTime();
            }

            if ( version >= 22 )
            {
                m_Petrified = reader.ReadBool();
開發者ID:Ravenwolfe,項目名稱:xrunuo,代碼行數:67,代碼來源:BaseCreature.cs

示例8: EndRestart

        public void EndRestart()
        {
            if( RandomizeType )
            {
                switch( Utility.Random( 5 ) )
                {
                    case 0: Type = ChampionSpawnType.VerminHorde; break;
                    case 1: Type = ChampionSpawnType.UnholyTerror; break;
                    case 2: Type = ChampionSpawnType.ColdBlood; break;
                    case 3: Type = ChampionSpawnType.Abyss; break;
                    case 4: Type = ChampionSpawnType.Arachnid; break;
                }
            }

            m_HasBeenAdvanced = false;

            Start();
        }
開發者ID:Godkong,項目名稱:RunUO,代碼行數:18,代碼來源:ChampionSpawn.cs

示例9: Deserialize

        public override void Deserialize( GenericReader reader )
        {
            base.Deserialize( reader );

            int version = reader.ReadInt();

            switch ( version )
            {
                case 2:
                {
                    m_RandomizeType = reader.ReadBool();

                    goto case 1;
                }
                case 1:
                {
                    m_SpawnRange = reader.ReadInt();
                    m_Kills = reader.ReadInt();

                    goto case 0;
                }
                case 0:
                {
                    if ( version < 1 )
                        m_SpawnRange = 24;

                    bool active = reader.ReadBool();
                    m_Type = (ChampionSpawnType)reader.ReadInt();
                    m_Creatures = reader.ReadMobileList();
                    m_RedSkulls = reader.ReadItemList();
                    m_WhiteSkulls = reader.ReadItemList();
                    m_Platform = reader.ReadItem() as ChampionPlatform;
                    m_Altar = reader.ReadItem() as ChampionAltar;
                    m_ExpireDelay = reader.ReadTimeSpan();
                    m_ExpireTime = reader.ReadDeltaTime();
                    m_Champion = reader.ReadMobile();
                    m_RestartDelay = reader.ReadTimeSpan();

                    if ( reader.ReadBool() )
                    {
                        m_RestartTime = reader.ReadDeltaTime();
                        BeginRestart( m_RestartTime - Core.Now );
                    }

                    if ( m_Platform == null || m_Altar == null )
                        Delete();
                    else if ( active )
                        Start();

                    break;
                }
            }
        }
開發者ID:BackupTheBerlios,項目名稱:sunuo-svn,代碼行數:53,代碼來源:ChampionSpawn.cs

示例10: ChampionEntry

 public ChampionEntry( Type champtype, ChampionSpawnType type, Point3D signloc, Map map, bool randomizetype )
 {
     m_ChampType = champtype;
     m_RandomizeType = randomizetype;
     m_Type = type;
     m_SignLocation = signloc;
     m_Map = map;
 }
開發者ID:kamronbatman,項目名稱:Defiance-AOS-Pre-2012,代碼行數:8,代碼來源:GenChamps.cs


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