Example #1
0
    public troop AddChar()
    {
        troop newTroop = new troop();

        character.Add(newTroop);
        return(newTroop);
    }
Example #2
0
 public void Entangle(troop curTroop, team curTeam)
 {
     teamLogic         = curTeam;
     troopLogic        = curTroop;
     hp                = troopLogic.hp;
     hpIndicator.text  = hp.ToString();
     hpIndicator.color = curTeam.colors;
     nametag.color     = curTeam.colors;
 }
Example #3
0
    public void startTurn()
    {
        team  curTeam      = teams[teamnum];
        troop curCharacter = curTeam.character[curTeam.charnum];

        if (curCharacter.model == null)
        {
            curCharacter.model = GameObject.Instantiate(charPrefabs[curCharacter.prefab], new Vector3(15, 50, 0), Quaternion.identity);
            curCharacter.model.GetComponent <agentController>().Entangle(curCharacter, curTeam);
        }
        curCharacter.model.GetComponent <agentController>().SetActive();

        teamnum++;
        if (teamnum == teams.Count)
        {
            teamnum = 0;
        }
        curTeam.charnum++;
        if (curTeam.charnum == curTeam.character.Count)
        {
            curTeam.charnum = 0;
        }
    }
Example #4
0
 public void RemoveChar(troop removed)
 {
     character.Remove(removed);
 }