mirror of
https://github.com/Cpt-Adok/SNAKE.git
synced 2026-01-25 11:34:06 +00:00
changement de player et Effects
This commit is contained in:
@@ -1,5 +1,30 @@
|
||||
package Personnages;
|
||||
|
||||
public class Player extends Personnage {
|
||||
|
||||
public Player(int size, int[] coordinate) {
|
||||
super(size, coordinate);
|
||||
}
|
||||
|
||||
public void moveCoordinate(int keys) {
|
||||
switch (keys) {
|
||||
case 77: // w
|
||||
this.coordinate[1]++;
|
||||
break;
|
||||
|
||||
case 73: // s
|
||||
this.coordinate[1]--;
|
||||
break;
|
||||
|
||||
case 61: // a
|
||||
this.coordinate[0]--;
|
||||
break;
|
||||
|
||||
case 64: // d
|
||||
this.coordinate[0]++;
|
||||
break;
|
||||
|
||||
default: // autre
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user