public void ExitControlZone() { if (playerState == VujStates.CanControl) { canControlFlag.SetActive(false); playerState = VujStates.NotControlling; } }
public void ToCanControl(NpcMovement enemy) { if (playerState == VujStates.NotControlling) { controlledTripulant = enemy; canControlFlag.SetActive(true); playerState = VujStates.CanControl; } }
private void Desparasitar() { controlledTripulant.SetDirectionalInput(new Vector2(0, 0)); player.enabled = true; vujBody.SetActive(true); theCamera.target = this.GetComponent <Controller2D>(); playerState = VujStates.NotControlling; }
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 }
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; }
public void Parasitar() { if (playerState == VujStates.CanControl) { playerState = VujStates.OnControlling; if (canControlFlag.activeInHierarchy == true) { canControlFlag.SetActive(false); } anim.SetTrigger("parasitar"); StartCoroutine("Parasitando"); } }