void OnTriggerStay(Collider col) { if (col.gameObject.tag == "Player" && !tPC.masterBool && tPC.onGround) { chara = col.gameObject.transform; if (Vector3.Angle(this.transform.forward, chara.forward) >= 90f) { if (!inCutscene && canInteract) { prompt.gameObject.SetActive(true); } if (gPI.pressAction() && !inCutscene && canInteract) { inCutscene = true; tPC.inACutscene = true; tPC.currentNPCName = this.gameObject.name; currentPage = 0; RefreshValues(); textBoxGUIPos.gameObject.SetActive(true); if (!hideHUDDuringCutscene) { GameObject.FindWithTag("Handler").GetComponent <HUD>().HideHUD(); } } } else { prompt.gameObject.SetActive(false); } } else { prompt.gameObject.SetActive(false); } }
void Start() { gPI = this.GetComponent <GamePadInputs>(); activeLXaxis = () => { return(gPI.LH()); }; activeLYaxis = () => { return(gPI.LV()); }; activeRXaxis = () => { return(gPI.RH()); }; activeRYaxis = () => { return(gPI.RV()); }; activeMXaxis = () => { return(gPI.MX()); }; activeMYaxis = () => { return(gPI.MY()); }; activeInstrument = () => { return(gPI.RT()); }; activeLXaxis2 = () => { return(gPI.LH2()); }; activeLYaxis2 = () => { return(gPI.LV2()); }; activeRXaxis2 = () => { return(gPI.RH2()); }; activeRYaxis2 = () => { return(gPI.RV2()); }; activeMYaxis2 = () => { return(gPI.MY2()); }; activeInstrument2 = () => { return(gPI.RT2()); }; activeLXaxis3 = () => { return(gPI.LH3()); }; activeLYaxis3 = () => { return(gPI.LV3()); }; activeRXaxis3 = () => { return(gPI.RH3()); }; activeRYaxis3 = () => { return(gPI.RV3()); }; activeMYaxis3 = () => { return(gPI.MY3()); }; activeInstrument3 = () => { return(gPI.RT3()); }; activeLXaxis4 = () => { return(gPI.LH4()); }; activeLYaxis4 = () => { return(gPI.LV4()); }; activeRXaxis4 = () => { return(gPI.RH4()); }; activeRYaxis4 = () => { return(gPI.RV4()); }; activeMYaxis4 = () => { return(gPI.MY4()); }; activeInstrument4 = () => { return(gPI.RT4()); }; activeAttackPress = () => { return(gPI.pressRightB()); }; activeJumpPress = () => { return(gPI.pressAction()); }; activeGlidePress = () => { return(gPI.pressTopB()); }; activeLeafPress = () => { return(gPI.pressTopB()); }; activeRunPress = () => { return(gPI.pressLeftB()); }; activeStartPress = () => { return(gPI.pressStart()); }; activeAttackHold = () => { return(gPI.holdRightB()); }; activeJumpHold = () => { return(gPI.holdAction()); }; activeGlideHold = () => { return(gPI.holdTopB()); }; activeLeafHold = () => { return(gPI.holdTopB()); }; activeRunHold = () => { return(gPI.holdLeftB()); }; activeStartPress = () => { return(gPI.holdStart()); }; activeAttackPress2 = () => { return(gPI.pressRightB2()); }; activeJumpPress2 = () => { return(gPI.pressAction2()); }; activeGlidePress2 = () => { return(gPI.pressTopB2()); }; activeLeafPress2 = () => { return(gPI.pressTopB2()); }; activeRunPress2 = () => { return(gPI.pressLeftB2()); }; activeStartPress2 = () => { return(gPI.pressStart2()); }; activeAttackHold2 = () => { return(gPI.holdRightB2()); }; activeJumpHold2 = () => { return(gPI.holdAction2()); }; activeGlideHold2 = () => { return(gPI.holdTopB2()); }; activeLeafHold2 = () => { return(gPI.holdTopB2()); }; activeRunHold2 = () => { return(gPI.holdLeftB2()); }; activeStartPress2 = () => { return(gPI.holdStart2()); }; activeAttackPress3 = () => { return(gPI.pressRightB3()); }; activeJumpPress3 = () => { return(gPI.pressAction3()); }; activeGlidePress3 = () => { return(gPI.pressTopB3()); }; activeLeafPress3 = () => { return(gPI.pressTopB3()); }; activeRunPress3 = () => { return(gPI.pressLeftB3()); }; activeStartPress3 = () => { return(gPI.pressStart3()); }; activeAttackHold3 = () => { return(gPI.holdRightB3()); }; activeJumpHold3 = () => { return(gPI.holdAction3()); }; activeGlideHold3 = () => { return(gPI.holdTopB3()); }; activeLeafHold3 = () => { return(gPI.holdTopB3()); }; activeRunHold3 = () => { return(gPI.holdLeftB3()); }; activeStartPress3 = () => { return(gPI.holdStart3()); }; activeAttackPress4 = () => { return(gPI.pressRightB4()); }; activeJumpPress4 = () => { return(gPI.pressAction4()); }; activeGlidePress4 = () => { return(gPI.pressTopB4()); }; activeLeafPress4 = () => { return(gPI.pressTopB4()); }; activeRunPress4 = () => { return(gPI.pressLeftB4()); }; activeStartPress4 = () => { return(gPI.pressStart4()); }; activeAttackHold4 = () => { return(gPI.holdRightB4()); }; activeJumpHold4 = () => { return(gPI.holdAction4()); }; activeGlideHold4 = () => { return(gPI.holdTopB4()); }; activeLeafHold4 = () => { return(gPI.holdTopB4()); }; activeRunHold4 = () => { return(gPI.holdLeftB4()); }; activeStartPress4 = () => { return(gPI.holdStart4()); }; }