// Use this for initialization void Start() { // pWidth = platform.GetComponent<BoxCollider2D> ().size.x; pWidth = new float[theObjectPool.Length]; for (int i = 0; i < theObjectPool.Length; i++) { pWidth [i] = theObjectPool[i].pObject.GetComponent <BoxCollider2D> ().size.x; } minH = transform.position.y; maxH = maxHP.transform.position.y; theCoinGenerator = FindObjectOfType <CoinGenarator> (); numberOfBlocks = 1; pastNumber = -1; }
// Use this for initialization void Start() { theCoinGenerator = FindObjectOfType <CoinGenarator> (); Spawn(); }