Exemplo n.º 1
0
 public AnimRotateAction(BasePositionObject outerInstance, float x, float y, float angle, int duration) : base(duration)
 {
     this.outerInstance    = outerInstance;
     outerInstance.rotateX = x;
     outerInstance.rotateY = y;
     this.angle            = angle;
 }
Exemplo n.º 2
0
        private BasePositionObject getFirstButton(VSMXBaseObject @object)
        {
            if (@object.hasPropertyValue(childrenName))
            {
                VSMXBaseObject children      = @object.getPropertyValue(childrenName);
                IList <string> childrenNames = children.PropertyNames;
                foreach (string childName in childrenNames)
                {
                    VSMXBaseObject child = children.getPropertyValue(childName);
                    if (child is VSMXNativeObject)
                    {
                        BaseNativeObject childObject = ((VSMXNativeObject)child).Object;
                        if (childObject is UButtonObject)
                        {
                            return((BasePositionObject)childObject);
                        }
                    }
                    BasePositionObject button = getFirstButton(child);
                    if (button != null)
                    {
                        return(button);
                    }
                }
            }

            return(null);
        }
Exemplo n.º 3
0
            public AnimScaleAction(BasePositionObject outerInstance, float width, float height, float depth, int duration) : base(duration)
            {
                this.outerInstance = outerInstance;
                this.width         = width;
                this.height        = height;
                this.depth         = depth;

                startWidth  = outerInstance.scaleWidth.FloatValue;
                startHeight = outerInstance.scaleHeight.FloatValue;
                startDepth  = outerInstance.scaleDepth.FloatValue;
            }
Exemplo n.º 4
0
            public AnimPosAction(BasePositionObject outerInstance, float x, float y, float z, int duration) : base(duration)
            {
                this.outerInstance = outerInstance;
                this.x             = x;
                this.y             = y;
                this.z             = z;

                startX = outerInstance.posX.FloatValue;
                startY = outerInstance.posY.FloatValue;
                startZ = outerInstance.posZ.FloatValue;
            }
Exemplo n.º 5
0
            public AnimColorAction(BasePositionObject outerInstance, float red, float green, float blue, float alpha, int duration) : base(duration)
            {
                this.outerInstance = outerInstance;
                this.red           = red;
                this.green         = green;
                this.blue          = blue;
                this.alpha         = alpha;

                startRed   = outerInstance.redScale.FloatValue;
                startGreen = outerInstance.greenScale.FloatValue;
                startBlue  = outerInstance.blueScale.FloatValue;
                startAlpha = outerInstance.alphaScale.FloatValue;
            }
Exemplo n.º 6
0
        public virtual VSMXBaseObject open(VSMXBaseObject @object)
        {
            //if (log.DebugEnabled)
            {
                Console.WriteLine(string.Format("PageObject.open {0}, children: {1}", this, @object.getPropertyValue(rootName).getPropertyValue(childrenName)));
            }

            trigger(onInit);

            if (display != null)
            {
                display(@object.getPropertyValue(rootName));

                BasePositionObject button = getFirstButton(@object.getPropertyValue(rootName));
                if (button != null)
                {
                    button.setFocus();
                }
            }

            return(@object);
        }