2025-06-03 02:42:28 -04:00
|
|
|
|
using System.Collections;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using Ichni.RhythmGame.Beatmap;
|
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Ichni.RhythmGame
|
|
|
|
|
|
{
|
|
|
|
|
|
public class SongInformation : IBaseElement
|
|
|
|
|
|
{
|
|
|
|
|
|
public AudioClip song; //曲目
|
|
|
|
|
|
public string songName;
|
|
|
|
|
|
public string songLocation; //曲名
|
|
|
|
|
|
public float bpm; //每分钟节拍数
|
|
|
|
|
|
public float delay; //设定音乐和谱面延迟Delay秒后开始,在延迟中,SongPosition为负数。
|
|
|
|
|
|
|
2025-07-21 05:42:20 -04:00
|
|
|
|
public float songLength;
|
|
|
|
|
|
public float offset = 0f;
|
2025-06-03 02:42:28 -04:00
|
|
|
|
public BaseElement_BM matchedBM { get; set; }
|
|
|
|
|
|
|
2025-07-21 05:42:20 -04:00
|
|
|
|
public SongInformation(string songName, float bpm, float delay, float offset)
|
2025-06-03 02:42:28 -04:00
|
|
|
|
{
|
|
|
|
|
|
this.songName = songName;
|
|
|
|
|
|
this.bpm = bpm;
|
|
|
|
|
|
this.delay = delay;
|
2025-07-21 05:42:20 -04:00
|
|
|
|
this.offset = offset;
|
2025-08-22 14:54:40 -04:00
|
|
|
|
|
2026-03-14 03:13:10 -04:00
|
|
|
|
GameManager.Instance.songPlayer.songTimeSegment = -delay; // 初始化时,歌曲时间为负
|
2025-06-03 02:42:28 -04:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|