Esempio n. 1
0
 public void PlayNote(EntityAgent byEntity, EnumPitch pitch)
 {
     api.World.PlaySoundAt(new AssetLocation(Code.Domain + ":sounds/instrument/" + instrument), byEntity, null, GetNotePitch(pitch));
 }
Esempio n. 2
0
 public void SetNote(EntityAgent byEntity, EnumPitch pitch)
 {
     byEntity.WatchedAttributes.SetInt("noteplayed", (int)pitch);
 }
Esempio n. 3
0
 public float GetNotePitch(EnumPitch pitch)
 {
     return((float)Math.Pow(2.0, noteValues[(int)pitch] * 1.0 / 12.0));
 }