// Path: core/src/com/ychstudio/components/AnimationComponent.java
// public class AnimationComponent implements Component {
//     public IntMap<Animation> animations = new IntMap<>();
// }
// 
// Path: core/src/com/ychstudio/components/StateComponent.java
// public class StateComponent implements Component {
//     private float stateTime;
//     private int state;
//     
//     public StateComponent() {
//         this(0);
//     }
//     
//     public StateComponent(int state) {
//         this.state = state;
//         stateTime = 0;
//     }
//     
//     public void increaseStateTime(float delta) {
//         stateTime += delta;
//     }
//     
//     public float getStateTime() {
//         return stateTime;
//     }
//     
//     public void resetStateTime() {
//         stateTime = 0;
//     }
//     
//     public int getState() {
//         return state;
//     }
//     
//     public void setState(int newState) {
//         if (state == newState) {
//             return;
//         }
//         state = newState;
//         stateTime = 0;
//     }
// }
// 
// Path: core/src/com/ychstudio/components/TextureComponent.java
// public class TextureComponent implements Component {
//     
//     public TextureRegion region;
// 
//     public TextureComponent(TextureRegion textureRegion) {
//         region = new TextureRegion(textureRegion);
//     }
// }


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.ychstudio.components.AnimationComponent;
import com.ychstudio.components.StateComponent;
import com.ychstudio.components.TextureComponent;
package com.ychstudio.systems;


public class AnimationSystem extends IteratingSystem {

    private final ComponentMapper<TextureComponent> textureM = ComponentMapper.getFor(TextureComponent.class);
    private final ComponentMapper<AnimationComponent> animationM = ComponentMapper.getFor(AnimationComponent.class);
    private final ComponentMapper<StateComponent> stateM = ComponentMapper.getFor(StateComponent.class);

    public AnimationSystem() {
        super(Family.all(TextureComponent.class, AnimationComponent.class, StateComponent.class).get());
    }

    @Override
// Path: core/src/com/ychstudio/components/AnimationComponent.java
// public class AnimationComponent implements Component {
//     public IntMap<Animation> animations = new IntMap<>();
// }
// 
// Path: core/src/com/ychstudio/components/StateComponent.java
// public class StateComponent implements Component {
//     private float stateTime;
//     private int state;
//     
//     public StateComponent() {
//         this(0);
//     }
//     
//     public StateComponent(int state) {
//         this.state = state;
//         stateTime = 0;
//     }
//     
//     public void increaseStateTime(float delta) {
//         stateTime += delta;
//     }
//     
//     public float getStateTime() {
//         return stateTime;
//     }
//     
//     public void resetStateTime() {
//         stateTime = 0;
//     }
//     
//     public int getState() {
//         return state;
//     }
//     
//     public void setState(int newState) {
//         if (state == newState) {
//             return;
//         }
//         state = newState;
//         stateTime = 0;
//     }
// }
// 
// Path: core/src/com/ychstudio/components/TextureComponent.java
// public class TextureComponent implements Component {
//     
//     public TextureRegion region;
// 
//     public TextureComponent(TextureRegion textureRegion) {
//         region = new TextureRegion(textureRegion);
//     }
// }


// Path: core/src/com/ychstudio/systems/AnimationSystem.java
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.ychstudio.components.AnimationComponent;
import com.ychstudio.components.StateComponent;
import com.ychstudio.components.TextureComponent;

package com.ychstudio.systems;


public class AnimationSystem extends IteratingSystem {

    private final ComponentMapper<TextureComponent> textureM = ComponentMapper.getFor(TextureComponent.class);
    private final ComponentMapper<AnimationComponent> animationM = ComponentMapper.getFor(AnimationComponent.class);
    private final ComponentMapper<StateComponent> stateM = ComponentMapper.getFor(StateComponent.class);

    public AnimationSystem() {
        super(Family.all(TextureComponent.class, AnimationComponent.class, StateComponent.class).get());
    }

    @Override
    protected void processEntity(Entity entity, float deltaTime) {