/// <summary> /// Adds a new staff to the score. /// </summary> /// <param name="clef">Clef</param> /// <param name="timeSignature">Time signature</param> /// <param name="tonic">Tonic of key</param> /// <param name="flags">Scale flags</param> /// <returns>This score</returns> public Score AddStaff(Clef clef, TimeSignature timeSignature, Step tonic, MajorAndMinorScaleFlags flags) { var staff = new Staff(); staff.Elements.Add(clef); staff.Elements.Add(Key.FromTonic(tonic, flags)); Staves.Add(staff); return(this); }
public void EnsureStaveCount(int staveCount) { while (Staves.Count < staveCount) { var staff = new Staff(); staff.Index = Staves.Count; staff.Track = this; Staves.Add(staff); } }
public static bool IsWeapon(string itemBase) { if (Bows.Contains(itemBase)) { return(true); } if (Claws.Contains(itemBase)) { return(true); } if (OneHandedAxes.Contains(itemBase)) { return(true); } if (OneHandedMaces.Contains(itemBase)) { return(true); } if (OneHandedSwords.Contains(itemBase)) { return(true); } if (TwoHandedAxes.Contains(itemBase)) { return(true); } if (TwoHandedMaces.Contains(itemBase)) { return(true); } if (TwoHandedSwords.Contains(itemBase)) { return(true); } if (Sceptres.Contains(itemBase)) { return(true); } if (Daggers.Contains(itemBase)) { return(true); } if (Staves.Contains(itemBase)) { return(true); } if (Wands.Contains(itemBase)) { return(true); } return(false); }
internal void BuildStaffFragments(Dictionary <Staff, double[]> linePositions) { foreach (var kvp in linePositions) { var staffFragmentForThisStaff = Staves.FirstOrDefault(s => s.Staff == kvp.Key); if (staffFragmentForThisStaff == null) { staffFragmentForThisStaff = new StaffFragment(kvp.Key); Staves.Add(staffFragmentForThisStaff); } staffFragmentForThisStaff.LinePositions = kvp.Value; } }
public void AddStave(Track track, Stave stave) { var group = GetStaveTrackGroup(track); if (group == null) { group = new StaveTrackGroup(this, track); Staves.Add(group); } stave.StaveTrackGroup = group; stave.StaveGroup = this; stave.Index = _allStaves.Count; _allStaves.Add(stave); group.Staves.Add(stave); if (stave.IsInAccolade) { if (_firstStaveInAccolade == null) { _firstStaveInAccolade = stave; stave.IsFirstInAccolade = true; } if (group.FirstStaveInAccolade == null) { group.FirstStaveInAccolade = stave; } if (_lastStaveInAccolade == null) { _lastStaveInAccolade = stave; stave.IsLastInAccolade = true; } if (_lastStaveInAccolade != null) { _lastStaveInAccolade.IsLastInAccolade = false; } _lastStaveInAccolade = stave; _lastStaveInAccolade.IsLastInAccolade = true; group.LastStaveInAccolade = stave; } }
internal void AddStaff(Staff staff) { staff.Index = Staves.Count; staff.Track = this; Staves.Add(staff); }
public static string GetItemType(string itemBase) { if (Bows.Contains(itemBase)) { return("Bow"); } if (Claws.Contains(itemBase)) { return("Claw"); } if (OneHandedAxes.Contains(itemBase)) { return("One Hand Axe"); } if (OneHandedMaces.Contains(itemBase)) { return("One Hand Mace"); } if (OneHandedSwords.Contains(itemBase)) { return("One Hand Sword"); } if (TwoHandedAxes.Contains(itemBase)) { return("Two Hand Axe"); } if (TwoHandedMaces.Contains(itemBase)) { return("Two Hand Mace"); } if (Sceptres.Contains(itemBase)) { return("Sceptre"); } if (Daggers.Contains(itemBase)) { return("Dagger"); } if (Staves.Contains(itemBase)) { return("Staff"); } if (Belts.Contains(itemBase)) { return("Belt"); } if (Amulets.Contains(itemBase)) { return("Amulet"); } if (Rings.Contains(itemBase)) { return("Ring"); } if (Boots.Contains(itemBase)) { return("Boots"); } if (Gloves.Contains(itemBase)) { return("Gloves"); } if (BodyArmors.Contains(itemBase)) { return("Body Armour"); } if (Wands.Contains(itemBase)) { return("Wand"); } if (Helmets.Contains(itemBase)) { return("Helmet"); } if (Shields.Contains(itemBase)) { return("Shield"); } if (Jewels.Contains(itemBase)) { return("Jewel"); } if (itemBase == "Gem") { return(itemBase); } if (Quivers.Contains(itemBase)) { return("Quiver"); } return("No type found"); }
public Queen() { iSwordWeapon = new Staves(); }