Update() public method

public Update ( MovieClip mc, UpdateContext context ) : void
mc MovieClip
context UpdateContext
return void
Exemplo n.º 1
0
        public override void Update(UpdateContext context, float parentAlpha)
        {
            if (_needRebuild)
            {
                Rebuild();
            }

            if (_playing && frameCount != 0 && _status != 3)
            {
                playState.Update(this, context);
                if (_currentFrame != playState.currrentFrame)
                {
                    if (_status == 1)
                    {
                        _currentFrame           = _start;
                        playState.currrentFrame = _currentFrame;
                        _status = 0;
                    }
                    else if (_status == 2)
                    {
                        _currentFrame           = _endAt;
                        playState.currrentFrame = _currentFrame;
                        _status = 3;
                        Stage.inst.onPostUpdate.Add(__playEnd);
                    }
                    else
                    {
                        _currentFrame = playState.currrentFrame;
                        if (_currentFrame == _end)
                        {
                            if (_times > 0)
                            {
                                _times--;
                                if (_times == 0)
                                {
                                    _status = 2;
                                }
                                else
                                {
                                    _status = 1;
                                }
                            }
                        }
                    }
                    quadBatch.SetQuadAlpha(_currentFrame, 1, 1f, 0f);
                }
            }
            quadBatch.Update(context, alpha * parentAlpha);
        }
Exemplo n.º 2
0
 static public int Update(IntPtr l)
 {
     try {
         FairyGUI.PlayState self = (FairyGUI.PlayState)checkSelf(l);
         FairyGUI.MovieClip a1;
         checkType(l, 2, out a1);
         FairyGUI.UpdateContext a2;
         checkType(l, 3, out a2);
         self.Update(a1, a2);
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Exemplo n.º 3
0
 static int Update(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 3);
         FairyGUI.PlayState     obj  = (FairyGUI.PlayState)ToLua.CheckObject <FairyGUI.PlayState>(L, 1);
         FairyGUI.MovieClip     arg0 = (FairyGUI.MovieClip)ToLua.CheckObject <FairyGUI.MovieClip>(L, 2);
         FairyGUI.UpdateContext arg1 = (FairyGUI.UpdateContext)ToLua.CheckObject <FairyGUI.UpdateContext>(L, 3);
         obj.Update(arg0, arg1);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }