Calculates a pixel offset based on msg.Alignment.ScreenAlign.
Namespace: (Default Namespace)Assembly: Assembly-CSharp-firstpass (in Assembly-CSharp-firstpass.dll) Version: 0.0.0.0
public static Vector2 GetAlignBasedOffset(
ScoreMessage msg
)
public static Vector2 GetAlignBasedOffset(
ScoreMessage msg
)
Return Value
You'll want to use this when your GUI system only supports top left
positioning (like UnityGUI does, for example). It gives you an offset
vector that you can use in your implementation of
UpdateMessage(ScoreMessage)
to calculate an offset, or in your rendering code (e.g. when using
UnityGUI). This only works, when your renderer returns correct and
reliable values for width and height, so if your GUI system supports
it, it's preferable to use its positioning system instead. See
ConvertAlignment(NGAlignment ScreenAlign, NGAlignment AlignmentType) for a
convenient way to convert ScoreFlashs alignment enumeration
to GUIText.TextAnchors, NGUI style and EZ GUI style.