Monday, September 9, 2013

UNITY: Adding Vector Data

Figured out Vector data can be added together as variables.  Example:

"      private Vector2 offset = new Vector2(200, 200);
private Vector2 screenDim = new Vector2( Screen.width, Screen.height );
private Vector2 textLocation = new Vector2( (Screen.width / -2), (Screen.height / -2));

         void WriteCountText()
{
countText.pixelOffset = textLocation + offset;
countText.text = "Count: " + count2.ToString();
}
"

No comments: