public override int[] DrawIndexes(Direction dir,WeaponDescriptor weapon) { BodyPart p1,p2,p3,p4; p2=torso; p3=legs; if(weapon==null) { if((int)dir<4) { p1=leftArm; p4=rightArm; } else { p1=rightArm; p4=leftArm; } } else { // if((int)dir>=6 || (int)dir==0) // weapon[dir].DrawFast(target,x,y+offset,width,height); if(weapon.NumHands==1) { if((int)dir<4) { p1=leftArm; p4=rightArmed1; } else { p1=rightArmed1; p4=leftArm; } } else { if((int)dir<4) { p1=leftArmed2; p4=rightArmed2; } else { p1=rightArmed2; p4=leftArmed2; } } // if((int)dir>=1 && (int)dir<6) // weapon[dir].DrawFast(target,x,y+offset,width,height); } return new int[]{ p1.Stationary[dir], p2.Stationary[dir], p3.Stationary[dir], p4.Stationary[dir]}; }
public override int[] DrawIndexes(Direction dir, WeaponDescriptor weapon) { return new int[]{ north[(int)dir], south[(int)dir], east[(int)dir], west[(int)dir] }; }
public int[] DrawIndexes(Direction dir, WeaponDescriptor weapon,int frame) { return new int[]{ north[dir,frame], south[dir,frame], east[dir,frame], west[dir,frame] }; }
public void DrawFast(Surface target,int x, int y,int width,int height,Direction dir,WeaponDescriptor weapon) { if(weapon==null) { if((int)dir<4) { leftArm.Stationary[dir].DrawFast(target,x,y,width,height); torso.Stationary[dir].DrawFast(target,x,y,width,height); legs.Stationary[dir].DrawFast(target,x,y,width,height); rightArm.Stationary[dir].DrawFast(target,x,y,width,height); } else { rightArm.Stationary[dir].DrawFast(target,x,y,width,height); torso.Stationary[dir].DrawFast(target,x,y,width,height); legs.Stationary[dir].DrawFast(target,x,y,width,height); leftArm.Stationary[dir].DrawFast(target,x,y,width,height); } } else { if((int)dir>=6 || (int)dir==0) weapon[dir].DrawFast(target,x,y+offset,width,height); if(weapon.OneHanded) { if((int)dir<4) { leftArm.Stationary[dir].DrawFast(target,x,y,width,height); torso.Stationary[dir].DrawFast(target,x,y,width,height); legs.Stationary[dir].DrawFast(target,x,y,width,height); rightArmed1.Stationary[dir].DrawFast(target,x,y,width,height); } else { rightArmed1.Stationary[dir].DrawFast(target,x,y,width,height); torso.Stationary[dir].DrawFast(target,x,y,width,height); legs.Stationary[dir].DrawFast(target,x,y,width,height); leftArm.Stationary[dir].DrawFast(target,x,y,width,height); } } else { if((int)dir<4) { leftArmed2.Stationary[dir].DrawFast(target,x,y,width,height); torso.Stationary[dir].DrawFast(target,x,y,width,height); legs.Stationary[dir].DrawFast(target,x,y,width,height); rightArmed2.Stationary[dir].DrawFast(target,x,y,width,height); } else { rightArmed2.Stationary[dir].DrawFast(target,x,y,width,height); torso.Stationary[dir].DrawFast(target,x,y,width,height); legs.Stationary[dir].DrawFast(target,x,y,width,height); leftArmed2.Stationary[dir].DrawFast(target,x,y,width,height); } } if((int)dir>=1 && (int)dir<6) weapon[dir].DrawFast(target,x,y+offset,width,height); } }
public void DrawFast(Surface target, int x, int y, int width, int height, Direction dir, WeaponDescriptor weapon) { if (weapon == null) { if ((int)dir < 4) { leftArm.Stationary[dir].DrawFast(target, x, y, width, height); torso.Stationary[dir].DrawFast(target, x, y, width, height); legs.Stationary[dir].DrawFast(target, x, y, width, height); rightArm.Stationary[dir].DrawFast(target, x, y, width, height); } else { rightArm.Stationary[dir].DrawFast(target, x, y, width, height); torso.Stationary[dir].DrawFast(target, x, y, width, height); legs.Stationary[dir].DrawFast(target, x, y, width, height); leftArm.Stationary[dir].DrawFast(target, x, y, width, height); } } else { if ((int)dir >= 6 || (int)dir == 0) { weapon[dir].DrawFast(target, x, y + offset, width, height); } if (weapon.OneHanded) { if ((int)dir < 4) { leftArm.Stationary[dir].DrawFast(target, x, y, width, height); torso.Stationary[dir].DrawFast(target, x, y, width, height); legs.Stationary[dir].DrawFast(target, x, y, width, height); rightArmed1.Stationary[dir].DrawFast(target, x, y, width, height); } else { rightArmed1.Stationary[dir].DrawFast(target, x, y, width, height); torso.Stationary[dir].DrawFast(target, x, y, width, height); legs.Stationary[dir].DrawFast(target, x, y, width, height); leftArm.Stationary[dir].DrawFast(target, x, y, width, height); } } else { if ((int)dir < 4) { leftArmed2.Stationary[dir].DrawFast(target, x, y, width, height); torso.Stationary[dir].DrawFast(target, x, y, width, height); legs.Stationary[dir].DrawFast(target, x, y, width, height); rightArmed2.Stationary[dir].DrawFast(target, x, y, width, height); } else { rightArmed2.Stationary[dir].DrawFast(target, x, y, width, height); torso.Stationary[dir].DrawFast(target, x, y, width, height); legs.Stationary[dir].DrawFast(target, x, y, width, height); leftArmed2.Stationary[dir].DrawFast(target, x, y, width, height); } } if ((int)dir >= 1 && (int)dir < 6) { weapon[dir].DrawFast(target, x, y + offset, width, height); } } }
public override int[] DrawIndexes(Direction dir, WeaponDescriptor weapon) { return new int[]{body.Stationary[dir]}; }
public override int[] DrawIndexes(Direction dir, WeaponDescriptor weapon) { return(new int[] { body.Stationary[dir] }); }
public void DrawFast(Surface target, int x, int y, int width, int height, bool underwater, bool male, bool isZombie, bool flying, bool crouch, WeaponDescriptor weapon, Direction dir) { BodyPart head = torso; BodyPart legs = this.legs; int offset = 0; if (flyable) { head = flyHead; if (flying) { legs = flyLegs; } } else if (underwater) { if (isZombie) { if (zombie) { head = zombieHead; } } else { head = torso; } } else { if (isZombie) { if (zombie) { head = zombieHead; } } else if (male) { head = maleHead; } else { head = femHead; } } if (crouch) { legs = crouchLegs; offset = 5; } if (weapon == null) { if ((int)dir < 4) { leftArm.Stationary[dir].DrawFast(target, x, y + offset, width, height); legs.Stationary[dir].DrawFast(target, x, y, width, height); head.Stationary[dir].DrawFast(target, x, y + offset, width, height); rightArm.Stationary[dir].DrawFast(target, x, y + offset, width, height); } else { rightArm.Stationary[dir].DrawFast(target, x, y + offset, width, height); legs.Stationary[dir].DrawFast(target, x, y, width, height); head.Stationary[dir].DrawFast(target, x, y + offset, width, height); leftArm.Stationary[dir].DrawFast(target, x, y + offset, width, height); } } else { if ((int)dir >= 6 || (int)dir == 0) { weapon[dir].DrawFast(target, x, y + offset, width, height); } if (weapon.OneHanded) { if ((int)dir < 4) { leftArm.Stationary[dir].DrawFast(target, x, y + offset, width, height); legs.Stationary[dir].DrawFast(target, x, y, width, height); head.Stationary[dir].DrawFast(target, x, y + offset, width, height); rightArmed1.Stationary[dir].DrawFast(target, x, y + offset, width, height); } else { rightArmed1.Stationary[dir].DrawFast(target, x, y + offset, width, height); legs.Stationary[dir].DrawFast(target, x, y, width, height); head.Stationary[dir].DrawFast(target, x, y + offset, width, height); leftArm.Stationary[dir].DrawFast(target, x, y + offset, width, height); } } else { if ((int)dir < 4) { leftArmed2.Stationary[dir].DrawFast(target, x, y + offset, width, height); legs.Stationary[dir].DrawFast(target, x, y, width, height); head.Stationary[dir].DrawFast(target, x, y + offset, width, height); rightArmed2.Stationary[dir].DrawFast(target, x, y + offset, width, height); } else { rightArmed2.Stationary[dir].DrawFast(target, x, y + offset, width, height); legs.Stationary[dir].DrawFast(target, x, y, width, height); head.Stationary[dir].DrawFast(target, x, y + offset, width, height); leftArmed2.Stationary[dir].DrawFast(target, x, y + offset, width, height); } } if ((int)dir >= 1 && (int)dir < 6) { weapon[dir].DrawFast(target, x, y + offset, width, height); } } }
public override int[] DrawIndexes(Direction dir,WeaponDescriptor weapon) { return new int[]{notMoving[dir]}; }
public int[] DrawIndexes(Direction dir, WeaponDescriptor weapon, bool flying, bool underwater, bool isZombie, bool male, bool crouch) { BodyPart p1, p2, p3, p4; BodyPart head = torso; BodyPart legs = this.legs; if (flyable) { head = flyHead; if (flying) { legs = flyLegs; } } else if (underwater) { if (isZombie) { if (zombie) { head = zombieHead; } } else { head = torso; } } else { if (isZombie) { if (zombie) { head = zombieHead; } } else if (male) { head = maleHead; } else { head = femHead; } } if (crouch) { legs = crouchLegs; //offset=5; } p2 = legs; p3 = head; if (weapon == null) { if ((int)dir < 4) { p1 = leftArm; //.Stationary[dir].DrawFast(target,x,y+offset,width,height); p4 = rightArm; //.Stationary[dir].DrawFast(target,x,y+offset,width,height); } else { p1 = rightArm; //.Stationary[dir].DrawFast(target,x,y+offset,width,height); p4 = leftArm; //.Stationary[dir].DrawFast(target,x,y+offset,width,height); } } else { // if((int)dir>=6 || (int)dir==0) // weapon[dir].DrawFast(target,x,y+offset,width,height); if (weapon.NumHands == 1) { if ((int)dir < 4) { p1 = leftArm; //.Stationary[dir].DrawFast(target,x,y+offset,width,height); p4 = rightArmed1; //.Stationary[dir].DrawFast(target,x,y+offset,width,height); } else { p1 = rightArmed1; //.Stationary[dir].DrawFast(target,x,y+offset,width,height); p4 = leftArm; //.Stationary[dir].DrawFast(target,x,y+offset,width,height); } } else { if ((int)dir < 4) { p1 = leftArmed2; //.Stationary[dir].DrawFast(target,x,y+offset,width,height); p4 = rightArmed2; //.Stationary[dir].DrawFast(target,x,y+offset,width,height); } else { p1 = rightArmed2; //.Stationary[dir].DrawFast(target,x,y+offset,width,height); p4 = leftArmed2; //.Stationary[dir].DrawFast(target,x,y+offset,width,height); } } // if((int)dir>=1 && (int)dir<6) // weapon[dir].DrawFast(target,x,y+offset,width,height); } return(new int[] { p1.Stationary[dir], p2.Stationary[dir], p3.Stationary[dir], p4.Stationary[dir] }); }
public override int[] DrawIndexes(Direction dir, WeaponDescriptor weapon) { return(new int[] { notMoving[dir] }); }
public void DrawFast(Surface target,int x, int y,int width,int height,bool underwater,bool male,bool isZombie,bool flying,bool crouch,WeaponDescriptor weapon,Direction dir) { BodyPart head=torso; BodyPart legs=this.legs; int offset=0; if(flyable) { head = flyHead; if(flying) legs=flyLegs; } else if(underwater) { if(isZombie) { if(zombie) head=zombieHead; } else head=torso; } else { if(isZombie) { if(zombie) head=zombieHead; } else if(male) head=maleHead; else head=femHead; } if(crouch) { legs=crouchLegs; offset=5; } if(weapon==null) { if((int)dir<4) { leftArm.Stationary[dir].DrawFast(target,x,y+offset,width,height); legs.Stationary[dir].DrawFast(target,x,y,width,height); head.Stationary[dir].DrawFast(target,x,y+offset,width,height); rightArm.Stationary[dir].DrawFast(target,x,y+offset,width,height); } else { rightArm.Stationary[dir].DrawFast(target,x,y+offset,width,height); legs.Stationary[dir].DrawFast(target,x,y,width,height); head.Stationary[dir].DrawFast(target,x,y+offset,width,height); leftArm.Stationary[dir].DrawFast(target,x,y+offset,width,height); } } else { if((int)dir>=6 || (int)dir==0) weapon[dir].DrawFast(target,x,y+offset,width,height); if(weapon.OneHanded) { if((int)dir<4) { leftArm.Stationary[dir].DrawFast(target,x,y+offset,width,height); legs.Stationary[dir].DrawFast(target,x,y,width,height); head.Stationary[dir].DrawFast(target,x,y+offset,width,height); rightArmed1.Stationary[dir].DrawFast(target,x,y+offset,width,height); } else { rightArmed1.Stationary[dir].DrawFast(target,x,y+offset,width,height); legs.Stationary[dir].DrawFast(target,x,y,width,height); head.Stationary[dir].DrawFast(target,x,y+offset,width,height); leftArm.Stationary[dir].DrawFast(target,x,y+offset,width,height); } } else { if((int)dir<4) { leftArmed2.Stationary[dir].DrawFast(target,x,y+offset,width,height); legs.Stationary[dir].DrawFast(target,x,y,width,height); head.Stationary[dir].DrawFast(target,x,y+offset,width,height); rightArmed2.Stationary[dir].DrawFast(target,x,y+offset,width,height); } else { rightArmed2.Stationary[dir].DrawFast(target,x,y+offset,width,height); legs.Stationary[dir].DrawFast(target,x,y,width,height); head.Stationary[dir].DrawFast(target,x,y+offset,width,height); leftArmed2.Stationary[dir].DrawFast(target,x,y+offset,width,height); } } if((int)dir>=1 && (int)dir<6) weapon[dir].DrawFast(target,x,y+offset,width,height); } }
public override int[] DrawIndexes(Direction dir, WeaponDescriptor weapon) { return DrawIndexes(dir,weapon,false,true,false,true,false); }
public int[] DrawIndexes(Direction dir, WeaponDescriptor weapon, bool flying, bool underwater, bool isZombie,bool male,bool crouch) { BodyPart p1,p2,p3,p4; BodyPart head=torso; BodyPart legs=this.legs; if(flyable) { head = flyHead; if(flying) legs=flyLegs; } else if(underwater) { if(isZombie) { if(zombie) head=zombieHead; } else head=torso; } else { if(isZombie) { if(zombie) head=zombieHead; } else if(male) head=maleHead; else head=femHead; } if(crouch) { legs=crouchLegs; //offset=5; } p2=legs; p3=head; if(weapon==null) { if((int)dir<4) { p1=leftArm;//.Stationary[dir].DrawFast(target,x,y+offset,width,height); p4=rightArm;//.Stationary[dir].DrawFast(target,x,y+offset,width,height); } else { p1=rightArm;//.Stationary[dir].DrawFast(target,x,y+offset,width,height); p4=leftArm;//.Stationary[dir].DrawFast(target,x,y+offset,width,height); } } else { // if((int)dir>=6 || (int)dir==0) // weapon[dir].DrawFast(target,x,y+offset,width,height); if(weapon.NumHands==1) { if((int)dir<4) { p1=leftArm;//.Stationary[dir].DrawFast(target,x,y+offset,width,height); p4=rightArmed1;//.Stationary[dir].DrawFast(target,x,y+offset,width,height); } else { p1=rightArmed1;//.Stationary[dir].DrawFast(target,x,y+offset,width,height); p4=leftArm;//.Stationary[dir].DrawFast(target,x,y+offset,width,height); } } else { if((int)dir<4) { p1=leftArmed2;//.Stationary[dir].DrawFast(target,x,y+offset,width,height); p4=rightArmed2;//.Stationary[dir].DrawFast(target,x,y+offset,width,height); } else { p1=rightArmed2;//.Stationary[dir].DrawFast(target,x,y+offset,width,height); p4=leftArmed2;//.Stationary[dir].DrawFast(target,x,y+offset,width,height); } } // if((int)dir>=1 && (int)dir<6) // weapon[dir].DrawFast(target,x,y+offset,width,height); } return new int[]{ p1.Stationary[dir], p2.Stationary[dir], p3.Stationary[dir], p4.Stationary[dir]}; }
public override int[] DrawIndexes(Direction dir, WeaponDescriptor weapon) { return(DrawIndexes(dir, weapon, false, true, false, true, false)); }
public override int[] DrawIndexes(Direction dir, WeaponDescriptor weapon) { return(new int[] { images[(int)dir] }); }
public override int[] DrawIndexes(Direction dir, WeaponDescriptor weapon) { return new int[]{images[(int)dir]}; }