changement de player et Effects

This commit is contained in:
2024-05-07 17:41:31 +02:00
parent 87a0d67ccb
commit 2dfd7b61c9
6 changed files with 72 additions and 7 deletions

View File

@@ -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;
}
}
}