public void InitializeLongNote(int noteNum, LaneController laneCont, RhythmGameController gameCont) { laneController = laneCont; gameController = gameCont; int spriteNum = noteNum + 4; visuals.sprite = noteSprites[spriteNum - 1]; }
/// <summary> /// 初始化 /// </summary> /// <param name="evt">KoreographyEvent对象</param> /// <param name="noteNum">音符数量</param> /// <param name="laneCont">音轨控制类</param> /// <param name="gameCont">游戏控制类</param> /// <param name="isLongStart">长音符头</param> /// <param name="isLongEnd">长音符尾</param> public void Initialize(KoreographyEvent evt, int noteNum, LaneController laneCont, RhythmGameController gameCont, bool isLongStart, bool isLongEnd) { trackedEvent = evt; laneController = laneCont; gameController = gameCont; isLongNote = isLongStart; isLongNoteEnd = isLongEnd; spriteNum = noteNum; if (isLongNote) { spriteNum += 4; } else if (isLongNoteEnd) { spriteNum += 8; } visuals.sprite = noteSprites[spriteNum - 1]; }
/// <summary> /// 将Note对象重置 /// </summary> private void ResetNote() { trackedEvent = null; laneController = null; gameController = null; }
/// <summary> /// 初始化 /// </summary> /// <param name="controller"></param> public void Initialize(RhythmGameController controller) { gameController = controller; }