private void Start()
 {
     starsDisplay   = GameObject.FindObjectOfType <StarsDisplay>();
     defenderParent = GameObject.Find("Defenders");
     if (!defenderParent)
     {
         defenderParent = new GameObject("Defenders");
     }
 }
 // Use this for initialization
 void Start()
 {
     starsDisplay = GameObject.FindObjectOfType <StarsDisplay>();
     parent       = GameObject.Find(PARENT_NAME);
     if (parent == null)
     {
         parent = new GameObject(PARENT_NAME);
     }
 }
 // Use this for initialization
 void Start()
 {
     starsDislay = GameObject.FindObjectOfType <StarsDisplay> ();
     parent      = GameObject.Find("Defenders");
     if (!parent)
     {
         parent = new GameObject("Defenders");
     }
 }
    // Use this for initialization
    void Start()
    {
        DefenderParent = GameObject.Find("Defenders");
        StarBalance    = GameObject.FindObjectOfType <StarsDisplay> ();

        if (!DefenderParent)
        {
            DefenderParent = new GameObject("Defenders");
        }
    }
    // Use this for initialization
    void Start()
    {
        cam = Camera.main;
        DefenderHierarchy = GameObject.Find("Defenders");
        starDisplay = GameObject.FindObjectOfType<StarsDisplay>();

        if(!DefenderHierarchy) {
            DefenderHierarchy = new GameObject("Defenders");
        }
    }
Example #6
0
    private void attemptToPlaceDefenderAt(Vector2 gridPos)
    {
        StarsDisplay starDisplay  = FindObjectOfType <StarsDisplay>();
        int          defenderCost = diffender.cost;

        if (starDisplay.haveEnoughStars(defenderCost))
        {
            spawnDefender(gridPos);
            starDisplay.spendingStarts(defenderCost);
        }
    }
Example #7
0
 private void Start()
 {
     starsDisplay = FindObjectOfType <StarsDisplay>();
 }
Example #8
0
 void Start()
 {
     starsDisplay = GameObject.FindObjectOfType <StarsDisplay> ();
 }
 private void Start()
 {
     starsDisplay = FindObjectOfType <StarsDisplay>();
     mainCam      = Camera.main;
 }
    private void Start()
    {
        starsDisplay = FindObjectOfType <StarsDisplay>();

        CreateDefendersParent();
    }
Example #11
0
    public void AddStars(int amount)
    {
        StarsDisplay starsDisplay = FindObjectOfType <StarsDisplay>();

        starsDisplay.AddStars(amount);
    }