parent
b91192e39b
commit
4daabe1411
@ -0,0 +1,38 @@
|
||||
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
|
||||
|
||||
/**
|
||||
* Write a description of class CurrentPlayerArrow here.
|
||||
*
|
||||
* @author (your name)
|
||||
* @version (a version number or a date)
|
||||
*/
|
||||
public class CurrentPlayerArrow extends Actor
|
||||
{
|
||||
/**
|
||||
* Act - do whatever the CurrentPlayerArrow wants to do. This method is called whenever
|
||||
* the 'Act' or 'Run' button gets pressed in the environment.
|
||||
*/
|
||||
public void act()
|
||||
{
|
||||
// Add your action code here.
|
||||
}
|
||||
|
||||
public void CurrentPlayerArrow(int currentPlayer, int playerNumber)
|
||||
{
|
||||
switch (currentPlayer) {
|
||||
case 1 :
|
||||
setLocation(120,100);
|
||||
break;
|
||||
case 2 :
|
||||
setLocation(120,100 + (825 / playerNumber));
|
||||
break;
|
||||
case 3 :
|
||||
setLocation(120,100 + (825 / playerNumber)*2);
|
||||
break;
|
||||
case 4 :
|
||||
setLocation(120,100 + (825 / playerNumber)*3);
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
|
||||
|
||||
/**
|
||||
* Write a description of class GUI_Ingame here.
|
||||
*
|
||||
* @author (your name)
|
||||
* @version (a version number or a date)
|
||||
*/
|
||||
public class GUI_Ingame extends World
|
||||
{
|
||||
|
||||
/**
|
||||
* Constructor for objects of class GUI_Ingame.
|
||||
*
|
||||
*/
|
||||
public GUI_Ingame()
|
||||
{
|
||||
// Createcells with a cell size of 1x1 pixels.
|
||||
super(1920, 1080, 1);
|
||||
addObject(Menue_Button,100,100);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 16 KiB |
Loading…
Reference in New Issue