com.artemis.EntityFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of artemis-odb Show documentation
Show all versions of artemis-odb Show documentation
Fork of Artemis Entity System Framework.
package com.artemis;
import com.artemis.annotations.Bind;
import com.artemis.annotations.Sticky;
import com.artemis.annotations.UseSetter;
/**
*
*
*
* {@literal @}Bind({Sprite.class, Cullible.class, Position.class, Velocity.class,
Asset.class, Size.class, HitPoints.class})
* public interface ShipShortWire extends EntityFactory {
* // method name maps Position
* ShipShortWire position(float x, float y);
* // parameter names must match field or setter name
* ShipShortWire velocity(float x, float y);
* ShipShortWire asset(String path);
* ShipShortWire size(float width, float height);
* {@literal @}Sticky ShipShortWire hitPoints(int current);
* }
*
*
*
*
* @param Factory type.
*
* @see Bind
* @see Sticky
* @see UseSetter
*/
public interface EntityFactory {
/**
* Creates a new factory based on this instance, inheriting
* any stickied values.
*
* @return This factory for chaining
*/
T copy();
/**
* @param tag
* @return This factory for chaining
*/
T tag(String tag);
/**
* Assigns entity to supplied group(s) upon creation.
*
* @param group Adds entity to this group.
* @return This factory for chaining
*/
T group(String group);
/**
* Assigns entity to supplied group(s) upon creation.
*
* @param group Adds entity to this group.
* @return This factory for chaining
*/
T group(String groupA, String... groups);
/**
* Assigns entity to supplied group(s) upon creation.
*
* @param group Adds entity to this group.
* @return This factory for chaining
*/
T group(String groupA, String groupB, String... groups);
/**
* Creates a new Entity.
*
* @return created entity.
*/
Entity create();
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy