public void RegisterPortal(RadioTrigger trigger) { if (!this.triggerList.Contains(trigger)) { this.triggerList.Add(trigger); } }
static void Postfix(RadioTrigger __instance) { PlayerCharacter player = PlayerCharacter.main; if (player == null) { return; } PortalRadar radar = player.GetComponentInChildren <PortalRadar>(); if (radar == null) { return; } radar.RegisterPortal(__instance); }