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

public class GameController : UnitySingleton<GameController>
{   
    
    public struct Death{
        public enum DeadReason { Camera , UpDown }
        public DeadReason deadReason;
    }

    private Horse horse;
    private CameraManager cameraManager;

    void Start()
    {
        FindSth();
    }

    void FindSth()
    {
        horse = FindObjectOfType<Horse>();
        cameraManager = FindObjectOfType<CameraManager>();
    }

    public void GameOver(Death deathInfo)
    {
        //触发马的死亡功能
        horse.Death(deathInfo);
        //告诉相机马死了
        cameraManager.Death(deathInfo);
    }
   
}
