private void OnTriggerEnter2D(Collider2D collision) { if (collision.tag == "Player") { ScreenAspectRadio screenAspectRadio = Instantiate(transition).GetComponent <ScreenAspectRadio>(); screenAspectRadio.Init(sceneName); SetTransitionPointObject(); } }
private void Awake() { if (Instance != null) { Destroy(gameObject); } else { Instance = this; } }
public void LoadGame() { if (PlayerManager.Instance == null) { Instantiate(playerPrefab); } if (MenuManagerInGame.Instance != null && MenuManagerInGame.Instance.menu.activeSelf) { MenuManagerInGame.Instance.ClosePauseMenuButton(); } ScreenAspectRadio screenAspectRadio = Instantiate(transition).GetComponent <ScreenAspectRadio>(); screenAspectRadio.Init("", true); }
private void InitTransition(string sceneName = "", bool isLoaded = false) { screenAspectRadio = Instantiate(transition).GetComponent <ScreenAspectRadio>(); screenAspectRadio.Init(sceneName, isLoaded); }