Inheritance: MonoBehaviour
Exemple #1
0
    //do very little in Awake(). It should all be done in Init()
    void Awake()
    {
        readyToBranch = false;
        //resetting since children will start as true because parent is instantiated
        treePiece = GetComponent <TreePieceMeshMaker> ();

        depthLevel = 0;
        //this must be overwritten in Init() for everyone but the root node
        setHasGrowthBehavior();

        if (!hasGrowthBehavior)
        {
            readyToBranch = true;
        }
    }
    //do very little in Awake(). It should all be done in Init()
    void Awake()
    {
        readyToBranch = false;
        //resetting since children will start as true because parent is instantiated
        treePiece = GetComponent<TreePieceMeshMaker> ();

        depthLevel = 0;
        //this must be overwritten in Init() for everyone but the root node
        setHasGrowthBehavior ();

        if (!hasGrowthBehavior) {
            readyToBranch = true;
        }
    }