protected internal virtual long doPlayReference(ObjectType @ref) { BasePositionObject positionObject = @ref.PositionObject; if (positionObject == null) { return(0); } VSMXBaseObject @object = positionObject.Object; long delay = doPlayReference(@object); if (@object.hasPropertyValue(Resource.childrenName)) { VSMXBaseObject children = @object.getPropertyValue(Resource.childrenName); IList <string> names = children.PropertyNames; if (names != null) { foreach (string name in names) { VSMXBaseObject child = children.getPropertyValue(name); delay = System.Math.Max(delay, doPlayReference(child)); } } } return(delay); }
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); }
public virtual void play(VSMXBaseObject thisObject, VSMXBaseObject @object) { //if (log.DebugEnabled) { Console.WriteLine(string.Format("BaseAnim.play {0}, {1}", thisObject, @object)); } if (thisObject.hasPropertyValue(Resource.childrenName)) { VSMXBaseObject children = thisObject.getPropertyValue(Resource.childrenName); IList <string> names = children.PropertyNames; BaseAnim[] baseAnims = new BaseAnim[names.Count + 1]; int numberBaseAnims = 0; baseAnims[numberBaseAnims++] = this; foreach (string name in names) { VSMXBaseObject child = children.getPropertyValue(name); if (child is VSMXNativeObject) { BaseNativeObject baseNativeObject = ((VSMXNativeObject)child).Object; if (baseNativeObject is BaseAnim) { baseAnims[numberBaseAnims++] = (BaseAnim)baseNativeObject; } } } if (numberBaseAnims > 0) { Scheduler.addAction(new PlayAnimAction(baseAnims, 0, numberBaseAnims, @object)); } } }
private void display(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); display.add(child); display(child); } } }