2020-11-01 12:26:09 +00:00
|
|
|
|
using QSB.Events;
|
|
|
|
|
using QSB.Instruments.QSBCamera;
|
2020-10-27 22:59:19 +00:00
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
|
|
namespace QSB.Instruments
|
|
|
|
|
{
|
|
|
|
|
public class InstrumentsManager : MonoBehaviour
|
|
|
|
|
{
|
|
|
|
|
public static InstrumentsManager Instance;
|
|
|
|
|
|
|
|
|
|
private void Awake()
|
|
|
|
|
{
|
|
|
|
|
Instance = this;
|
|
|
|
|
gameObject.AddComponent<CameraManager>();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void Update()
|
|
|
|
|
{
|
|
|
|
|
if (Input.GetKeyDown(KeyCode.Keypad9))
|
|
|
|
|
{
|
2020-11-01 12:26:09 +00:00
|
|
|
|
if (!PlayerRegistry.LocalPlayer.PlayingInstrument)
|
|
|
|
|
{
|
|
|
|
|
CameraManager.Instance.SwitchTo3rdPerson();
|
|
|
|
|
GlobalMessenger<InstrumentType, bool>.FireEvent(EventNames.QSBPlayInstrument, InstrumentType.REIBECK, true);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
CameraManager.Instance.SwitchTo1stPerson();
|
|
|
|
|
GlobalMessenger<InstrumentType, bool>.FireEvent(EventNames.QSBPlayInstrument, InstrumentType.REIBECK, false);
|
|
|
|
|
}
|
2020-10-27 22:59:19 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|