Colors
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package model;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
|
||||
@@ -7,12 +8,13 @@ import javax.swing.Timer;
|
||||
|
||||
import view.GameView;
|
||||
import control.GameStateManager;
|
||||
import control.button.ButtonHandler;
|
||||
|
||||
public class GameModel implements ActionListener{
|
||||
|
||||
GameView view;
|
||||
Timer update;
|
||||
|
||||
public static Color[] colors = {Color.MAGENTA,Color.RED,Color.GREEN,Color.YELLOW,Color.CYAN,Color.BLUE};
|
||||
GameStateManager gsm;
|
||||
|
||||
public GameModel(GameView view,GameStateManager gsm)
|
||||
@@ -21,6 +23,10 @@ public class GameModel implements ActionListener{
|
||||
this.gsm = gsm;
|
||||
update = new Timer(1000/30, this);
|
||||
update.start();
|
||||
|
||||
for(int i = 1; i < ButtonHandler.getButtons().size(); i++){
|
||||
ButtonHandler.getButtons().get(i).setColor(colors[i-1]);;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user