void Start() { // Get the references to the required objects _gci = GetComponentInParent<GameControllerInput>(); _mcc = GetComponentInParent<MainCameraController>(); _cameraAnimator = GetComponent<Animator>(); // Stops the input _gci.ResumeInput(); }
/// <summary> /// Unity's method called when this entity is created, even if it is disabled. /// </summary> void Awake() { // Looks for the independent controller component _independentControl = FindObjectOfType<GameControllerIndependentControl>(); // Looks for the independent controller component _inputControl = FindObjectOfType<GameControllerInput>(); // Get component depth of field _dof = GetComponent<DepthOfField>(); // Sets the camera's target to the current character SetObjective(_independentControl.currentCharacter); }
public void Awake() { waitFrame = false; _menuPanel = new Stack<MenuInstance>(); //open a menu if indicated if (startWithMenu != Menu.NONE) { OpenMenu(startWithMenu); } DoConfirmQuitNo(); //get the fading _fading = GetComponent<SceneFadeInOut>(); //get input controller _gameControllerInput = GameObject.FindGameObjectWithTag(Tags.GameController).GetComponent<GameControllerInput>(); backgroundImageMainMenu = backgroundMainMenu.GetComponent<RawImage>(); //Get the scene GameControllerData data = GameObject.FindGameObjectWithTag(Tags.GameData).GetComponent<GameControllerData>(); newContinueGame = data.GetLastUnlockedScene(); }
void Start() { // Get reference to input controller _gci = GameObject.FindGameObjectWithTag(Tags.GameController).GetComponent<GameControllerInput>(); // Get reference to independent control _gcic = GameObject.FindGameObjectWithTag(Tags.GameController).GetComponent<GameControllerIndependentControl>(); // Get reference to level transition controller _levelTransitionController = GetComponent<LevelTransitionController>(); if (_data == null) { _nextScene = new Scene(); Debug.LogWarning("Next Scene not setted, using Menu by default, please, assign an scene"); _nextScene.name = "Menu"; } else { string nameScene = SceneManager.GetActiveScene().name; _nextScene = _data.GetNextScene(nameScene, out _nextLevel); _actualLevel = _data.GetInfoScene(nameScene); if (_nextScene==null) { _nextScene = _data.GetDefaultScene(); _nextScene.name = "Thanks"; } } }