Home › Page › UghStretch

UghStretch

Revision for “UghStretch” created on 17 April, 2013 @ 18:59

Title
UghStretch
Content
Inherits from MonoBehaviour UghStretch will dynamically scale a GameObject in relation to two anchor points.  These anchor points can be UghSprites or generic screen anchor points. [table caption="Variables" colwidth=20%|20%] name, type, description constrainProportions, boolean, If the GameObject should maintain proportions when scaling.  (Defaults to false.) IsDirty, boolean, True if the anchor points have been modified by an UghAlign but our GameObject has not been stretched. point1Anchor, <a title="UghSprite" href="http://ugh.graveck.com/wiki/ugh-scripting-reference/ughsprite">UghSprite</a>.Anchor,The anchor location of the screen or corresponding UghSprite. point1AnchorOffset, Vector3, A custom offset from the corresponding anchor location. point2Anchor, <a title="UghSprite" href="http://ugh.graveck.com/wiki/ugh-scripting-reference/ughsprite">UghSprite</a>.Anchor,The anchor location of the screen or corresponding UghSprite. point2AnchorOffset, Vector3, A custom offset from the corresponding anchor location. stretchToPoint1, <a title="UghSprite" href="http://ugh.graveck.com/wiki/ugh-scripting-reference/ughsprite">UghSprite</a>,An UghSprite anchor.  If null the screen will be used as the anchor. stretchToPoint2, <a title="UghSprite" href="http://ugh.graveck.com/wiki/ugh-scripting-reference/ughsprite">UghSprite</a>,An UghSprite anchor.  If null the screen will be used as the anchor. stretchX, boolean, If the GameObject should be allowed to stretch in the X direction. stretchY, boolean, If the GameObject should be allowed to stretch in the Y direction. HandleMPDirtyAlign,event, Event called when this class executes the Align function. AutoUpdate, boolean, "If true, the Align function will be called when either anchor point is modified by an UghAlign. (Also during OnDrawGizmos.)  Defaults to true." [/table] [table caption="Functions" colwidth=20%|20%] name, type, description Align, void, Scales our GameObject in relation to our anchor points. [/table] _ <strong>Using UghStretch in Script</strong> [sourcecode language="csharp"]public void Align()[/sourcecode] This function will cause the class to stretch our GameObject.  During the Update event, if both IsDirty and AutoUpdate are true this function will be called.  (UghAlign will set IsDirty to true after aligning either anchor point.)  You must manually call this function if you have set AutoUpdate to false, or if either anchor point is moved by a means other than UghAlign.
Excerpt


OldNewDate CreatedAuthorActions
17 April, 2013 @ 18:59 admin
17 April, 2013 @ 18:58 [Autosave] admin
17 April, 2013 @ 18:56 admin
2 April, 2013 @ 16:39 admin
2 April, 2013 @ 16:37 admin
2 April, 2013 @ 16:30 admin
2 April, 2013 @ 16:30 admin
2 April, 2013 @ 16:29 admin
2 April, 2013 @ 16:28 admin
2 April, 2013 @ 16:28 admin
2 April, 2013 @ 16:27 admin
2 April, 2013 @ 16:27 admin
2 April, 2013 @ 16:24 admin
19 March, 2013 @ 14:15 admin
19 March, 2013 @ 14:15 admin
19 March, 2013 @ 14:15 admin
18 March, 2013 @ 17:26 admin
18 March, 2013 @ 17:24 admin
18 March, 2013 @ 17:23 admin
18 March, 2013 @ 17:23 admin
8 March, 2013 @ 16:00 admin
8 March, 2013 @ 15:31 admin
8 March, 2013 @ 15:31 admin
6 March, 2013 @ 21:50 admin
6 March, 2013 @ 21:50 admin