Exemplo n.º 1
0
        public static Wiggler Create(float duration, float frequency,  Action<float> onChange = null, bool start = false, bool removeSelfOnFinish = false)
        {
            Wiggler wiggler;

            if (cache.Count > 0)
                wiggler = cache.Pop();
            else
                wiggler = new Wiggler();
            wiggler.Init(duration, frequency, onChange, start, removeSelfOnFinish);

            return wiggler;
        }
Exemplo n.º 2
0
        static public Wiggler Create(float duration, float frequency, Action <float> onChange = null, bool start = false, bool removeSelfOnFinish = false)
        {
            Wiggler wiggler;

            if (cache.Count > 0)
            {
                wiggler = cache.Pop();
            }
            else
            {
                wiggler = new Wiggler();
            }
            wiggler.Init(duration, frequency, onChange, start, removeSelfOnFinish);

            return(wiggler);
        }