finally actually fixed the f*cking walking animation
This commit is contained in:
parent
10288383df
commit
97271b1480
@ -96,6 +96,9 @@ public class Person extends Cell {
|
|||||||
@Override
|
@Override
|
||||||
public void paint(Graphics2D g) {
|
public void paint(Graphics2D g) {
|
||||||
super.paint(g);
|
super.paint(g);
|
||||||
|
if (size == 0) {
|
||||||
|
isMoving = false;
|
||||||
|
}
|
||||||
if (isMoving) {
|
if (isMoving) {
|
||||||
switch (directionMoveLast) {
|
switch (directionMoveLast) {
|
||||||
case WindowOfFreeMove.KEY_LEFT:
|
case WindowOfFreeMove.KEY_LEFT:
|
||||||
|
|||||||
@ -71,7 +71,7 @@ public class WindowOfFreeMove extends JFrame {
|
|||||||
dialogBar.setBackground(Color.BLACK);
|
dialogBar.setBackground(Color.BLACK);
|
||||||
dialogBar.setVisible(false);
|
dialogBar.setVisible(false);
|
||||||
|
|
||||||
inputTimer = new Timer(17, new ActionListener() {
|
inputTimer = new Timer(10, new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent actionEvent) {
|
public void actionPerformed(ActionEvent actionEvent) {
|
||||||
if (!map.getPerson().getIsMoving()) {
|
if (!map.getPerson().getIsMoving()) {
|
||||||
@ -186,7 +186,7 @@ public class WindowOfFreeMove extends JFrame {
|
|||||||
//setCanPersonMove(false);
|
//setCanPersonMove(false);
|
||||||
// lp.add(jf, JLayeredPane.POPUP_LAYER);
|
// lp.add(jf, JLayeredPane.POPUP_LAYER);
|
||||||
|
|
||||||
timer = new Timer(13, new ActionListener() {
|
timer = new Timer(10, new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent actionEvent) {
|
public void actionPerformed(ActionEvent actionEvent) {
|
||||||
map.getPerson().move();
|
map.getPerson().move();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user