Esempio n. 1
0
    private IEnumerator Parasitando()
    {
        yield return(new WaitForSeconds(0.2f));

        controlledTripulant.Parasitar();
        player.enabled = false;
        vujBody.SetActive(false);
        theCamera.target = controlledTripulant.GetComponent <Controller2D>();

        yield return(new WaitForSeconds(1.0f));

        playerState = VujStates.Controlling;
    }
 private void FixedUpdate()
 {
     if (!_npcMovement.IsMoving && _canBeChecked)
     {
         MyMovementType = MovementType.ControlledMove;
         _canBeChecked  = false;
     }
     if (MyMovementType == MovementType.AutoMove && _movementTypeChanged)
     {
         _complexMove.enabled = false;
         _npcMovement.enabled = true;
         _npcMovement.MoveNextPosition();
         _movementTypeChanged = false;
     }
     if (MyMovementType == MovementType.ControlledMove && _movementTypeChanged)
     {
         _npcMovement.GetComponent <NavMeshAgent>().ResetPath();
         _soundManager.StopSound(_soundManager.EffectSounds[EffectSound.Walking]);
         _npcMovement.enabled = false;
         _npcMovement.TargetQueue.Clear();
         _complexMove.enabled = true;
         _movementTypeChanged = false;
     }
 }