Newer
Older
AlgebraicDataflowArchitectureModel / GameEngine / src / main / java / gameEngine / scenes / GameScene.java
package gameEngine.scenes;

import gameEngine.entites.Entity;
import gameEngine.entites.GameObject;
import gameEngine.entites.gameComponents.ComponentView;
import gameEngine.entites.gameComponents.EntityView;

import java.util.HashMap;

import static org.lwjgl.opengl.GL11.glClearColor;

public class GameScene extends Scene {

    public GameScene(HashMap<String, Entity> editorEntities) {
        for(Entity EditorEntity : editorEntities.values()){
            GameObject editorObject = (GameObject) EditorEntity;
            if(editorObject.getComponent(EntityView.class) != null) addNewObject(editorObject);
        }
        System.out.println("Active Game scene");
        glClearColor(1, 1, 1, 0);
    }

    @Override
    public void update(float dt) {
        changeScene(0, dt);    //Editorシーンへの以降処理
    }

}