Example #1
0
    public AbstractGoTweenCollection(GoTweenCollectionConfig config)
    {
        // allow events by default
        allowEvents = true;

        // setup callback bools
        _didInit  = false;
        _didBegin = false;

        // flag the onIterationStart event to fire.
        // as long as goTo is not called on this tween, the onIterationStart event will fire
        _fireIterationStart = true;

        // copy the TweenConfig info over
        id         = config.id;
        loopType   = config.loopType;
        iterations = config.iterations;
        updateType = config.propertyUpdateType;
        timeScale  = 1;
        state      = GoTweenState.Paused;

        _onInit           = config.onInitHandler;
        _onBegin          = config.onBeginHandler;
        _onIterationStart = config.onIterationStartHandler;
        _onUpdate         = config.onUpdateHandler;
        _onIterationEnd   = config.onIterationEndHandler;
        _onComplete       = config.onCompleteHandler;

        if (config.autoClear)
        {
            config.clear();
        }

        Go.addTween(this);
    }
 static public int clear(IntPtr l)
 {
     try {
         GoTweenCollectionConfig self = (GoTweenCollectionConfig)checkSelf(l);
         self.clear();
         return(0);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }