package mygame;

import com.jme3.renderer.RenderManager;
import com.jme3.renderer.ViewPort;
import com.jme3.scene.Spatial;
import com.jme3.scene.control.AbstractControl;
import com.jme3.scene.control.Control;

/**
 *
 * @author Snowsun
 */
public class StarPointControl extends AbstractControl {
    
    private int points = 100; //Todo Change StartPoint at Spawn
    private boolean isHited = false;
    
    public StarPointControl() {
    }    
    
    @Override
    protected void controlUpdate(float tpf) {
        if(isIsHited()) {
            //Todo Check life time and set points
        }
    }

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

    public Control cloneForSpatial(Spatial spatial) {
        StarPointControl control = new StarPointControl();
        spatial.addControl(control);
        return control;
    }

    public void setIsHited(boolean isHited) {
        this.isHited = isHited;
    }

    public boolean isIsHited() {
        return isHited;
    }
    
    public int getPoints() {
        return this.points;
    }
}
