/** Clean up memory. */ @Override public void destroy() { if (_animations != null) { FlxAnim a; int i = 0; int l = _animations.size; while (i < l) { a = _animations.get(i++); if (a != null) a.destroy(); } _animations = null; } offset = null; origin = null; scale = null; _curAnim = null; _callback = null; _newTextureData = null; framePixels = null; currentBlend = null; shader = null; currentShader = null; blendGL20 = null; if (blendTexture != null) blendTexture.dispose(); blendTexture = null; super.destroy(); }
protected boolean justTouched(FlxObject touchArea) { for (int i = 0; i < 2; ++i) if (FlxG.mouse.justPressed(i) && touchArea.overlapsPoint(FlxG.mouse.getScreenPosition(i), true)) return true; return false; }
/** * Automatically called after update() by the game loop, this function just calls * updateAnimation(). */ @Override public void postUpdate() { super.postUpdate(); updateAnimation(); }