Created
August 26, 2015 04:26
-
-
Save JoseRivas1998/cc1f2827498d26356bc8 to your computer and use it in GitHub Desktop.
Space Invaders Blog Post
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import com.badlogic.gdx.graphics.g2d.SpriteBatch; | |
| import com.badlogic.gdx.graphics.glutils.ShapeRenderer; | |
| import com.tcg.spaceinvaders.managers.GameStateManager; | |
| public abstract class GameState { | |
| protected GameStateManager gsm; | |
| public GameState(GameStateManager gsm) { | |
| this.gsm = gsm; | |
| init(); | |
| } | |
| protected abstract void init(); | |
| public abstract void handleInput(); | |
| public abstract void update(float dt); | |
| public abstract void draw(float dt, SpriteBatch sb, ShapeRenderer sr); | |
| public abstract void resize(int width, int height); | |
| public abstract void dispose(); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.tcg.spaceinvaders.gamestates; | |
| import com.badlogic.gdx.graphics.g2d.SpriteBatch; | |
| import com.badlogic.gdx.graphics.glutils.ShapeRenderer; | |
| import com.tcg.spaceinvaders.managers.GameStateManager; | |
| public abstract class GameState { | |
| protected GameStateManager gsm; | |
| public GameState(GameStateManager gsm) { | |
| this.gsm = gsm; | |
| init(); | |
| } | |
| protected abstract void init(); | |
| public abstract void handleInput(); | |
| public abstract void update(float dt); | |
| public abstract void draw(float dt, SpriteBatch sb, ShapeRenderer sr); | |
| public abstract void resize(int width, int height); | |
| public abstract void dispose(); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment