Esempio n. 1
0
    public override void OnInspectorGUI()
    {
        DrawDefaultInspector();

        FlowerGenerator myScript = (FlowerGenerator)target;

        if (GUILayout.Button("Generate Flower"))
        {
            myScript.Generate();
        }
    }
    // Use this for initialization
    void Start()
    {
        platformWidths = new float[theObjectPools.Length];

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

        minHeight = transform.position.y;
        maxHeight = maxHeightPoint.position.y;

        theFlowerGenerator = FindObjectOfType <FlowerGenerator> ();
        lastPlatformWolf   = false;
    }