void Start() { thescoremanager = FindObjectOfType <Score_manager>(); theplatformgen = FindObjectOfType <Platform_gen>(); thegamemanager = FindObjectOfType <Game_manager>(); values = FindObjectOfType <Option_values>(); }
void Awake() { if (v_instance == null) { // v_instance = new GameObject("Option_values").AddComponent<Option_values>(); v_instance = this; } else if (v_instance != this) { Destroy(gameObject); } DontDestroyOnLoad(gameObject); }
void Start() { platformstartpoint = platgen.position; platformstartpoint = theplayer.transform.position; thescoremanager = FindObjectOfType <Score_manager>(); sound = FindObjectOfType <Audio_manager>(); scroll = FindObjectOfType <Scrolling_Background>(); values = FindObjectOfType <Option_values>(); platformgen = FindObjectOfType <Platform_gen>(); }
void Start() { cameraTransform = Camera.main.transform; lastCameraX = cameraTransform.position.x; layers = new Transform[transform.childCount]; for (int i = 0; i < transform.childCount; i++) { layers[i] = transform.GetChild(i); } leftindex = 0; rightindex = layers.Length - 1; values = FindObjectOfType <Option_values>(); parallax = values.parallax; }
void Start() { values = FindObjectOfType <Option_values>(); randomcointhreshold = values.cointhreshold; randomspikethreshold = values.spikethreshold; powerupthreshold = values.powerupthreshold; enemythreshold = values.enemythreshold; check = values.check; coinslider.value = randomcointhreshold; spikeslider.value = randomspikethreshold; powerupslider.value = powerupthreshold; enemyslider.value = enemythreshold; audioslider.value = AudioListener.volume; parallax.isOn = values.parallax; sound.MenuMusic(); }
void Start() { thecoingen = FindObjectOfType <Coin_gen>(); values = FindObjectOfType <Option_values>(); cointhreshold = values.cointhreshold; spikethreshold = values.spikethreshold; powerupthreshold = values.powerupthreshold; enemythreshold = values.enemythreshold; platwidths = new float[platformObjecPools.Length]; for (int i = 0; i < platformObjecPools.Length; i++) { platwidths[i] = platformObjecPools[i].pooledobject.GetComponent <BoxCollider2D>().size.x; } minheight = minheightpoint.position.y; maxheight = maxheightpoint.position.y; }
void Start() { thecoingen = FindObjectOfType <Coin_gen>(); values = FindObjectOfType <Option_values>(); cointhreshold = values.cointhreshold; spikethreshold = values.spikethreshold; powerupthreshold = values.powerupthreshold; enemythreshold = values.enemythreshold; // platwidth = platform.GetComponent<BoxCollider2D>().size.x; platwidths = new float[platformObjecPools.Length]; for (int i = 0; i < platformObjecPools.Length; i++) //végig járjuk az objectpool listát { platwidths[i] = platformObjecPools[i].pooledobject.GetComponent <BoxCollider2D>().size.x; //értéket adunk a platform szélesség lista elemeinek a hozzá tartozó platform alapján } minheight = minheightpoint.position.y; //transform.position.y;// -1.5f; maxheight = maxheightpoint.position.y; }