package com.pesegato.MonkeySheet.batch;


import org.dyn4j.dynamics.Body;

@Deprecated
public abstract class BGeometryBodyControl extends BGeometryControl {

    public float offsetX;
    public float offsetY;
    public float offsetAngle;
    protected Body body;

    protected BGeometryBodyControl(Body body, BGeometry bgeo, float duration) {
        super(bgeo, duration);
        this.body = body;
    }

    @Override
    protected void controlUpdate(float tpf) {
        if (mustInit) {
            binit();
            mustInit = false;
        }
        bupdate(tpf);
        bgeo.getTransform().setPosition(
                (float) body.getTransform().getTranslationX() + offsetX,
                (float) body.getTransform().getTranslationY() + offsetY);
        bgeo.getTransform().setLocalRotation((float) body.getTransform().getRotation() + offsetAngle);
        bgeo.applyTransform();
        duration -= tpf;
        if (duration < 0) {
            setEnabled(false);
        }
    }

    @Override
    public void setEnabled(boolean enabled) {
        this.enabled = enabled;
        if (!enabled) {
            bgeo.removeFromParent();
            spatial.removeControl(this);
        }
    }
}

@@ -323,24 +323,8 @@
 bgeo
-, float duration
 ) %7B%0A
@@ -345,18 +345,8 @@
 bgeo
-, duration
 );%0A 
@@ -874,16 +874,18 @@
         
+//
 duration
@@ -897,24 +897,26 @@
 pf;%0A        
+//
 if (duration
@@ -927,25 +927,26 @@
 ) %7B%0A        
- 
+//
    setEnable
@@ -955,32 +955,34 @@
 false);%0A        
+//
 %7D%0A    %7D%0A%0A    @Ov
@@ -978,216 +978,6 @@
  %7D%0A%0A
-    @Override%0A    public void setEnabled(boolean enabled) %7B%0A        this.enabled = enabled;%0A        if (!enabled) %7B%0A            bgeo.removeFromParent();%0A            spatial.removeControl(this);%0A        %7D%0A    %7D%0A
 %7D%0A

Fix incompatibility