/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  com.jme3.renderer.RenderManager
 *  com.jme3.renderer.ViewPort
 *  com.jme3.scene.control.AbstractControl
 */
package mygame;

import com.jme3.renderer.RenderManager;
import com.jme3.renderer.ViewPort;
import com.jme3.scene.control.AbstractControl;
import mygame.Cross;
import mygame.Exchange;
import mygame.Player;

public class CrossControl
extends AbstractControl {
    protected void controlUpdate(float tpf) {
        Cross cross = (Cross)this.spatial;
        Player player = (Player)Exchange.rootNode.getChild("Player");
        if (cross.collision.getOverlappingObjects().contains(player.collision)) {
            player.heal(25.0f);
            cross.kill();
        }
    }

    protected void controlRender(RenderManager rm, ViewPort vp) {
    }
}
