void Awake() { //scenes = Scenes.transform.GetComponentsInChildren<PseudoScene>(true); canvasScenes = CanvasScenes.transform.GetComponentsInChildren <PseudoScene>(true); //activeSceneObject = scenes[0]; activeSceneCanvasObject = canvasScenes[0]; if (SetPartyMode) { GameManager.Instance.ActiveGameMode = GameMode.Party; } }
public void ChangeSceneWithoutAnimation(string to) { PseudoScene canvasObj = null; foreach (var canvasScene in canvasScenes) { if (canvasScene.gameObject.name == to) { canvasObj = canvasScene; } } if (canvasObj) { activeSceneCanvasObject.Depart(false); canvasObj.Arrive(false); activeSceneCanvasObject = canvasObj; } else { Debug.LogWarning("Couldn't find scene with name: " + to + " , is it typed correctly?"); } }
public void RpcSetMoveControls(string sceneName) { PseudoScene newScene = GameObject.Find("Scenes").GetComponent(sceneName) as PseudoScene; CurrentMoveController = newScene.MoveController; }