Example #1
0
    /// <summary>
    /// Pesquisa e retorna o jogador do time e marcação pesqiusado. Tenha em mente
    /// que esta pesquisa pode retornar nula se o time adversário não tiver nenhum jogador nesta marcação
    /// </summary>
    /// <param name="campteam"></param>
    /// <param name="marcation"></param>
    /// <returns>Jogador na mesma marcação e ou nullo se não houver jogador do time nesta marcação</returns>
    public PlayerController GetPlayerInMarcation(CampTeam campteam, CampPlaceMarcation marcation)
    {
        CampTeam         otherCampTeam = campteam == CampTeam.Team_A ? CampTeam.Team_B : CampTeam.Team_A;
        TeamManager      team          = GetTeamManager(otherCampTeam);
        PlayerController enemy         = team.GetPlayerInMarcation(marcation);

        return(enemy);
    }
Example #2
0
    public CampPosition GetPosition(CampPlaceSide side, CampPlaceMarcation cpos, CampPlaceType ctype)
    {
        CampPosition pos = null;
        string       key = CampPosition.GetKey(side, cpos, ctype);

        positions.TryGetValue(key, out pos);

        return(pos);
    }
Example #3
0
    public Transform GetMarcationPosition(PlayerController player, CampPlaceType placeType)
    {
        CampTeam           campTeam     = player.GetCampTeam();
        CampPlaceSide      side         = GetTeamPlaceSide(campTeam);
        CampPlaceMarcation marcation    = player.GetPlaceMarcation();
        CampPosition       campPosition = placesManager.GetPosition(side, marcation, placeType);

        return(campPosition.transform);
    }
Example #4
0
        public PlayerController GetPlayerInMarcation(CampPlaceMarcation marcation)
        {
            PlayerController result = null;

            if (players.Count > 0)
            {
                result = players.Find(r => r.GetPlaceMarcation() == marcation);
            }
            return(result);
        }
Example #5
0
 public static string GetKey(CampPlaceSide side, CampPlaceMarcation cpos, CampPlaceType ctype)
 {
     return(side.ToString() + cpos.ToString() + ctype.ToString());
 }