Created
July 22, 2014 11:31
-
-
Save saschagehlich/229ab3060c88a3342d41 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Tile.cpp | |
int* Tile::getWalkable() | |
{ | |
int* walkable = new int[4]; | |
walkable[0] = 1; | |
walkable[0] = 1; | |
walkable[0] = 1; | |
return walkable; | |
} | |
// Some other file | |
int* walkable = tile->getWalkable(); | |
myPathfindingNode->setWalkable(walkable); | |
// PathfindingNode.cpp | |
void setWalkable(int* walkable) | |
{ | |
mWalkable[0] = walkable[0]; | |
mWalkable[1] = walkable[1]; | |
mWalkable[2] = walkable[2]; | |
mWalkable[3] = walkable[3]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment