Gear is a connection between object and controller.
Inheritance: GearBase
 static public int get_tweener(IntPtr l)
 {
     try {
         FairyGUI.GearSize self = (FairyGUI.GearSize)checkSelf(l);
         pushValue(l, true);
         pushValue(l, self.tweener);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int UpdateState(IntPtr l)
 {
     try {
         FairyGUI.GearSize self = (FairyGUI.GearSize)checkSelf(l);
         self.UpdateState();
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int constructor(IntPtr l)
 {
     try {
         FairyGUI.GearSize o;
         FairyGUI.GObject  a1;
         checkType(l, 2, out a1);
         o = new FairyGUI.GearSize(a1);
         pushValue(l, true);
         pushValue(l, o);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Beispiel #4
0
        public GObject()
        {
            _width           = 0;
            _height          = 0;
            _alpha           = 1;
            _rotation        = 0;
            _visible         = true;
            _touchable       = true;
            _scaleX          = 1;
            _scaleY          = 1;
            _internalVisible = 1;
            id   = "_n" + _gInstanceCounter++;
            name = string.Empty;

            CreateDisplayObject();

            relations = new Relations(this);

            gearDisplay = new GearDisplay(this);
            gearXY      = new GearXY(this);
            gearSize    = new GearSize(this);
            gearLook    = new GearLook(this);

            onClick            = new EventListener(this, "onClick");
            onRightClick       = new EventListener(this, "onRightClick");
            onTouchBegin       = new EventListener(this, "onTouchBegin");
            onTouchEnd         = new EventListener(this, "onTouchEnd");
            onRollOver         = new EventListener(this, "onRollOver");
            onRollOut          = new EventListener(this, "onRollOut");
            onAddedToStage     = new EventListener(this, "onAddedToStage");
            onRemovedFromStage = new EventListener(this, "onRemovedFromStage");
            onKeyDown          = new EventListener(this, "onKeyDown");
            onClickLink        = new EventListener(this, "onClickLink");

            onPositionChanged = new EventListener(this, "onPositionChanged");
            onSizeChanged     = new EventListener(this, "onSizeChanged");
            onDragStart       = new EventListener(this, "onDragStart");
            onDragEnd         = new EventListener(this, "onDragEnd");
        }
Beispiel #5
0
        public GObject()
        {
            _width = 0;
            _height = 0;
            _alpha = 1;
            _rotation = 0;
            _visible = true;
            _touchable = true;
            _scaleX = 1;
            _scaleY = 1;
            _internalVisible = 1;
            id = "_n" + _gInstanceCounter++;
            name = string.Empty;

            CreateDisplayObject();

            relations = new Relations(this);

            gearDisplay = new GearDisplay(this);
            gearXY = new GearXY(this);
            gearSize = new GearSize(this);
            gearLook = new GearLook(this);

            onClick = new EventListener(this, "onClick");
            onRightClick = new EventListener(this, "onRightClick");
            onMouseDown = new EventListener(this, "onMouseDown");
            onMouseUp = new EventListener(this, "onMouseUp");
            onRollOver = new EventListener(this, "onRollOver");
            onRollOut = new EventListener(this, "onRollOut");
            onAddedToStage = new EventListener(this, "onAddedToStage");
            onRemovedFromStage = new EventListener(this, "onRemovedFromStage");
            onKeyDown = new EventListener(this, "onKeyDown");
            onClickLink = new EventListener(this, "onClickLink");

            onXYChanged = new EventListener(this, "onXYChanged");
            onSizeChanged = new EventListener(this, "onSizeChanged");
            onDragStart = new EventListener(this, "onDragStart");
            onDragEnd = new EventListener(this, "onDragEnd");
        }
Beispiel #6
0
 public GearBase GetGear(int index)
 {
     GearBase gear = _gears[index];
     if (gear == null)
     {
         switch (index)
         {
             case 0:
                 gear = new GearDisplay(this);
                 break;
             case 1:
                 gear = new GearXY(this);
                 break;
             case 2:
                 gear = new GearSize(this);
                 break;
             case 3:
                 gear = new GearLook(this);
                 break;
             case 4:
                 gear = new GearColor(this);
                 break;
             case 5:
                 gear = new GearAnimation(this);
                 break;
             case 6:
                 gear = new GearText(this);
                 break;
             case 7:
                 gear = new GearIcon(this);
                 break;
             default:
                 throw new System.Exception("FairyGUI: invalid gear index!");
         }
         _gears[index] = gear;
     }
     return gear;
 }