Created
July 22, 2014 11:30
-
-
Save saschagehlich/459e3a3aa341209f87cc 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]; | |
// Do some stuff, add 4 values to walkable | |
return walkable; | |
} | |
// Some other file | |
int* walkable = tile->getWalkable(); | |
myPathfindingNode->setWalkable(walkable); | |
// PathfindingNode.cpp | |
void setWalkable(int* walkable) | |
{ | |
mWalkable[0] = walkable[0]; | |
mWalkable[0] = walkable[0]; | |
mWalkable[0] = walkable[0]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment