Skip to content

Instantly share code, notes, and snippets.

@TheBlackParrot
Created February 15, 2015 08:11
Show Gist options
  • Save TheBlackParrot/f49bb2714ec8bbd23e4c to your computer and use it in GitHub Desktop.
Save TheBlackParrot/f49bb2714ec8bbd23e4c to your computer and use it in GitHub Desktop.
Blockland - get the topmost brick of a stack
function fxDTSBrick::getTopBrick(%this) {
%upbrick = %this;
while(isObject(%upbrick.getUpBrick(0))) {
%upbrick = %upbrick.getUpBrick(0);
}
return %upbrick;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment