Пример #1
0
    private IEnumerator TransiOut(ToExecute _exe)
    {
        List <Transform> list = new List <Transform>(frames);

        yield return(new WaitForSeconds(0.5f));

        logo.SetActive(false);

        yield return(new WaitForSeconds(0.2f));

        while (list.Count > 0)
        {
            int rn = Random.Range(0, list.Count);

            list[rn].DOLocalMoveX(-2050, 0.08f);
            list.RemoveAt(rn);

            yield return(new WaitForSeconds(Random.Range(0.01f, 0.03f)));
        }

        if (_exe != null)
        {
            _exe.Invoke();
        }
    }
Пример #2
0
 public void Transi(bool _in, ToExecute _exe)
 {
     if (_in)
     {
         StartCoroutine(TransiIn(_exe));
     }
     else
     {
         StartCoroutine(TransiOut(_exe));
     }
 }
        private void CheckQueue(object State)
        {
            try
            {
                LinkedList <Job> ToExecute = null;
                DateTime         Now       = DateTime.Now;

                lock (this.queue)
                {
                    foreach (KeyValuePair <DateTime, Job> Pair in this.queue)
                    {
                        if (Pair.Key <= Now)
                        {
                            if (ToExecute == null)
                            {
                                ToExecute = new LinkedList <Job> ();
                            }

                            ToExecute.AddLast(Pair.Value);
                        }
                        else
                        {
                            break;
                        }
                    }

                    if (ToExecute != null)
                    {
                        foreach (Job Job in ToExecute)
                        {
                            this.queue.Remove(Job.When);
                            Job.Start();
                        }
                    }
                }
            } catch (Exception ex)
            {
                Log.Exception(ex);
            } finally
            {
                this.SetTimer();
            }
        }
 public void Execute(object parameter)
 {
     ToExecute?.Invoke((T)parameter);
 }
Пример #5
0
 public DelegateCommand(ToExecute lambda)
 {
     _lambda = lambda;
 }
Пример #6
0
 public DelegateCommand(ToExecute lambda)
 {
     _lambda = lambda;
 }