FSO.HIT.HITThread.HitlistChoose C# (CSharp) Method

HitlistChoose() public method

public HitlistChoose ( ) : uint
return uint
        public uint HitlistChoose()
        {
            Random rand = new Random();
            if (Hitlist != null) return Hitlist.IDs[rand.Next(Hitlist.IDs.Count)];
            else return 0;
        }

Usage Example

示例#1
0
        /// <summary>
        /// Set the specified variable to a random entry from the selected hitlist.
        /// </summary>
        public static HITResult SmartChoose(HITThread thread)
        {
            var dest = thread.ReadByte();

            thread.WriteVar(dest, (int)thread.HitlistChoose());
            return(HITResult.CONTINUE);
        }
All Usage Examples Of FSO.HIT.HITThread::HitlistChoose