Пример #1
0
	void Start(){
		cachedTransform = transform;
		grid = ForbiddenTilesExample.movementGrid;
	
		//make a check to prevent getting stuck in a null exception
		if(grid){
			//snap to the grid  no matter where we are
			grid.AlignTransform(cachedTransform);
		}
	}
Пример #2
0
    void Start()
    {
        grid = ForbiddenTilesExample.movementGrid;

        //make a check to prevent getting stuck in a null exception
        if (grid)
        {
            //snap to the grid  no matter where we are
            grid.AlignTransform(transform);
        }
    }
Пример #3
0
    void Start()
    {
        grid = ForbiddenTilesVores.movementGrid;
        ani  = gameObject.GetComponent <Animator> ();

        //make a check to prevent getting stuck in a null exception
        if (grid)
        {
            //snap to the grid  no matter where we are
            grid.AlignTransform(transform);
        }
    }