public override void generateVaild(System.Random rand, WorldCondition worldCond) { elements = new CondExprElement[2]; elements[0].type = CondExprElemntType.IntValue; elements[0].meta = rand.Next() % objectMap.Length; elements[1].type = CondExprElemntType.Color; elements[1].meta = (int)worldCond.getObjectColor(objectMap[elements[0].meta]); }
public override bool testVaild(WorldCondition worldCond) { return elements[1].meta == (int)worldCond.getObjectColor(objectMap[elements[0].meta]); }