53 lines
1.3 KiB
C#
53 lines
1.3 KiB
C#
using System.Collections.Generic;
|
|
using BlueWaterProject;
|
|
using Sirenix.OdinInspector;
|
|
using UnityEngine;
|
|
|
|
// ReSharper disable once CheckNamespace
|
|
namespace BlueWaterProject
|
|
{
|
|
[DefaultExecutionOrder(-1)]
|
|
public class GameManager : Singleton<GameManager>
|
|
{
|
|
[Title("Controller")]
|
|
public CameraController CameraController { get; private set; }
|
|
public Player player;
|
|
public List<Boat> boats = new List<Boat>(10);
|
|
|
|
[Range(0f, 1f)]
|
|
[SerializeField] private float slowSpeed = 0.1f;
|
|
|
|
private void Init()
|
|
{
|
|
CameraController = FindAnyObjectByType<CameraController>();
|
|
player = FindAnyObjectByType<Player>();
|
|
}
|
|
protected override void OnAwake()
|
|
{
|
|
Init();
|
|
}
|
|
|
|
private void Start()
|
|
{
|
|
Cursor.lockState = CursorLockMode.Confined;
|
|
}
|
|
|
|
public void testPrint()
|
|
{
|
|
print("Boat가 목표에 도착해서 이 함수를 호출합니다");
|
|
}
|
|
|
|
public void SlowSpeedMode()
|
|
{
|
|
Time.timeScale = slowSpeed;
|
|
Time.fixedDeltaTime = 0.02f * Time.timeScale;
|
|
}
|
|
|
|
public void DefaultSpeedMode()
|
|
{
|
|
Time.timeScale = 1f;
|
|
Time.fixedDeltaTime = 0.02f;
|
|
}
|
|
}
|
|
}
|