import java.util.*; import java.awt.*; //public class object0 implements oo{ public class object0 extends object{ public Image oldimage; public Image l[]=new Image[16]; public object0(){ objnumber=0; methods[0]="hit"; } public void init(Global glbl){ objnumber=0; global=glbl; // User avatar image=global.show.user_front[0][global.PLAYERSTATE]; oldimage=image; } public Image getImage(){ image=null; if(global.PLAYERSTATE < 5) try{ if(oldimage != null && global.STEPP != 1) image=oldimage; // When sleeping / thinking there are no steps involved! if(global.PLAYERSTATE > 1)global.stap=0; if(global.dir==global.STEPP){ image=global.show.user_right[global.stap][global.PLAYERSTATE]; } if(global.dir==-global.STEPP){ image=global.show.user_left[global.stap][global.PLAYERSTATE]; } if(global.dir == global.WIDTH*global.STEPP){ image=global.show.user_front[global.stap][global.PLAYERSTATE]; } if(global.dir == -global.WIDTH*global.STEPP){ image=global.show.user_back[global.stap][global.PLAYERSTATE]; } if(image!=null) oldimage=image; if(image==null){ image=oldimage; } // // Sleep / eat / think / peeing // if(!global.PLAYBACK){ if(global.PLAYERSTATE > 2 ){ image=global.show.user_front[0][global.PLAYERSTATE]; } } }catch(Exception egege){} if( (image==null && oldimage==null) )image=global.show.user_front[0][0]; // return the animation part if(global.PLAYERIMAGE || global.PLAYERSTATE > 5){ image=global.player.getImage(); } return image; } // // -- // // -- public void execute(){ if(method.compareTo("hit")==0) hit(); } /* public void setMethod(String s){ method=s; } public String getRetval(){ return retval; } */ public void hit(){ } }