Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import com.anim8.stats.health;
- public class character {
- static renderer rend = new renderer();
- static randomGen rand = new randomGen();
- private static int charX, charY;
- private static int charBoundsX = 320;
- private static int charBoundsY = 343;
- public static int getCharX(){
- return charX;
- }
- public static int getCharY(){
- return charY;
- }
- private static boolean charSunglasses = false;
- private static int moveSpeed = 1;
- private static int maxTimer = 100;
- private static Boolean youCanMove = false;
- static timerUpdate tu = new timerUpdate();
- public static void canIMove(){
- if(tu.updateTimer(moveSpeed, maxTimer)==true){
- moveCharacter();
- }
- }
- public static void moveCharacter(){
- charX = rand.getRandomNumber(charBoundsX);
- charY = rand.getRandomNumber(charBoundsY);
- }
- public static void updateCharacter(){
- if(charSunglasses == true){
- rend.readyTexture("sunglasses");
- } else {
- rend.readyTexture("normal");
- }
- rend.tileRender(charX,charY,2);
- //health.getHealth();
- }
- public static void drawCharacter(){
- mousePos mouse = new mousePos();
- //charX = (int) mouse.mousePosX();
- //charY = (int) mouse.mousePosY();
- updateCharacter();
- canIMove();
- System.out.println("Time: " + main.getTime());
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment