All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.mostlyoriginal.api.operation.basic.RemoveOperation Maven / Gradle / Ivy

package net.mostlyoriginal.api.operation.basic;

import com.artemis.Component;
import com.artemis.Entity;
import net.mostlyoriginal.api.component.Schedule;
import net.mostlyoriginal.api.operation.common.BasicOperation;

/**
 * Remove component from entity.
 *
 * @author Daan van Yperen
 * @see Schedule
 */
public class RemoveOperation extends BasicOperation {

    public Class componentClass;

    public RemoveOperation() {
    }

    @Override
    public void process(Entity e) {
        e.edit().remove(componentClass);
    }

    @Override
    public void reset() {
        super.reset();
        componentClass = null;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy