Beispiel #1
0
    public void CountDown(string id, float timeRemaining, PublishTimeRemaining publishTimeRemaining, DoOnTime doOntimme)
    {
        if (Timers.ContainsKey(id))
        {
            return;
        }

        TimerWrapper wrapper = new TimerWrapper(id, timeRemaining, publishTimeRemaining, doOntimme);

        Timers.Add(id, wrapper);
    }
Beispiel #2
0
        public TimerWrapper(string id, float timeRemaining, PublishTimeRemaining publishTimeRemaining, DoOnTime doOnTime)
        {
            this.timeRemaining = timeRemaining;
            this.DoOnTime      = doOnTime;
            this.id            = id;

            if (publishTimeRemaining == null)
            {
                this.publishTimeRemaining = (t) => { Debug.Log("Time Remaining For Timer:" + id + " is: " + t); };
            }
            else
            {
                this.publishTimeRemaining = publishTimeRemaining;
            }
        }
Beispiel #3
0
    public void CountDown(float timeRemaining, PublishTimeRemaining publishTimeRemaining, DoOnTime doOntimme)
    {
        string id = System.Guid.NewGuid().ToString();

        this.CountDown(id, timeRemaining, publishTimeRemaining, doOntimme);
    }