mirror of
https://github.com/collinsmith/riiablo.git
synced 2025-07-04 15:27:30 +07:00
Added support for highlighting animations when selected
This commit is contained in:
@ -4,6 +4,8 @@ import com.badlogic.ashley.core.ComponentMapper;
|
||||
import com.badlogic.ashley.core.Entity;
|
||||
import com.badlogic.ashley.core.Family;
|
||||
import com.badlogic.ashley.systems.IteratingSystem;
|
||||
import com.riiablo.codec.Animation;
|
||||
import com.riiablo.engine.Flags;
|
||||
import com.riiablo.engine.SystemPriority;
|
||||
import com.riiablo.engine.component.AnimationComponent;
|
||||
|
||||
@ -16,6 +18,8 @@ public class AnimationSystem extends IteratingSystem {
|
||||
|
||||
@Override
|
||||
protected void processEntity(Entity entity, float delta) {
|
||||
animationComponent.get(entity).animation.act(delta);
|
||||
Animation animation = animationComponent.get(entity).animation;
|
||||
animation.act(delta);
|
||||
animation.setHighlighted((entity.flags & Flags.SELECTED) == Flags.SELECTED);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user