public override void AButtonPressed(PlayerController player) { if (isOnCooldown) { return; } if (player.GetHoldingLight() != null) { LightSource tmp = currentLight; SetCurrentLight(player.GetHoldingLight()); player.SetHoldingLight(tmp); } else if (currentLight != null) { player.SetHoldingLight(currentLight); SetCurrentLight(null); } if (currentLight != null) { EmitLight(currentLight.GetColor(), maxLineWidth); currentBatteryStatus = MAX_BEACON_BATTERY; } else { ShutdownLight(); } isOnCooldown = true; currentCooldownTime = beaconInteractionCooldown; }