void Awake() { _playerStats = GameObject.FindGameObjectWithTag(Tags.Player).GetComponent <PlayerStats>(); _loadingScreen = GameObject.FindGameObjectWithTag(Tags.GameController).GetComponent <LoadingScreen>(); _saveLoadData = GameObject.FindGameObjectWithTag(Tags.SaveLoadObject).GetComponent <SaveLoadDataSerialized>(); _wwwScreenShot = GameObject.FindGameObjectWithTag(Tags.GameController).GetComponent <WWWScreenshot>(); }
void Start() { GameObject saveData = GameObject.FindGameObjectWithTag(Tags.SAVE); _saveLoadData = saveData.GetComponent <SaveLoadDataSerialized> (); stats = GetComponent <UserStats> (); text.text = txt [0]; }
void Awake() { _saveLoadData = GameObject.FindGameObjectWithTag(Tags.SaveLoadObject).GetComponent <SaveLoadDataSerialized>(); _mainMenuPanel = GameObject.Find("MenuPanel"); _creditsPanel = GameObject.Find("CreditsPanel"); _optionsPanel = GameObject.Find("OptionsPanel"); _characterPanel = GameObject.Find("CharacterPanel"); _deletionPanel = GameObject.Find("DeletionPanel"); _usernamePanel = GameObject.Find("UsernamePanel"); _rankingCanvas = GameObject.Find("RankingCanvas"); }
void Awake() { if (Instance) { Destroy(this.gameObject); } else { DontDestroyOnLoad(gameObject); Instance = this; } }
void Awake() { if (spawned == false) { spawned = true; DontDestroyOnLoad(transform.gameObject); } else { DestroyImmediate(gameObject); //This deletes the new objects that might be created } _saveLoadData = GameObject.FindGameObjectWithTag(AllTagsConstants.saveLoadData).GetComponent <SaveLoadDataSerialized>(); }
void Start() { _autoType = gameObject.GetComponent <AutoType> (); _story = gameObject.GetComponent <Story> (); GameObject saveData = GameObject.FindGameObjectWithTag(Tags.SAVE); save = saveData.GetComponent <SaveLoadDataSerialized> (); GameObject uiContr = GameObject.FindGameObjectWithTag(Tags.UI_CONTROLLER); talk = uiContr.GetComponent <TalkScript> (); GameObject joystick = GameObject.FindGameObjectWithTag(Tags.JOYSTICK_CONTROLLER); this.joystick = joystick.GetComponent <Joystick> (); GameObject player = GameObject.FindGameObjectWithTag(Tags.PLAYER); _playerController = player.GetComponent <PlayerController>(); //QuestData.questDone = 1; }
void Awake() { if(Instance) { Destroy(this.gameObject); } else { DontDestroyOnLoad(gameObject); Instance = this; } }
void Awake() { _playBack = GameObject.FindGameObjectWithTag(Tags.GameController).GetComponent <PlayBack> (); _saveLoadData = GameObject.FindGameObjectWithTag(Tags.SaveLoadObject).GetComponent <SaveLoadDataSerialized>(); }
void Start() { GameObject saveData = GameObject.FindGameObjectWithTag(Tags.SAVE); _save = saveData.GetComponent <SaveLoadDataSerialized> (); }
void Start() { loadData = gameObject.GetComponent <SaveLoadDataSerialized> (); loadData.Load(); //loadData.LoadChoosenCharacter (); }