Exemplo n.º 1
0
        internal void Reset()
        {
            // There is a lot going on here. We probably don't need to reset everything.

            OnStopped = null;

            Running    = false;
            IsFirstRun = false;
            Tag        = null;
            TagId      = 0;

            OwnerWorld = IntPtr.Zero;
            Owner      = null;
            IsRepeated = false;
            Type       = default(InvokerType);
            Group      = default(CoroutineGroup);

            Value         = 0;
            RepeatedValue = 0;

            HasStopAfterValue = false;
            stopAfterValue    = 0;
            stopAfterEndValue = 0;

            startingValue = 0;
            beginValue    = 0;
            EndValue      = 0;

            RepeatConstantTime = false;
            MaxCallCount       = 0;
            MaxTotalCallCount  = 0;
            totalCallCount     = 0;
            cancelInvoke       = false;

            if (collection != null)
            {
                collection.HeapRemove(this);
                collection = null;
            }
            collectionGroup = null;

            handlerType              = InvokerHandlerType.Default;
            handler                  = null;
            handlerWithObject        = null;
            handlerWithInvoker       = null;
            handlerWithObjectInvoker = null;

            invokersByUObjectIndex = -1;
            invokersByMethodIndex  = -1;
        }
Exemplo n.º 2
0
        private void SetHandler(InvokerHandlerType handlerType,
                                InvokerHandler handler,
                                InvokerHandlerWithInvoker handlerWithInvoker,
                                InvokerHandlerWithObject handlerWithObject,
                                InvokerHandlerWithObjectInvoker handlerWithObjectInvoker)
        {
            RemoveInvokerFromInvokersByMethod();

            this.handlerType              = handlerType;
            this.handler                  = handler;
            this.handlerWithInvoker       = handlerWithInvoker;
            this.handlerWithObject        = handlerWithObject;
            this.handlerWithObjectInvoker = handlerWithObjectInvoker;

            AddInvokerToInvokersByMethod();
        }
Exemplo n.º 3
0
 public static Invoker StartInvokerTicks(object obj, InvokerHandler handler, ulong ticks, ulong repeatedTicks = default(ulong),
                                         CoroutineGroup group = CoroutineGroup.Tick, bool pool = PoolByDefault)
 {
     return(StartInvoker(obj, InvokerHandlerType.Default, handler, InvokerType.Ticks, ticks, repeatedTicks, group, pool));
 }
Exemplo n.º 4
0
 public static Invoker StartInvoker(object obj, InvokerHandler handler, TimeSpan time, TimeSpan repeatedTime = default(TimeSpan),
                                    CoroutineGroup group = CoroutineGroup.Tick, bool pool = PoolByDefault)
 {
     return(StartInvoker(obj, InvokerHandlerType.Default, handler, InvokerType.Delay, (ulong)time.Ticks, (ulong)repeatedTime.Ticks, group, pool));
 }
Exemplo n.º 5
0
        // Start invoker frames

        public void StartInvokerFrames(InvokerHandler handler, ulong frames, ulong repeatedFrames = default(ulong), CoroutineGroup group = CoroutineGroup.Tick, bool pool = Invoker.PoolByDefault)
        {
            Invoker.StartInvokerFrames(this, handler, frames, repeatedFrames, group, pool);
        }
Exemplo n.º 6
0
        // Start invoker time

        public void StartInvoker(InvokerHandler handler, TimeSpan time, TimeSpan repeatedTime = default(TimeSpan), CoroutineGroup group = CoroutineGroup.Tick, bool pool = Invoker.PoolByDefault)
        {
            Invoker.StartInvoker(this, handler, time, repeatedTime, group, pool);
        }
Exemplo n.º 7
0
 public void SetHandler(InvokerHandler handler)
 {
     SetHandler(InvokerHandlerType.Default, handler, null, null, null);
 }