public void SetCurrentLight(LightSource currentLight) { this.currentLight = currentLight; if (currentLight != null) { currentLight.SetTarget(transform); } }
public void BButtonPressed() { if (holdingLight != null) { holdingLight.SetTarget(null); holdingLight = null; } }
public void SetHoldingLight(LightSource holdingLight) { this.holdingLight = holdingLight; if (holdingLight != null) { holdingLight.SetTarget(hammerLightPivot); } }
protected override void Update() { base.Update(); if (IsEmittingLight()) { // currentBatteryStatus -= Time.deltaTime; if (currentBatteryStatus <= 0) { ShutdownLight(); currentLight.SetTarget(null); SetCurrentLight(null); } currentLineWidth = maxLineWidth * (currentBatteryStatus / MAX_BEACON_BATTERY); } if (isOnCooldown) { currentCooldownTime -= Time.deltaTime; if (currentCooldownTime <= 0) { isOnCooldown = false; } } }