Exemple #1
0
 public void Select(EntityModelSelectType type)
 {
     if (isSelectable)
     {
         entity.OnSelect(type);
         onSelect.Invoke();
         model.SetHighlight(CTeamComponent.GetRelation(TeamId.Team_0, m_TeamComponent.teamId));
     }
 }
    public void SetController(CControllerComponent t)
    {
        m_Text.text = t.entity.keyName;
        Relation relation = CTeamComponent.GetRelation(TeamId.Team_0, t.teamId);

        switch (relation)
        {
        case Relation.Enemy:
            m_Image.color = Color.red;
            break;

        case Relation.Teammate:
            m_Image.color = Color.green;
            break;
        }
        gameObject.SetActive(true);
    }
 bool CheckRelation(CTakeDamageComponent target)
 {
     return(CTeamComponent.GetRelation(teamComponent, target.relationComponent) == Relation.Enemy);
 }