コード例 #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);
        }
    }