package bmp; import javax.microedition.lcdui.*; import javax.microedition.lcdui.game.*; /* Author: Writer */ /*Класс бота.*/ public class Bot extends Sprite { static int bot_x = 150; static int bot_y = 150; static int[] frameSequence = {0,1,2,3}; public Bot(Image sprite) { super(sprite,40,40); setFrameSequence(frameSequence); setFrame(0); setPosition(bot_x, bot_y); } public void bot_up() {setFrame(1);bot_y-=1;} public void bot_down() {setFrame(0);bot_y+=1;} public void bot_right() {setFrame(3);bot_x+=1;} public void bot_left() {setFrame(2);bot_y+=1;} }