protected void CopyTo(ScoreBucketModifier clone) { base.CopyTo(clone); clone.bucket = this.bucket; clone.isPrivate = this.upid.Contains("local"); }
public override ProgrammingElement Clone() { ScoreBucketModifier clone = new ScoreBucketModifier(); CopyTo(clone); return(clone); }
/// <summary> /// Figure out the name of the score register from the set of modifiers. /// If the name could not be determined, a default name is returned. /// </summary> public static ScoreBucket ScoreBucketFromModifierSet(List <Modifier> modifiers, ref bool specified, ref bool isColorBucket) { specified = true; isColorBucket = true; foreach (Modifier modifier in modifiers) { if (modifier is ColorModifier) { ColorModifier colorMod = modifier as ColorModifier; return((ScoreBucket)colorMod.color); } if (modifier is ScoreBucketModifier) { isColorBucket = false; ScoreBucketModifier bucketMod = modifier as ScoreBucketModifier; return(bucketMod.bucket); } // Legacy code support if (modifier is TeamModifier) { TeamModifier teamMod = modifier as TeamModifier; if (teamMod.team == TeamModifier.Team.B) { return((ScoreBucket)Classification.Colors.Green); } else { return((ScoreBucket)Classification.Colors.Red); } } } specified = false; return(ScoreBucket.NotApplicable); }