Skip to content

Instantly share code, notes, and snippets.

@Stray
Created January 29, 2011 19:42
Show Gist options
  • Save Stray/802123 to your computer and use it in GitHub Desktop.
Save Stray/802123 to your computer and use it in GitHub Desktop.
Look at those conditionals! Gross!
protected function selectedHandler(option:IBudgetGameOption, vo:BudgetGameOptionVO):void
{
enable(vo.enables);
disable(vo.disables);
dispatchUpdate(vo.cost, vo.productivity);
}
protected function enable(option:IBudgetGameOption):void
{
if(option != null)
{
option.enable();
}
}
protected function disable(option:IBudgetGameOption):void
{
if(option != null)
{
option.disable();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment