Пример #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);
 }
Пример #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;
 }
Пример #3
0
 private void Awake()
 {
     _vine = GetComponent <VineGrowth>();
 }