Ejemplo n.º 1
0
        public static MusicName RandomTrack(DawnsMusicRarity rarity)
        {
            var list = rarity switch
            {
                DawnsMusicRarity.Common => m_CommonTracks,
                DawnsMusicRarity.Uncommon => m_UncommonTracks,
                DawnsMusicRarity.Rare => m_RareTracks,
                _ => m_CommonTracks
            };

            return(list[Utility.Random(list.Length)]);
        }
    }
Ejemplo n.º 2
0
        public static MusicName RandomTrack(DawnsMusicRarity rarity)
        {
            var list = rarity switch
            {
                DawnsMusicRarity.Common => m_CommonTracks,
                DawnsMusicRarity.Uncommon => m_UncommonTracks,
                DawnsMusicRarity.Rare => m_RareTracks,
                _ => m_CommonTracks
            };

            return(list.RandomElement());
        }
    }
Ejemplo n.º 3
0
        public static MusicName RandomTrack(DawnsMusicRarity rarity)
        {
            MusicName[] list = null;

            switch (rarity)
            {
            default:
            case DawnsMusicRarity.Common: list = m_CommonTracks; break;

            case DawnsMusicRarity.Uncommon: list = m_UncommonTracks; break;

            case DawnsMusicRarity.Rare: list = m_RareTracks; break;
            }

            return(list[Utility.Random(list.Length)]);
        }
Ejemplo n.º 4
0
 public DawnsMusicInfo(int name, DawnsMusicRarity rarity)
 {
     m_Name   = name;
     m_Rarity = rarity;
 }
Ejemplo n.º 5
0
		public DawnsMusicInfo( int name, DawnsMusicRarity rarity )
		{
			m_Name = name;
			m_Rarity = rarity;
		}
Ejemplo n.º 6
0
		public static MusicName RandomTrack( DawnsMusicRarity rarity )
		{
			MusicName[] list = null;

			switch ( rarity )
			{
				default:
				case DawnsMusicRarity.Common: list = m_CommonTracks; break;
				case DawnsMusicRarity.Uncommon: list = m_UncommonTracks; break;
				case DawnsMusicRarity.Rare: list = m_RareTracks; break;
			}

			return list[ Utility.Random( list.Length ) ];
		}