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); }
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)); }