Spaceball camera and more entity parameters. (ugly UI)

This commit is contained in:
Braedon
2022-02-03 22:25:18 -05:00
parent e0db2a446e
commit 9722ce7122
9 changed files with 97 additions and 46 deletions

View File

@ -51,13 +51,14 @@ namespace RhythmHeavenMania.Games.Spaceball
private void Start()
{
allCameraEvents = EventCaller.GetAllInGameManagerList("spaceball", new string[] { "cameraZoom" });
GameCamera.instance.camera.transform.localPosition = new Vector3(0, 0, -10);
allCameraEvents = EventCaller.GetAllInGameManagerList("spaceball", new string[] { "camera" });
UpdateCameraZoom(); // can't believe this shit actually works
}
private void Update()
{
/*try
if (allCameraEvents.Count > 0)
{
if (currentZoomIndex < allCameraEvents.Count && currentZoomIndex >= 0)
{
@ -72,11 +73,11 @@ namespace RhythmHeavenMania.Games.Spaceball
if (normalizedBeat > Minigame.EndTime())
{
lastCamDistance = GameCamera.instance.camera.transform.localPosition.z;
// lastCamDistance = GameCamera.instance.camera.transform.localPosition.z;
}
else
{
if (currentZoomCamLength <= 0)
if (currentZoomCamLength < 0)
{
GameCamera.instance.camera.transform.localPosition = new Vector3(0, 0, currentZoomCamDistance);
}
@ -87,10 +88,6 @@ namespace RhythmHeavenMania.Games.Spaceball
}
}
}
catch (System.Exception ex)
{
// this technically isn't game breaking so oh well
}*/
}
private void UpdateCameraZoom()
@ -122,6 +119,11 @@ namespace RhythmHeavenMania.Games.Spaceball
}
}
public void OverrideCurrentZoom()
{
// lastCamDistance = GameCamera.instance.camera.transform.localPosition.z;
}
public void Shoot(float beat, bool high, int type)
{
GameObject ball = Instantiate(Ball);