import com.rupeng.game.GameCore;
public class Main implements Runnable {
public void run() {
GameCore.setGameSize(600, 700);
GameCore.createSprite(0, "mario");
for (int a = 2; a > 0;) {
for (int i = 0; i <= 500; i = i + 50)
{
GameCore.setSpritePosition(0, i, 0);
GameCore.setSpriteFlipX(0, true);
GameCore.playSpriteAnimate(0, "walk", true);
GameCore.pause(200);
// 0,500,100
}
for (int i = 50; i <= 600; i = i + 50)
{
GameCore.setSpritePosition(0, 500, i);
GameCore.setSpriteFlipX(0, true);
GameCore.playSpriteAnimate(0, "walk", true);
GameCore.pause(200);
// 0,500,600
}
for (int i = 450; i >= 0; i = i - 50)
{
GameCore.setSpritePosition(0, i, 600);
GameCore.setSpriteFlipX(0, false);
GameCore.playSpriteAnimate(0, "walk", true);
GameCore.pause(200);
// 0,0,600
}
for (int i = 550; i >= 0; i = i - 50)
{
GameCore.setSpritePosition(0, 0, i);
GameCore.setSpriteFlipX(0, false);
GameCore.playSpriteAnimate(0, "walk", true);
GameCore.pause(200);
}
}
}
public static void main(String[] args) {
GameCore.start(new Main());
}
}
public class Main implements Runnable {
public void run() {
GameCore.setGameSize(600, 700);
GameCore.createSprite(0, "mario");
for (int a = 2; a > 0;) {
for (int i = 0; i <= 500; i = i + 50)
{
GameCore.setSpritePosition(0, i, 0);
GameCore.setSpriteFlipX(0, true);
GameCore.playSpriteAnimate(0, "walk", true);
GameCore.pause(200);
// 0,500,100
}
for (int i = 50; i <= 600; i = i + 50)
{
GameCore.setSpritePosition(0, 500, i);
GameCore.setSpriteFlipX(0, true);
GameCore.playSpriteAnimate(0, "walk", true);
GameCore.pause(200);
// 0,500,600
}
for (int i = 450; i >= 0; i = i - 50)
{
GameCore.setSpritePosition(0, i, 600);
GameCore.setSpriteFlipX(0, false);
GameCore.playSpriteAnimate(0, "walk", true);
GameCore.pause(200);
// 0,0,600
}
for (int i = 550; i >= 0; i = i - 50)
{
GameCore.setSpritePosition(0, 0, i);
GameCore.setSpriteFlipX(0, false);
GameCore.playSpriteAnimate(0, "walk", true);
GameCore.pause(200);
}
}
}
public static void main(String[] args) {
GameCore.start(new Main());
}
}