Hello Guest

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - McSpiffy

Pages: [1]
1
Support / Re: Feeding a tile map a predefined material.
« on: March 02, 2015, 09:13:40 pm »
I should clarify that I would like each pixel in the material to be represented as 1 tile. Its a small texture I'm using as the material so size should not be a problem.

2
Support / Feeding a tile map a predefined material.
« on: March 02, 2015, 06:00:27 pm »
Is it possible to feed a Tilemap a predefined material so I can just use the GetTilePosition  to receive the vector3s for each tile?

3
Support / Re: Hi I'm have trouble generating my tile map from code.
« on: December 10, 2014, 04:31:09 pm »
Wow thank you that was it. It looks so obvious now with a fresh cup  of coffee in my hands  >.<. I wasn't going to keep using GetComponent  I just wanted to see if it would work. Thanks for the help  :D

4
Support / Hi I'm have trouble generating my tile map from code.
« on: December 10, 2014, 02:23:50 am »
So I'm grabbing colors from from what I call a "Bitmap" not sure what the technical name is but its a png file and its not very big. Then I'm checking them against a list to see if they match. then I want to place a tile at the location that they are located on the png. So I wrote some code using for loops and foreach loops. But when I run it nothing is happen no errors I tried running a debug.log to see if it runs through the code and it seems to but nothing appears on the screen.

I'm just starting out with TK 2d so I'm still learning the basics. Any help would be appreciated. Thanks  ;)

Code: [Select]
int x,y;

for( y = 0; y < shipY; y++)
{
for( x = 0; x < shipX; x++)
{
foreach(Tile t in modualeList.GetComponent<ModualeList>().tile)
{
/*
find floor layer and set all colors from the bit map to gen a random floor tile to the floor    layer in the TileMap
*/

if(textureColors [x+y*shipX] == t.tileColor)
{
shipTileMap.GetComponent<tk2dTileMap>().SetTile(shipX,shipY,0,131);
}

}
}
}
shipTileMap.GetComponent<tk2dTileMap>().Build();
}

Pages: [1]