Search in sources :

Example 6 with View

use of com.ilargia.games.logicbrick.component.View in project Entitas-Java by Rubentxu.

the class CoreEntity method addView.

public CoreEntity addView(Shape2D shape) {
    View component = (View) recoverComponent(CoreComponentsLookup.View);
    if (component == null) {
        component = new View(shape);
    } else {
        component.shape = shape;
    }
    addComponent(CoreComponentsLookup.View, component);
    return this;
}
Also used : View(com.ilargia.games.logicbrick.component.View) TextureView(com.ilargia.games.logicbrick.component.TextureView)

Aggregations

View (com.ilargia.games.logicbrick.component.View)6 CoreEntity (com.ilargia.games.entitas.core.CoreEntity)4 Circle (com.badlogic.gdx.math.Circle)3 Motion (com.ilargia.games.logicbrick.component.Motion)3 TextureView (com.ilargia.games.logicbrick.component.TextureView)3 Rectangle (com.badlogic.gdx.math.Rectangle)2 Player (com.ilargia.games.logicbrick.component.Player)1 Score (com.ilargia.games.logicbrick.component.Score)1