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

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

There is a newer version: 2.5.0
Show newest version
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;

/**
 * Create component in entity.
 *
 * @author Daan van Yperen
 * @see Schedule
 */
public class CreateOperation extends BasicOperation {

    public Class componentClass;

    public CreateOperation() {
    }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy