protected override void OnWindowUpdate() { // Check whether values need to be updated pollTimer.Update(Time.deltaTime); if (pollTimer.isFinished) { switch (this.mode) { case Mode.Inspector: if (this.hasTarget) { this.currentTargetInformation.Refresh(); this.currentTargetInformation.UpdateWatchValues(); } break; case Mode.WatchList: if (GameObjectBookmark.hasAvailableInformation) { foreach (var targetInfo in GameObjectBookmark.availableInformation) { targetInfo.Refresh(); targetInfo.UpdateWatchValues(); } } break; } // Reset the poll timer pollTimer.Reset(); this.Repaint(); } }
/// <summary> /// Updates the cooldown. Once it has finisbhed /// </summary> /// <param name="dt"></param> /// <returns></returns> public bool Update(float dt) { if (countdown.Update(dt)) { return(true); } return(false); }
private void Update() { //Trace.Script("Camera main = " + Camera.main); // If the object is visible and we haven't run the timer down if (isVisible && !visibilityTimer.isFinished && withinRange) { // If the timer finished, it means we can now announce // the object's visibility if (visibilityTimer.Update(Time.deltaTime)) { onVisible(true); } } // If the object is not visible (but previously was) // announce that too else if (!isVisible && visibilityTimer.isFinished) { onVisible(false); visibilityTimer.Reset(); } }
public void Update(float time) { //Trace.Script($"time = {time}, progress = {timer.progress}"); timer.Update(time); }
private void Update() { timer.Update(Time.deltaTime); }