Ejemplo n.º 1
0
 private void Update()
 {
     if (!targetDistributor.TargetsExist)
     {
         movement.StopMovement();
     }
 }
Ejemplo n.º 2
0
    // Responce for AttackEvent
    public void ReadyForAttack()
    {
        cartMovement.StopMovement();

        foreach (GameObject guard in guards)
        {
            MovementBehaviour guardMovement = guard.GetComponent <MovementBehaviour>();

            guardMovement.StopMovement();
        }
    }
Ejemplo n.º 3
0
    private void CheckTarget()
    {
        if (_encounteredTarget)
        {
            return;
        }
        if (!currentTarget)
        {
            return;
        }

        if (TargetIsInRange())
        {
            _encounteredTarget = true;
            _movement.StopMovement();

            targetDamagable = currentTarget.GetComponent <HealthBehaviour>();
            InCombat        = true;

            MakeAttack();
        }
    }