Пример #1
0
 public FrequencyUpdateBatch(float frequency)
 {
     behaviours = new Dictionary <MonoBehaviour, List <System.Action> >();
     timer      = new StratusCountdown(frequency);
     timer.SetCallback(Invoke);
     timer.resetOnFinished = true;
 }
Пример #2
0
 /// <param name="cooldownPeriod">How long this cooldown will take</param>
 /// <param name="startOnCooldown">Whether the cooldown should be active immediately</param>
 public StratusCooldown(float cooldownPeriod, bool startOnCooldown = false, StratusTimer.Callback onFinished = null)
 {
     countdown = new StratusCountdown(cooldownPeriod);
     if (!startOnCooldown)
     {
         countdown.Finish();
     }
     if (onFinished != null)
     {
         this.countdown.SetCallback(onFinished);
     }
 }
        //------------------------------------------------------------------------/
        // Messages
        //------------------------------------------------------------------------/
        protected override void OnWindowEnable()
        {
            if (this.treeViewState == null)
            {
                this.treeViewState = new TreeViewState();
            }

            this.pollTimer      = new StratusCountdown(this.pollSpeed);
            this.gameObjectType = typeof(GameObject);

            this.CheckTarget();

            // Update tree view on assembly reload
            //this.updateTreeView = true;
            StratusGameObjectBookmark.onUpdate     += this.OnBookmarkUpdate;
            StratusGameObjectInformation.onChanged += this.OnGameObjectInformationChanged;
        }
Пример #4
0
 //------------------------------------------------------------------------/
 // Messages
 //------------------------------------------------------------------------/
 private void Start()
 {
     visibilityTimer = new StratusCountdown(duration);
     //Overlay.Watch(() => visibilityTimer.current, "Visibility Timer");
     //Overlay.Watch(() => isVisible, "Visible");
 }
Пример #5
0
 //------------------------------------------------------------------------/
 // Messages
 //------------------------------------------------------------------------/
 protected override void OnAwake()
 {
     timer = new StratusCountdown(duration);
     timer.SetCallback(OnTimerFinished);
     timer.resetOnFinished = resetOnDisabled;
 }