Ejemplo n.º 1
0
    public void DisengageDuel(AllyDuel allyToDuel)
    {
        bool has = listOfAllyToDuel.Any(tempAlly => tempAlly == allyToDuel);

        if (has == false)
        {
            return;
        }

        listOfAllyToDuel.Remove(allyToDuel);
    }
Ejemplo n.º 2
0
    void GetCurrentTarget()
    {
        List <AllyDuel> listOfTargets = listOfAllyToDuel.Where(tempAlly => tempAlly.duelData.canAttack == true).ToList();

        if (listOfTargets.Count == 0)
        {
            currentTarget = null;
            return;
        }
        currentTarget = listOfTargets[0];
    }
Ejemplo n.º 3
0
    public void ArrangeDuel(AllyDuel allyToDuel)
    {
        bool has = listOfAllyToDuel.Any(tempAlly => tempAlly == allyToDuel);

        if (has)
        {
            return;
        }

        listOfAllyToDuel.Add(allyToDuel);
    }
Ejemplo n.º 4
0
    void Start()
    {
        heroToSpawn = Main.instance.score.playerData.currentHero;
        var heroList = FindObjectOfType <HeroList>().heroList;

        foreach (GameObject tempGO in heroList)
        {
            Hero.HeroID tempId = tempGO.GetComponent <Hero>().heroID;
            if (tempId == heroToSpawn)
            {
                AllyDuel allyScript = Instantiate <GameObject>(tempGO).GetComponent <AllyDuel>();
                allyScript.transform.position = transform.position;
                allyScript.SetAsReinforcementWarrior(transform.position);
                return;
            }
        }
    }
Ejemplo n.º 5
0
    public bool IsOnDuelWithOtherThanMe(AllyDuel allyDuelToCheck)
    {
        bool has = listOfAllyToDuel.Any(tempAlly => tempAlly != allyDuelToCheck);

        return(has);
    }