示例#1
0
    void GetStarReward(GameObject healthParent)
    {
        //if we've destroyed an attacker, we want some stars
        if (healthParent.GetComponent <Attacker> ())
        {
            starDisplay.AddStars(20);
        }
        //if we're on easy difficulty, we want more stars when a defender is destroyed too
        int difficulty = Mathf.RoundToInt(PlayerPrefsManager.GetDifficulty());

        if (difficulty == 1 && healthParent.GetComponent <Defender> ())
        {
            starDisplay.AddStars(50);
        }
    }
示例#2
0
 public void AddStars(int amount)
 {
     if (starDisplay)
     {
         starDisplay.AddStars(amount);
     }
 }
 private void TrySpawnDefender(Vector2 gridPos)
 {
     if (starDisplay.HaveEnoughStars(defender.GetStarCost()))
     {
         SpawnDefender(gridPos);
         starDisplay.AddStars(-defender.GetStarCost());
     }
 }
示例#4
0
    private void UpdateCurrency()
    {
        var attacker = GetComponent <Attacker>();

        if (attacker)
        {
            _starDisplay.AddStars(attacker.StarReward);
        }
    }
示例#5
0
    private IEnumerator AddStars()
    {
        do
        {
            yield return(new WaitForSeconds(Random.Range(mintime, maxtime)));

            starDisplay.AddStars(stars);
            PlayVFX();
        }while (looping);
    }
示例#6
0
    public void AddStars(int amountToAdd)
    {
        StarDisplay temp = FindObjectOfType <StarDisplay>();

        if (temp != null)
        {
            Debug.Log("Adding Stars");
            temp.AddStars(amountToAdd);
        }
    }
示例#7
0
 public void AddStars(int amount)
 {
     display.AddStars(amount);
 }
示例#8
0
 void addSomeStars(int stars)
 {
     starDisplay.AddStars(stars);
 }
示例#9
0
 public void AddStars(int amount)
 {
     _starDisplay.AddStars(amount);
 }
示例#10
0
 public void AddStar()
 {
     _starDisplay.AddStars(baseStarsToAdd - PlayerPrefsController.GetDifficulty());
 }
示例#11
0
 public void AddStars(int amount)
 {
     print(amount);
     StarDisplay.AddStars(amount);
 }
 public void AddStars()
 {
     starDisplay.AddStars(starAmount);
     Instantiate(starPrefab, starSpawnPoint);
 }
示例#13
0
 public void AddStars()
 {
     starDisplay.AddStars();
 }
示例#14
0
 //This method is tied to the animation of the star creation and passes in the int 10 for value of a star
 public void AddStars(int amount)
 {
     //This calls the starDisplay script method and passes the 10 int from animation variable
     starDisplay.AddStars(amount);
 }
 void AddStars(int amount)
 {
     //Debug.Log (amount + "stars added");
     starDisplay.AddStars(amount);
 }
示例#16
0
 public void AddStars(int amount)
 {
     starDisplay.AddStars(10);
 }
示例#17
0
 void AddStars(int starsCount)
 {
     starDisplay.AddStars(starsCount);
 }
示例#18
0
    public void AddStars(int amount)
    {
        StarDisplay starDisplay = FindObjectOfType <StarDisplay>();

        starDisplay.AddStars(amount);
    }
示例#19
0
 public void AddStars(int stars)
 {
     starDisplay.AddStars(stars);
     //Debug.Log(stars);
 }
示例#20
0
 public void AddStars(int numStars)
 {
     starDisplay.AddStars(numStars);
 }
示例#21
0
 public void MakeStars(int stars)
 {
     starDisplay.AddStars(stars);
 }
示例#22
0
 public void AddStars(int amount)
 {
     starDisp.AddStars(amount);
 }
示例#23
0
 public void AddStars(int number)
 {
     starDisplay.AddStars(number);
 }
示例#24
0
 void OnMouseDown()
 {
     starDisplay.AddStars(value);
     animator.SetTrigger("Picked");
 }
示例#25
0
 void AddStars(int amount)
 {
     starDisplay.AddStars(amount);
 }
示例#26
0
 //Just a tag
 public void AddStarts(int amount)
 {
     Debug.Log("Opa, add estrelas!");
     starDisplay.AddStars(amount);
 }
 private void AddStars(int amount)
 {
     _starDisplay.AddStars(amount);
 }
示例#28
0
 //this method called from the animation
 public void AddStars(int amount)
 {  //then pass the value to text diaplay thru StarDisplay.cs AddStars method
     starDisplay.AddStars(amount);
 }
示例#29
0
 public void AddStars(int amount)
 {
     //Star Amount in the Star Fire Animation Currently Set to 10
     starDisplay.AddStars(amount);
 }
示例#30
0
 public void AddStars(int amount)
 {
     starDisplay.AddStars(amount);
     //print (amount + " stars added");
 }