Exemplo n.º 1
0
  /** 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();
  }
Exemplo n.º 2
0
 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;
 }
Exemplo n.º 3
0
 /**
  * Automatically called after update() by the game loop, this function just calls
  * updateAnimation().
  */
 @Override
 public void postUpdate() {
   super.postUpdate();
   updateAnimation();
 }