using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Game : MonoBehaviourSingleton<Game>
{
    public void OnInit()
    {
        // GameAnalytics.instance.OnInit();

        MemoryBook.instance.OnInit();
        Player.instance.OnInit();

        Fade.instance.SetFade(1.0f);
    }

    public void OnLateInit()
    {
        Weather.instance.OnInit();

        Road.instance.Create();

        Player.instance.Teleport(Vector3.forward * Road.instance.m_playerStart);

        // @A tmp
        //AudioManager.instance.PlayMusic("default", true);

        Fade.instance.FadeIn(5.0f);
    }

    public void OnDone()
    {
        // GameAnalytics.instance.OnDone();
    }

    public void OnUpdate()
    {
        Road.instance.OnUpdate();
        Player.instance.OnUpdate();
        MemoryBook.instance.OnUpdate();
        Weather.instance.OnUpdate();
    }
}
