Skip to content

Instantly share code, notes, and snippets.

@mzgoddard
Created October 10, 2012 16:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mzgoddard/3866552 to your computer and use it in GitHub Desktop.
Save mzgoddard/3866552 to your computer and use it in GitHub Desktop.
ActionList buffer changes
// classes that are buffered
Action.prototype.useBuffer = false;
ActionList.prototype.bufferList = new ActionList
ActionList.prototype.store = function( Action, ... || [ Action... ] ) {
if ( action.useBuffer ) {
this.bufferList.store( action );
}
// normal store stuff
}
// filter out old actions (eg. players leaving, no longer need player actions. )
ActionList.prototype.filter = function( func( Action ):Boolean ){}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment