예제 #1
0
 private bool isInSelectedList(mainCharacter3 currentHero)
 {
     bool isSelected = false;
     foreach (mainCharacter3 hero in selected)
     {
         if (hero == currentHero)
             isSelected = true;
     }
     return isSelected;
 }
예제 #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);
     }
 }
예제 #3
0
    private bool isInSelectedList(mainCharacter3 currentHero)
    {
        bool isSelected = false;

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