拼图测试场景
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using A2W;
|
||||
using Unity.Cinemachine;
|
||||
using UnityEngine;
|
||||
@@ -15,11 +16,10 @@ public class MusicGame : SceneSingleton<MusicGame>
|
||||
public Vector3 judgeLine;
|
||||
private List<GameObject> tickNote = new List<GameObject>();
|
||||
double startDsp;
|
||||
|
||||
public int Sroce = 0;
|
||||
void Start()
|
||||
{
|
||||
mainCamera = Camera.main;
|
||||
|
||||
}
|
||||
|
||||
void Update()
|
||||
@@ -27,6 +27,11 @@ public class MusicGame : SceneSingleton<MusicGame>
|
||||
// if (Keyboard.current.qKey.wasPressedThisFrame) Play();
|
||||
}
|
||||
|
||||
public async Task openGameUI()
|
||||
{
|
||||
await UIManager.instance.ShowPanel<MusicGamePanel>();
|
||||
}
|
||||
|
||||
public void Play()
|
||||
{
|
||||
mainCamera.transform.position = new Vector3(0, 100, -10);
|
||||
@@ -93,11 +98,13 @@ public class MusicGame : SceneSingleton<MusicGame>
|
||||
// ActivateTick(musicData.musicTicks[tickId]);
|
||||
else
|
||||
{
|
||||
UIManager.instance.HidePanel<MusicGamePanel>();
|
||||
gameObject.GetComponent<AudioSource>().Stop();
|
||||
isPlaying = false;
|
||||
tickId = 0;
|
||||
noteId = 0;
|
||||
mainCamera.GetComponent<CinemachineBrain>().enabled = true;
|
||||
Debug.Log("完成所有tick");
|
||||
Debug.Log($"完成所有tick,分数{Sroce}");
|
||||
GameFlowMgr.instance.completeLevel(0);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user