Esempio n. 1
0
    private void RunHitRun(Collider other)
    {
        if (other.transform.GetComponent <Biology>().BiologyMovement.CurrentMoveType != BiologyMovement.MoveType.Run)
        {
            return;
        }
        if (BiologyMovement.CurrentMoveType != BiologyMovement.MoveType.Run)
        {
            return;
        }
        BiologyMovement otherMovement = other.transform.GetComponent <Biology>().BiologyMovement;

        if (BiologyMovement.GetSteeringTargetDist() <= otherMovement.GetSteeringTargetDist())
        {
            BiologyMovement.SetAvoidancePriority(BiologyMovement.NavMeshAgent.avoidancePriority - 1);
        }
    }
Esempio n. 2
0
    private void BackHitBack(Collider other)
    {
        if (other.transform.GetComponent <Biology>().BiologyMovement.CurrentMoveType != BiologyMovement.MoveType.Back)
        {
            return;
        }
        if (BiologyMovement.CurrentMoveType != BiologyMovement.MoveType.Back)
        {
            return;
        }
        BiologyMovement otherMovement = other.transform.GetComponent <Biology>().BiologyMovement;

        if (BiologyMovement.GetSteeringTargetDist() <= otherMovement.GetSteeringTargetDist())
        {
            BiologyMovement.Stop();
        }
    }