private void InitializeRefrences() { playerObjectInScene = GameObject.FindGameObjectWithTag("Player"); playerTransform = playerObjectInScene.GetComponent <Transform> (); myPlayerPrefsInteractor = GetComponent <PlayerPrefsInteractions> (); checkpointToLoadInto = myPlayerPrefsInteractor.GetCheckpointCounter(); }
// Use this for initialization void Start() { myPlayerPrefsInteractor = GameObject.FindGameObjectWithTag("PlayerPrefsInteractor"); if (myPlayerPrefsInteractor != null) { myPlayerPrefsScript = myPlayerPrefsInteractor.GetComponent <PlayerPrefsInteractions> (); } }
// Use this for initialization void Start() { myCollectedAbilities = GetComponent <CollectedAbilities> (); myEnabledAbilities = GetComponent <EnabledAbilities> (); myPlayerPrefsInteractor = GameObject.FindGameObjectWithTag("PlayerPrefsInteractor"); if (myPlayerPrefsInteractor != null) { myPlayerPrefsScript = myPlayerPrefsInteractor.GetComponent <PlayerPrefsInteractions> (); } }