Exemplo n.º 1
0
 void Start()
 {
     growthScript = GetComponent <VineGrowth>();
     firstAnchor  = transform.GetChild(1).GetComponent <AnchorHitDetection>();
     lastAnchor   = transform.GetChild(2).GetComponent <AnchorHitDetection>();
     firstAnchor.gameObject.SetActive(false);
     lastAnchor.gameObject.SetActive(false);
 }
Exemplo n.º 2
0
 void GrowVine()
 {
     if (CurrentVines != null)
     {
         if (CurrentVines.Count > vineMax)
         {
             CurrentVines[0].GetComponent <VineGrowth>().DestroyVine();
         }
     }
     currentVine           = (Transform)Instantiate(vineBase, new Vector3(transform.position.x, transform.position.y - vineBaseOffset, transform.position.z), Quaternion.identity);
     currentVine.parent    = vineParent;
     vineScript            = currentVine.GetComponent <VineGrowth>();
     vineScript.playerVine = this;
     vineScript.Player     = transform;
     growingVine           = true;
 }
Exemplo n.º 3
0
 private void Awake()
 {
     _vine = GetComponent <VineGrowth>();
 }