Add random floor tiles to floors
This commit is contained in:
+17
@@ -29,3 +29,20 @@ calcTexCoord cen x' y' p =
|
||||
where
|
||||
x = x' -.- cen
|
||||
y = y' -.- cen
|
||||
|
||||
oTile
|
||||
:: [Point2]
|
||||
-> Float
|
||||
-> Tile
|
||||
oTile poly z = Tile
|
||||
{ _tilePoly = poly
|
||||
, _tileCenter = c
|
||||
, _tileX = x
|
||||
, _tileY = y
|
||||
, _tileZ = z
|
||||
}
|
||||
where
|
||||
c = head poly
|
||||
xdir = 50 *.* (normalizeV (poly !! 1 -.- c))
|
||||
x = c +.+ xdir
|
||||
y = c +.+ vNormal xdir
|
||||
|
||||
Reference in New Issue
Block a user