Пример #1
0
    public static bool GetTrapTest(int intype, uint rand)
    {
        TableTrapIncidenceData data = Array.Find(Table, i => i.IncidenceType == intype && i.StartPoint <= rand && rand <= i.EndPoint);

        if (CommonFunction.IsNull(data) == true)
        {
            return(false);
        }
        return(true);
    }
Пример #2
0
    public static BaseTrap GetTrap(int intype, uint rand)
    {
        TableTrapIncidenceData data = Array.Find(Table, i => i.IncidenceType == intype && i.StartPoint <= rand && rand <= i.EndPoint);

        if (CommonFunction.IsNull(data) == true)
        {
            return(null);
        }
        return(TableTrap.GetTrap(data.ObjNo));
    }