Ejemplo n.º 1
0
 public void ExitControlZone()
 {
     if (playerState == VujStates.CanControl)
     {
         canControlFlag.SetActive(false);
         playerState = VujStates.NotControlling;
     }
 }
Ejemplo n.º 2
0
 public void ToCanControl(NpcMovement enemy)
 {
     if (playerState == VujStates.NotControlling)
     {
         controlledTripulant = enemy;
         canControlFlag.SetActive(true);
         playerState = VujStates.CanControl;
     }
 }
Ejemplo n.º 3
0
    private void Desparasitar()
    {
        controlledTripulant.SetDirectionalInput(new Vector2(0, 0));
        player.enabled = true;
        vujBody.SetActive(true);
        theCamera.target = this.GetComponent <Controller2D>();

        playerState = VujStates.NotControlling;
    }
Ejemplo n.º 4
0
    private void Start()
    {
        player = GetComponent <Player>();
        //anim = GetComponent<Animator>();
        theCamera = FindObjectOfType <CameraFollow>();

        playerState = VujStates.NotControlling;
        canControlFlag.SetActive(false);

        facingRight = false; //al principio no mira a la derecha
        //Flip(1); //lo giramos para que mire a la derecha
    }
Ejemplo n.º 5
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;
    }
Ejemplo n.º 6
0
 public void Parasitar()
 {
     if (playerState == VujStates.CanControl)
     {
         playerState = VujStates.OnControlling;
         if (canControlFlag.activeInHierarchy == true)
         {
             canControlFlag.SetActive(false);
         }
         anim.SetTrigger("parasitar");
         StartCoroutine("Parasitando");
     }
 }