void Start()
        {
            if(grid == null && PixelGrid.instance != null)
                grid = PixelGrid.instance;

            snapToGrid_ = new SnapToGrid(this.gameObject, grid);
        }
Exemple #2
0
 void ForceDefaultGrid()
 {
     if (isDefaultGrid || instance == null)
     {
         instance = this;
     }
 }
Exemple #3
0
 void Awake()
 {
     if (isDefaultGrid)
     {
         instance = this;
     }
     textureScale_ = new Vector2(gridGameObjectSizeMultiplier_, gridGameObjectSizeMultiplier_);
 }
Exemple #4
0
 public SnapToGrid(GameObject objectToSnap, PixelGrid grid)
 {
     objectToSnap_ = objectToSnap;
     grid_         = grid;
 }
Exemple #5
0
 public SnapToGrid(GameObject objectToSnap, PixelGrid grid)
 {
     objectToSnap_ = objectToSnap;
     grid_ = grid;
 }
Exemple #6
0
		void ForceDefaultGrid()
		{
			if(isDefaultGrid || instance == null)
				instance = this;
		}
Exemple #7
0
		void Awake()
		{
			if(isDefaultGrid)
				instance = this;
			textureScale_ = new Vector2(gridGameObjectSizeMultiplier_, gridGameObjectSizeMultiplier_);
		}