예제 #1
0
    private void Awake()
    {
        _playerSpawn  = PlayerSpawn.Instance();
        _finish       = Finish.Instance();
        _camera       = Instantiate(_cameraGameObject, _finish.transform.position + CameraOffset, Quaternion.Euler(CameraRotation)).GetComponent <Camera>();
        _followPlayer = _camera.GetComponent <FollowPlayer>();
        KillZone.Instance().BindOnDieEvent(ShowRespawn);


        SpawnPlayer();

        _playerMovement = _playerPawn.GetComponent <PlayerMovement>();
        _respawnCamPos  = RespawnCameraLocation.Instance().transform.position;

        _camera.transform.DOMove(_playerSpawn.transform.position + CameraOffset, 4).SetDelay(2f).OnComplete(gameStart).Play();
    }
예제 #2
0
 // Start is called before the first frame update
 void Start()
 {
     Finish.Instance().BindOnFinishedEvent(() => { gameObject.SetActive(true); });
     gameObject.SetActive(false);
 }