finally actually fixed the f*cking walking animation

This commit is contained in:
musilto9 2020-03-04 13:00:53 +01:00
parent 10288383df
commit 97271b1480
2 changed files with 5 additions and 2 deletions

View File

@ -96,6 +96,9 @@ public class Person extends Cell {
@Override
public void paint(Graphics2D g) {
super.paint(g);
if (size == 0) {
isMoving = false;
}
if (isMoving) {
switch (directionMoveLast) {
case WindowOfFreeMove.KEY_LEFT:

View File

@ -71,7 +71,7 @@ public class WindowOfFreeMove extends JFrame {
dialogBar.setBackground(Color.BLACK);
dialogBar.setVisible(false);
inputTimer = new Timer(17, new ActionListener() {
inputTimer = new Timer(10, new ActionListener() {
@Override
public void actionPerformed(ActionEvent actionEvent) {
if (!map.getPerson().getIsMoving()) {
@ -186,7 +186,7 @@ public class WindowOfFreeMove extends JFrame {
//setCanPersonMove(false);
// lp.add(jf, JLayeredPane.POPUP_LAYER);
timer = new Timer(13, new ActionListener() {
timer = new Timer(10, new ActionListener() {
@Override
public void actionPerformed(ActionEvent actionEvent) {
map.getPerson().move();