Create package brain, move everything there that memorizes data.
This commit is contained in:
parent
232411913d
commit
0afa327fda
@ -9,9 +9,9 @@ import java.awt.image.BufferStrategy;
|
||||
|
||||
import javax.swing.JFrame;
|
||||
|
||||
import de.teamteamteam.spacescooter.brain.GameConfig;
|
||||
import de.teamteamteam.spacescooter.control.Keyboard;
|
||||
import de.teamteamteam.spacescooter.screen.Screen;
|
||||
import de.teamteamteam.spacescooter.utility.GameConfig;
|
||||
|
||||
/**
|
||||
* The game will take place in this beautiful window.
|
||||
|
@ -3,12 +3,12 @@ package de.teamteamteam.spacescooter;
|
||||
import java.awt.EventQueue;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
|
||||
import de.teamteamteam.spacescooter.brain.GameConfig;
|
||||
import de.teamteamteam.spacescooter.screen.LoadingScreen;
|
||||
import de.teamteamteam.spacescooter.screen.Screen;
|
||||
import de.teamteamteam.spacescooter.screen.SuperScreen;
|
||||
import de.teamteamteam.spacescooter.thread.PaintThread;
|
||||
import de.teamteamteam.spacescooter.thread.UpdateThread;
|
||||
import de.teamteamteam.spacescooter.utility.GameConfig;
|
||||
import de.teamteamteam.spacescooter.utility.GraphicsSettings;
|
||||
import de.teamteamteam.spacescooter.utility.Loader;
|
||||
|
||||
|
@ -2,7 +2,7 @@ package de.teamteamteam.spacescooter.background;
|
||||
|
||||
import java.awt.Graphics2D;
|
||||
|
||||
import de.teamteamteam.spacescooter.utility.GameConfig;
|
||||
import de.teamteamteam.spacescooter.brain.GameConfig;
|
||||
|
||||
public class ScrollingBackground extends Background {
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
package de.teamteamteam.spacescooter.gui;
|
||||
package de.teamteamteam.spacescooter.brain;
|
||||
|
||||
/**
|
||||
* TODO: Intelligently merge this with Score class.
|
@ -1,4 +1,4 @@
|
||||
package de.teamteamteam.spacescooter.utility;
|
||||
package de.teamteamteam.spacescooter.brain;
|
||||
|
||||
/**
|
||||
* This static class contains important game configuration.
|
@ -1,4 +1,4 @@
|
||||
package de.teamteamteam.spacescooter.datastructure;
|
||||
package de.teamteamteam.spacescooter.brain;
|
||||
|
||||
/**
|
||||
* Score Class to represent the Player's Score
|
@ -1,4 +1,4 @@
|
||||
package de.teamteamteam.spacescooter.entity;
|
||||
package de.teamteamteam.spacescooter.brain;
|
||||
|
||||
/**
|
||||
* TODO: Rename and merge with other classes containing single static information.
|
@ -4,10 +4,10 @@ import java.awt.Color;
|
||||
import java.awt.Graphics2D;
|
||||
import java.awt.image.BufferedImage;
|
||||
|
||||
import de.teamteamteam.spacescooter.brain.GameConfig;
|
||||
import de.teamteamteam.spacescooter.entity.spi.Paintable;
|
||||
import de.teamteamteam.spacescooter.entity.spi.Updateable;
|
||||
import de.teamteamteam.spacescooter.screen.Screen;
|
||||
import de.teamteamteam.spacescooter.utility.GameConfig;
|
||||
import de.teamteamteam.spacescooter.utility.Loader;
|
||||
|
||||
/**
|
||||
|
@ -1,13 +1,12 @@
|
||||
package de.teamteamteam.spacescooter.entity;
|
||||
|
||||
import de.teamteamteam.spacescooter.datastructure.Score;
|
||||
|
||||
import de.teamteamteam.spacescooter.brain.Credits;
|
||||
import de.teamteamteam.spacescooter.brain.GameConfig;
|
||||
import de.teamteamteam.spacescooter.brain.Score;
|
||||
import de.teamteamteam.spacescooter.entity.enemy.Enemy;
|
||||
import de.teamteamteam.spacescooter.entity.shot.Shot;
|
||||
import de.teamteamteam.spacescooter.entity.spi.Collidable;
|
||||
import de.teamteamteam.spacescooter.entity.spi.Hittable;
|
||||
import de.teamteamteam.spacescooter.gui.Credits;
|
||||
import de.teamteamteam.spacescooter.utility.GameConfig;
|
||||
|
||||
/**
|
||||
* A LivingEntity is an Entity that is able to take damage and to collide with
|
||||
|
@ -2,13 +2,14 @@ package de.teamteamteam.spacescooter.entity;
|
||||
|
||||
import java.awt.event.KeyEvent;
|
||||
|
||||
import de.teamteamteam.spacescooter.brain.GameConfig;
|
||||
import de.teamteamteam.spacescooter.brain.StaticValue;
|
||||
import de.teamteamteam.spacescooter.control.Keyboard;
|
||||
import de.teamteamteam.spacescooter.control.KeyboardListener;
|
||||
import de.teamteamteam.spacescooter.entity.item.Item;
|
||||
import de.teamteamteam.spacescooter.entity.shot.Shot;
|
||||
import de.teamteamteam.spacescooter.entity.spi.Collidable;
|
||||
import de.teamteamteam.spacescooter.sound.SoundSystem;
|
||||
import de.teamteamteam.spacescooter.utility.GameConfig;
|
||||
|
||||
/**
|
||||
* Class that represents the Player, and handle all the KeyboardActions
|
||||
|
@ -1,8 +1,8 @@
|
||||
package de.teamteamteam.spacescooter.entity.enemy;
|
||||
|
||||
import de.teamteamteam.spacescooter.brain.GameConfig;
|
||||
import de.teamteamteam.spacescooter.entity.explosion.MultiExplosion;
|
||||
import de.teamteamteam.spacescooter.gui.BossBar;
|
||||
import de.teamteamteam.spacescooter.utility.GameConfig;
|
||||
import de.teamteamteam.spacescooter.utility.Random;
|
||||
|
||||
public class EnemyBoss extends Enemy{
|
||||
|
@ -1,10 +1,10 @@
|
||||
package de.teamteamteam.spacescooter.entity.enemy;
|
||||
|
||||
import de.teamteamteam.spacescooter.brain.GameConfig;
|
||||
import de.teamteamteam.spacescooter.entity.Player;
|
||||
import de.teamteamteam.spacescooter.entity.explosion.MultiExplosion;
|
||||
import de.teamteamteam.spacescooter.entity.item.Item;
|
||||
import de.teamteamteam.spacescooter.screen.GameScreen;
|
||||
import de.teamteamteam.spacescooter.utility.GameConfig;
|
||||
import de.teamteamteam.spacescooter.utility.Random;
|
||||
|
||||
public class EnemyThree extends Enemy{
|
||||
|
@ -1,7 +1,7 @@
|
||||
package de.teamteamteam.spacescooter.entity.enemy;
|
||||
|
||||
import de.teamteamteam.spacescooter.brain.GameConfig;
|
||||
import de.teamteamteam.spacescooter.entity.explosion.ExplosionTwo;
|
||||
import de.teamteamteam.spacescooter.utility.GameConfig;
|
||||
import de.teamteamteam.spacescooter.utility.Random;
|
||||
|
||||
public class EnemyTwo extends Enemy{
|
||||
|
@ -1,7 +1,7 @@
|
||||
package de.teamteamteam.spacescooter.entity.item;
|
||||
|
||||
import de.teamteamteam.spacescooter.brain.Credits;
|
||||
import de.teamteamteam.spacescooter.entity.Player;
|
||||
import de.teamteamteam.spacescooter.gui.Credits;
|
||||
|
||||
public class ItemCredit extends Item {
|
||||
|
||||
|
@ -1,11 +1,11 @@
|
||||
package de.teamteamteam.spacescooter.entity.shot;
|
||||
|
||||
import de.teamteamteam.spacescooter.brain.GameConfig;
|
||||
import de.teamteamteam.spacescooter.entity.CollidableEntity;
|
||||
import de.teamteamteam.spacescooter.entity.Player;
|
||||
import de.teamteamteam.spacescooter.entity.enemy.Enemy;
|
||||
import de.teamteamteam.spacescooter.entity.spi.Collidable;
|
||||
import de.teamteamteam.spacescooter.sound.SoundSystem;
|
||||
import de.teamteamteam.spacescooter.utility.GameConfig;
|
||||
import de.teamteamteam.spacescooter.utility.Random;
|
||||
|
||||
/**
|
||||
|
@ -5,7 +5,7 @@ import java.awt.Font;
|
||||
import java.awt.Graphics2D;
|
||||
|
||||
import de.teamteamteam.spacescooter.entity.Entity;
|
||||
import de.teamteamteam.spacescooter.datastructure.Score;
|
||||
import de.teamteamteam.spacescooter.brain.Score;
|
||||
|
||||
public class ScoreBar extends Entity {
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
package de.teamteamteam.spacescooter.level;
|
||||
|
||||
import de.teamteamteam.spacescooter.background.StarBackground;
|
||||
import de.teamteamteam.spacescooter.brain.GameConfig;
|
||||
import de.teamteamteam.spacescooter.entity.Entity;
|
||||
import de.teamteamteam.spacescooter.entity.Player;
|
||||
import de.teamteamteam.spacescooter.entity.enemy.EnemyBoss;
|
||||
@ -8,7 +9,6 @@ import de.teamteamteam.spacescooter.entity.enemy.EnemyOne;
|
||||
import de.teamteamteam.spacescooter.entity.enemy.EnemyThree;
|
||||
import de.teamteamteam.spacescooter.entity.enemy.EnemyTwo;
|
||||
import de.teamteamteam.spacescooter.screen.GameScreen;
|
||||
import de.teamteamteam.spacescooter.utility.GameConfig;
|
||||
import de.teamteamteam.spacescooter.utility.Loader;
|
||||
import de.teamteamteam.spacescooter.utility.Random;
|
||||
|
||||
|
@ -6,10 +6,10 @@ import java.awt.Graphics2D;
|
||||
import java.awt.event.KeyEvent;
|
||||
import java.awt.image.BufferedImage;
|
||||
|
||||
import de.teamteamteam.spacescooter.brain.GameConfig;
|
||||
import de.teamteamteam.spacescooter.control.Keyboard;
|
||||
import de.teamteamteam.spacescooter.entity.Player;
|
||||
import de.teamteamteam.spacescooter.gui.Button;
|
||||
import de.teamteamteam.spacescooter.utility.GameConfig;
|
||||
import de.teamteamteam.spacescooter.utility.Loader;
|
||||
|
||||
/**
|
||||
|
@ -6,10 +6,10 @@ import java.awt.Graphics2D;
|
||||
import java.awt.event.KeyEvent;
|
||||
import java.awt.image.BufferedImage;
|
||||
|
||||
import de.teamteamteam.spacescooter.brain.GameConfig;
|
||||
import de.teamteamteam.spacescooter.control.Keyboard;
|
||||
import de.teamteamteam.spacescooter.entity.Player;
|
||||
import de.teamteamteam.spacescooter.gui.Button;
|
||||
import de.teamteamteam.spacescooter.utility.GameConfig;
|
||||
import de.teamteamteam.spacescooter.utility.Loader;
|
||||
|
||||
/**
|
||||
|
@ -3,7 +3,8 @@ package de.teamteamteam.spacescooter.screen;
|
||||
import java.awt.Color;
|
||||
import java.awt.Font;
|
||||
import java.awt.Graphics2D;
|
||||
import de.teamteamteam.spacescooter.utility.GameConfig;
|
||||
|
||||
import de.teamteamteam.spacescooter.brain.GameConfig;
|
||||
|
||||
/**
|
||||
* This is the LoadingScreen, which is displayed when the game is started.
|
||||
|
@ -6,11 +6,11 @@ import java.awt.Graphics2D;
|
||||
import java.awt.event.KeyEvent;
|
||||
|
||||
import de.teamteamteam.spacescooter.background.StarBackground;
|
||||
import de.teamteamteam.spacescooter.brain.GameConfig;
|
||||
import de.teamteamteam.spacescooter.control.Keyboard;
|
||||
import de.teamteamteam.spacescooter.entity.Player;
|
||||
import de.teamteamteam.spacescooter.gui.Button;
|
||||
import de.teamteamteam.spacescooter.sound.SoundSystem;
|
||||
import de.teamteamteam.spacescooter.utility.GameConfig;
|
||||
|
||||
/**
|
||||
* This Screen show the games main menu.
|
||||
|
@ -6,13 +6,13 @@ import java.awt.Graphics2D;
|
||||
import java.awt.event.KeyEvent;
|
||||
import java.awt.image.BufferedImage;
|
||||
|
||||
import de.teamteamteam.spacescooter.brain.Credits;
|
||||
import de.teamteamteam.spacescooter.brain.GameConfig;
|
||||
import de.teamteamteam.spacescooter.brain.StaticValue;
|
||||
import de.teamteamteam.spacescooter.control.Keyboard;
|
||||
import de.teamteamteam.spacescooter.entity.Player;
|
||||
import de.teamteamteam.spacescooter.entity.StaticValue;
|
||||
import de.teamteamteam.spacescooter.gui.Button;
|
||||
import de.teamteamteam.spacescooter.gui.Credits;
|
||||
import de.teamteamteam.spacescooter.gui.ShopOffer;
|
||||
import de.teamteamteam.spacescooter.utility.GameConfig;
|
||||
import de.teamteamteam.spacescooter.utility.Loader;
|
||||
|
||||
public class ShopScreen extends Screen {
|
||||
|
@ -4,6 +4,8 @@ import java.awt.DisplayMode;
|
||||
import java.awt.GraphicsDevice;
|
||||
import java.awt.GraphicsEnvironment;
|
||||
|
||||
import de.teamteamteam.spacescooter.brain.GameConfig;
|
||||
|
||||
/**
|
||||
* GraphicsSettings allows to fetch the current graphical settings in order
|
||||
* to determine a sane refresh rate and the current screen resolution.
|
||||
|
@ -11,6 +11,7 @@ import javax.imageio.ImageIO;
|
||||
import javax.sound.sampled.AudioInputStream;
|
||||
import javax.sound.sampled.UnsupportedAudioFileException;
|
||||
|
||||
import de.teamteamteam.spacescooter.brain.GameConfig;
|
||||
import de.teamteamteam.spacescooter.level.LevelConfig;
|
||||
import de.teamteamteam.spacescooter.level.LevelConfigParser;
|
||||
import de.teamteamteam.spacescooter.screen.LoadingScreen;
|
||||
|
Loading…
Reference in New Issue
Block a user