示例#1
0
    // Start is called before the first frame update
    private void Awake()
    {
        UIManager.Instance.SwitchToMenuByIndex(0);
        CanvasGroup canvasGroup = UIManager.Instance.GetActiveMenu();

        StartCoroutine(FadeOutMenu(canvasGroup.transform.GetChild(1).GetComponent <CanvasGroup>()));

        DrunkPlayer player = PlayerManager.Instance.CreatePlayerForLevel(0, transform.position, transform.rotation) as DrunkPlayer;

        player.SetTarget(target);
    }
 private void Start()
 {
     _player = GetComponentInParent <DrunkPlayer>();
 }