68 lines
1.8 KiB
C#
68 lines
1.8 KiB
C#
|
|
using System.Collections;
|
|||
|
|
using System.Collections.Generic;
|
|||
|
|
using System.Net;
|
|||
|
|
using UnityEngine;
|
|||
|
|
|
|||
|
|
public class TestDataFlow : MonoBehaviour
|
|||
|
|
{
|
|||
|
|
/// <summary>
|
|||
|
|
/// <20><>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>Ҫʱ<D2AA><CAB1><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ߵ<EFBFBD><DFB5><EFBFBD>Ⱦ<EFBFBD><C8BE>ʽ
|
|||
|
|
/// </summary>
|
|||
|
|
private BPMGroup MainBPMGroup;
|
|||
|
|
private NotePoolManager NotePool = new NotePoolManager();
|
|||
|
|
private SongInformationContainer songInformationContainer = new SongInformationContainer();
|
|||
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ
|
|||
|
|
private float DefaultBaseSpeed = 25;
|
|||
|
|
private float DefaultTrackLength = 125;
|
|||
|
|
//<2F><><EFBFBD>ĵ<DEB8><C4B5><EFBFBD>ֵ
|
|||
|
|
private float DefaultNoteStream = 5f;
|
|||
|
|
private float DefaultBPM = 128;
|
|||
|
|
private float DefaultBaseBPM = 128;
|
|||
|
|
public float currentTime = 0;
|
|||
|
|
public DataFlowController Prefab_DataFlow;
|
|||
|
|
|
|||
|
|
|
|||
|
|
private void Awake()
|
|||
|
|
{
|
|||
|
|
songInformationContainer.UpdateSongInformation(currentTime);
|
|||
|
|
MainBPMGroup = InitDefaultBPMList();
|
|||
|
|
print(MainBPMGroup.ToString());
|
|||
|
|
}
|
|||
|
|
private void Update()
|
|||
|
|
{
|
|||
|
|
currentTime += Input.mouseScrollDelta.y * 0.05f;
|
|||
|
|
songInformationContainer.UpdateSongInformation(currentTime);
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
private void Start()
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
//Ȼ<><C8BB><EFBFBD><EFBFBD><EFBFBD>õ㼯<C3B5><E3BCAF>
|
|||
|
|
|
|||
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>뿪ʼ<EBBFAA><CABC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
NotePool.Get<DataFlowController>(Prefab_DataFlow).Init(
|
|||
|
|
new Vector2(-2f, -2f),
|
|||
|
|
new Vector2(2, 2),
|
|||
|
|
0,
|
|||
|
|
1,
|
|||
|
|
0.4f,
|
|||
|
|
songInformationContainer,
|
|||
|
|
MainBPMGroup,
|
|||
|
|
ReferencePointLocation.RightBottom
|
|||
|
|
) ;
|
|||
|
|
}
|
|||
|
|
private BPMGroup InitDefaultBPMList()
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
var Main = new BPMGroup(
|
|||
|
|
currentBPM: DefaultBPM,
|
|||
|
|
groupNum: 0,//<2F>Զ<EFBFBD><D4B6><EFBFBD><EFBFBD>ɱ<EFBFBD><C9B1><EFBFBD>Ϊ0<CEAA><30>BPM<50><4D>
|
|||
|
|
noteStream: DefaultNoteStream,
|
|||
|
|
baseSpeed: DefaultBaseSpeed,
|
|||
|
|
baseBPM: DefaultBaseBPM,
|
|||
|
|
trackLength: DefaultTrackLength);
|
|||
|
|
|
|||
|
|
return Main;
|
|||
|
|
}
|
|||
|
|
}
|