com.dongbat.invasion.screen.GameScreen.java Source code

Java tutorial

Introduction

Here is the source code for com.dongbat.invasion.screen.GameScreen.java

Source

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.dongbat.invasion.screen;

import com.badlogic.gdx.Screen;
import com.dongbat.invasion.util.ECSUtil;
import com.dongbat.invasion.util.TimeUtil;

/**
 *
 * @author vuong
 */
public class GameScreen implements Screen {

    public GameScreen(String level) {
        ECSUtil.init(level);
        // start timer
        TimeUtil.start();
    }

    @Override
    public void render(float delta) {
        ECSUtil.process(delta);
    }

    @Override
    public void resize(int width, int height) {
        // TODO: resize to fit device
    }

    @Override
    public void show() {

    }

    @Override
    public void hide() {

    }

    @Override
    public void pause() {
        // pause timer
        TimeUtil.pause();
    }

    @Override
    public void resume() {
        TimeUtil.resume();
    }

    @Override
    public void dispose() {
    }

}