private bool isInSelectedList(mainCharacter3 currentHero)
 {
     bool isSelected = false;
     foreach (mainCharacter3 hero in selected)
     {
         if (hero == currentHero)
             isSelected = true;
     }
     return isSelected;
 }
Example #2
0
 // Update is called once per frame
 void Update()
 {
     spawningTimer += Time.deltaTime;
     if (spawningTimer >= spawnMax)
     {
         Debug.Log("New Human unit is ready !");
         spawningTimer = 0.0f;
         mainCharacter3 newOne = Instantiate(human);
         newOne.transform.position = new Vector2(6.7f, -1.5f);
         omanage.heroes.Add(newOne);
     }
 }
Example #3
0
    private bool isInSelectedList(mainCharacter3 currentHero)
    {
        bool isSelected = false;

        foreach (mainCharacter3 hero in selected)
        {
            if (hero == currentHero)
            {
                isSelected = true;
            }
        }
        return(isSelected);
    }