// Token: 0x06000EB4 RID: 3764 RVA: 0x000413D4 File Offset: 0x0003F5D4 private void UpdateTeleporterParameters(TeleporterInteraction teleporter) { float num = 0.5f; this.rtpcTeleporterProximityValue.value = float.PositiveInfinity; this.rtpcTeleporterDirectionValue.value = 0f; this.rtpcTeleporterCharged.value = 100f; if (teleporter) { if (this.targetCamera) { Vector3 position = this.targetCamera.transform.position; Vector3 forward = this.targetCamera.transform.forward; Vector3 vector = teleporter.transform.position - position; float num2 = Vector2.SignedAngle(new Vector2(vector.x, vector.z), new Vector2(forward.x, forward.z)); if (num2 < 0f) { num2 += 360f; } this.rtpcTeleporterProximityValue.value = vector.magnitude; this.rtpcTeleporterDirectionValue.value = num2; } this.rtpcTeleporterProximityValue.value = Mathf.Clamp(this.rtpcTeleporterProximityValue.value, 20f, 250f); this.rtpcTeleporterProximityValue.value = Util.Remap(this.rtpcTeleporterProximityValue.value, 20f, 250f, 0f, 10000f); this.rtpcTeleporterCharged.value = teleporter.chargeFraction * 90f / num; } }
private void MakeSureBonusDirectorDiesOnStageFinish(RoR2.TeleporterInteraction obj) { if (obj.bonusDirector && obj.bonusDirector.enabled) { obj.bonusDirector.enabled = false; } }
// Token: 0x060010BD RID: 4285 RVA: 0x00049548 File Offset: 0x00047748 private static void OnTeleporterBeginCharging(TeleporterInteraction teleporterInteraction) { if (NetworkServer.active) { foreach (PurchaseInteraction purchaseInteraction in InstanceTracker.GetInstancesList <PurchaseInteraction>()) { if (purchaseInteraction.setUnavailableOnTeleporterActivated) { purchaseInteraction.SetAvailable(false); purchaseInteraction.CancelInvoke("SetUnavailableTemporarily"); } } } }