public void OnIconEvent(NoteEventType eventType) { switch (eventType) { case NoteEventType.Hit: indicatorUI.OnNoteHit(); break; } }
public int x; //lane #endregion Fields #region Constructors public NoteEvent(bool c, int id, int measure, double measureDiv, int channel) { x = GetBmsOnX(channel); this.c = c; this.id = (ulong)id; this.measure = measure; this.measureDiv = measureDiv; this.channel = channel; eventType = EventType.NoteEvent; noteEventType = GetNoteEventType(channel); }
public void CallAllNoteEvents(NoteEventType eventType) { if (onNoteEvent == null) { return; } foreach (int note in this) { onNoteEvent.Invoke(eventType, note); } }
public NoteMidiEvent( int deltaTime, byte typeCode, byte note, byte param) : base(deltaTime, typeCode) { noteEventType = (NoteEventType)(typeCode & 0b1111_0000); channel = (byte)(typeCode & 0b1111); this.note = note; this.param = param; }
public NoteMidiEvent( int deltaTime, NoteEventType noteEventType, byte channel, byte note, byte param) : base(deltaTime, GetCode(noteEventType, channel)) { this.noteEventType = noteEventType; this.channel = channel; this.note = note; this.param = param; }
private void OnIconEvent(NoteEventType eventType, int note) { //Debug.Log("Event = " + eventType + ":" + note); // Busca una instancia de ícono que tenga el mismo índice que se le pasó NoteIcon icon = noteIcons[note]; // Revisa si encontró una nota con el mismo índice para continuar con el método if (icon == null) { return; } // En función del parámetro eventType, actualiza el ícono switch (eventType) { case NoteEventType.Hit: HitNote(icon, note); break; case NoteEventType.Miss: icon.OnMiss(owner.missColor); // TODO: Mostrar más claramente que fallamos esa nota break; case NoteEventType.Release: icon.OnRelease(); icon.OnMiss(owner.missColor); break; case NoteEventType.NextNote: icon.OnNextNote(); break; } owner.noteIndicators[note].OnIconEvent(eventType); }
public NoteEvent(float beatStamp, NoteEventType type, NoteMessage message) { this.beatStamp = beatStamp; this.eventType = type; this.message = message; }
public void CallNoteEvent(NoteEventType eventType, int index) { onNoteEvent.Invoke(eventType, index); }
private static byte GetCode(NoteEventType noteEventType, byte channel) => (byte)((byte)noteEventType | channel);