Ejemplo n.º 1
0
    // Update is called once per frame
    void Update()
    {
        FlowerController fc = flowerBox.GetComponent <FlowerController>();

        if (fc.IsGrowAnimationDone)
        {
            // make flower target if grow animation is done
            TargetManager.Instance.Target = flowerBox;

            // show edit canvas
            if (!editCanvas.activeSelf)
            {
                editCanvas.SetActive(true);
                Helper.TreeEnableRenderer(editCanvas);
            }

            // show color canvas
            if (!colorCanvas.activeSelf)
            {
                colorCanvas.SetActive(true);
                Helper.TreeEnableRenderer(colorCanvas);
            }
        }
    }
Ejemplo n.º 2
0
 /// <summary>
 /// The continuous response of the flower once it has been tended to
 /// </summary>
 /// <param name="controller"></param>
 public abstract void UpdateFlower(FlowerController controller);
Ejemplo n.º 3
0
 /// <summary>
 /// Initialisation for when the gardener tends to the flower
 /// Only exists to be inherited, thus the function is abstract
 /// </summary>
 /// <param name="controller"></param>
 public abstract void GardenerTendTo(FlowerController controller);
Ejemplo n.º 4
0
 /// <summary>
 /// Initialisation for when the gardener tends to the flower
 /// Only exists to be inherited, thus the function is abstract
 /// FOR BAMBOO!
 /// all we is update the size level of the object in the game
 /// </summary>
 /// <param name="controller"></param>
 public override void GardenerTendTo(FlowerController controller)
 {
     controller.NextGoalSize += incrementPercentage;
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Initialisation code called from the FlowerController (the Monobehaviour referenced by this SciptableObject)
 /// to set up any necessary data
 /// OVERRIDEN FROM BASE CLASS "FlowerTemplate"
 /// </summary>
 /// <param name="controller"></param>
 public override void Init(FlowerController controller)
 {
     base.Init(controller);
     controller.NextGoalSize = nextGoalSize;
 }
Ejemplo n.º 6
0
 //code for dealing with a flower
 public abstract void TendFlower(GardenerController gardener, FlowerController flower);
Ejemplo n.º 7
0
 // Use this for initialization
 void Start()
 {
     flowerController = GetComponent <FlowerController>();
     gameOfLife       = GetComponent <GameOfLife>();
     audioSource      = GetComponent <AudioSource>();
 }