public FixedPosition(Vector2 fixedPosition, GuiAnchor localAnchor, GuiAnchor parentAnchor) { if (localAnchor == null) { throw new ArgumentNullException("localAnchor"); } if (parentAnchor == null) { throw new ArgumentNullException("parentAnchor"); } mFixedPosition = fixedPosition; mLocalAnchor = localAnchor; mParentAnchor = parentAnchor; }
public FollowWorldSpaceObject(Camera camera, Transform worldSpaceObject, GuiAnchor widgetAnchor, Vector2 offset, Vector3 worldSpaceOffset) { if (camera == null) { throw new ArgumentNullException("camera"); } if (worldSpaceObject == null) { throw new ArgumentNullException("worldSpaceObject"); } mTransform = worldSpaceObject; mOffset = offset; mCamera = camera; mAnchor = widgetAnchor; mWorldSpaceOffset = worldSpaceOffset; }
public FloatFromPosition(IScheduler scheduler, Camera camera, Vector3 startPosition, GuiAnchor anchor, float floatSpeed, float floatTime, Hangout.Shared.Action onCompleteCallback) { if (camera == null) { throw new ArgumentNullException("camera"); } if (scheduler == null) { throw new ArgumentNullException("scheduler"); } mAnchor = anchor; scheduler.StartCoroutine(Animate(startPosition, camera, floatSpeed, floatTime)); mOnCompleteCallback = onCompleteCallback; }
public static FixedPosition BuildFixedPosition(string x, string y, XmlNode node) { FixedPosition result = null; if (x == null) { throw new ArgumentNullException("x"); } if (y == null) { throw new ArgumentNullException("y"); } if (node == null) { throw new ArgumentNullException("node"); } try { GuiAnchor localAnchor = BuildAnchor(node, "anchor"); if (node.Attributes["parentAnchor"] != null) { GuiAnchor parentAnchor = BuildAnchor(node, "parentAnchor"); result = new FixedPosition(new Vector2(float.Parse(x), float.Parse(y)), localAnchor, parentAnchor); } else { result = new FixedPosition(new Vector2(float.Parse(x), float.Parse(y)), localAnchor); } } catch (FormatException) { throw new GuiConstructionException("Attempted to create a FixedPosition IGuiPosition from a node that doesn't parse to (float) X, (float) Y."); } return(result); }
public GuiAnchor(GuiAnchor copy) { mHorizontal = copy.Horizontal; mVertical = copy.Vertical; }
public FixedPosition(float x, float y, GuiAnchor anchor) : this(new Vector2(x, y), anchor) { }
public FixedPosition(Vector2 fixedPosition, GuiAnchor anchor) : this(fixedPosition, anchor, anchor) { }
public FixedPosition(float x, float y, GuiAnchor localAnchor, GuiAnchor parentAnchor) : this(new Vector2(x, y), localAnchor, parentAnchor) { }