Пример #1
0
    // Use this for initialization
    void Start()
    {
        //platformWidth = thePlatform.GetComponent<BoxCollider2D>().size.x; // gets us length of platform

        platformWidths = new float[theObjectPools.Length];
        for (int i = 0; i < theObjectPools.Length; i++)
        {
            //platformWidths[i] = theObjectPools[i].GetComponent<BoxCollider2D>().size.x;
            platformWidths[i] = theObjectPools[i].pooledObject.GetComponent <BoxCollider2D>().size.x;
        }

        thePizzaGenerator = FindObjectOfType <PizzaGenerator>();
    }
Пример #2
0
 // Use this for initialization
 void Start()
 {
     platformWidth     = thePlatform.GetComponent <BoxCollider2D>().size.x;
     thePizzaGenerator = FindObjectOfType <PizzaGenerator> ();
     theCatGenerator   = FindObjectOfType <CatGenerator>();
 }