Exemplo n.º 1
0
    void OnTriggerExit(Collider other)
    {
        CharacterStatsPlayer stats = other.GetComponentInChildren <CharacterStatsPlayer>();

        if (!stats)
        {
            return;
        }

        if (targets.Contains(stats))
        {
            targets.Remove(stats);
        }
    }
Exemplo n.º 2
0
    void OnTriggerEnter(Collider other)
    {
        CharacterStatsPlayer stats = other.GetComponentInChildren <CharacterStatsPlayer>();

        if (!stats)
        {
            return;
        }

        bool relationOk = damageEnemy && other.GetComponent <EnemyMili>();

        relationOk = relationOk || (damagePlayer && other.GetComponent <PlayerTrap>());

        if (relationOk)
        {
            if (!targets.Contains(stats))
            {
                targets.Add(stats);
            }
        }
    }
Exemplo n.º 3
0
 void Start()
 {
     anim  = GetComponentInChildren <Animator>();
     bio   = GetComponent <Biostim>();
     stats = GetComponentInChildren <CharacterStatsPlayer>();
 }