function cannonballClass::onLevelLoaded(%this, %scenegraph) { $playerMissile = %this; moveMap.bindCmd(keyboard, "space", "$cannon.createMissile();", ""); } function cannonclass::createMissile(%this) { }