Example #1
0
    public void SpawnFinalFlower()
    {
        GameObject flower = Instantiate(flowerPrefab, transform);

        flower.transform.localPosition = Vector3.down * 2;
        fb = flower.GetComponent <FlowerBehaviour>();
        //flower.GetComponent<FlowerBehaviour>().colorTraits = color;
        fb.stemTraits   = finalStem;
        fb.thornsTraits = finalThorns;
        fb.petalTraits  = finalPetal;
        fb.SpawnedInPot();
    }
 protected override void BuildBehaviours()
 {
     behaviour = new FlowerBehaviour[] {
         new FlowerIdleBehaviour(this),
         new FlowerOpenningEarlyBehaviour(this),
         new FlowerOpenningLateBehaviour(this),
         new FlowerSpringUpBehaviour(this),
         new FlowerScanningBehaviour(this),
         new FlowerShootingBehaviour(this),
         new FlowerDropDownBehaviour(this),
         new FlowerCloseUpBehaviour(this),
     };
 }