Advertisement
Guest User

Untitled

a guest
Oct 20th, 2014
232
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.40 KB | None | 0 0
  1. using UnityEngine;
  2. using System.Collections;
  3.  
  4. public class GeneratorCoordinateFreeze : MonoBehaviour
  5. {
  6.     float xPos;
  7.     float yPos;
  8.  
  9.     void Start ()
  10.     {
  11.         yPos = this.transform.position.y;
  12.         xPos = this.transform.position.x;
  13.     }
  14.    
  15.     void Update ()
  16.     {
  17.         transform.position = new Vector3(xPos, yPos);
  18.         Debug.Log("X: " + xPos + " || " + "Y: " + yPos);
  19.     }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement