Exemplo n.º 1
0
    public static void Add(Action action, float TimeInterval)
    {
        if (Instance.periodicUpdateActions.Any(x => x.Action == action))
        {
            return;
        }
        TimedUpdate timedUpdate = Instance.GetTimedUpdates();

        timedUpdate.SetUp(action, TimeInterval);
        Instance.periodicUpdateActions.Add(timedUpdate);
    }
Exemplo n.º 2
0
    public static void Add(Action action, float timeInterval)
    {
        if (Instance.periodicUpdateActions.Any(x => x.Action == action))
        {
            return;
        }
        TimedUpdate timedUpdate = Instance.GetTimedUpdates();

        timedUpdate.SetUp(action, timeInterval);
        timedUpdate.TimeTitleNext += NumberOfUpdatesAdded * 0.1f;
        NumberOfUpdatesAdded++;
        Instance.periodicUpdateActions.Add(timedUpdate);
    }
Exemplo n.º 3
0
    public static void Add(Action action, float timeInterval)
    {
        if (Instance.periodicUpdateActions.Any(x => x.Action == action))
        {
            return;
        }
        TimedUpdate timedUpdate = Instance.GetTimedUpdates();

        timedUpdate.SetUp(action, timeInterval);
        timedUpdate.TimeTitleNext += NumberOfUpdatesAdded * 0.01f;
        NumberOfUpdatesAdded++;
        if (NumberOfUpdatesAdded > 500)
        {
            NumberOfUpdatesAdded = 0;             //So the delay can't be too big
        }

        Instance.periodicUpdateActions.Add(timedUpdate);
    }