-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8120e5f
commit 3d4ceac
Showing
6 changed files
with
458 additions
and
580 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,44 @@ | ||
/* | ||
* The Seventh | ||
* see license.txt | ||
*/ | ||
package seventh.client.weapon; | ||
|
||
import seventh.client.entities.ClientPlayerEntity; | ||
import seventh.client.gfx.Art; | ||
import seventh.shared.WeaponConstants; | ||
|
||
/** | ||
* @author Tony | ||
* | ||
*/ | ||
public class ClientMP44 extends ClientWeapon { | ||
|
||
/** | ||
* @param owner | ||
*/ | ||
public ClientMP44(ClientPlayerEntity owner) { | ||
super(owner); | ||
|
||
this.weaponIcon = Art.mp44Icon; | ||
this.weaponImage = Art.mp44Image; | ||
this.muzzleFlash = Art.newMP44MuzzleFlash(); | ||
this.weaponWeight = WeaponConstants.MP44_WEIGHT; | ||
|
||
this.weaponKickTime = 100; | ||
this.endFireKick = 0f; | ||
this.beginFireKick = 6.2f; | ||
} | ||
|
||
// @Override | ||
// protected boolean onFire() { | ||
// return false; | ||
// } | ||
/* (non-Javadoc) | ||
* @see seventh.client.weapon.ClientWeapon#isAutomatic() | ||
*/ | ||
@Override | ||
public boolean isAutomatic() { | ||
return true; | ||
} | ||
|
||
public boolean isBurstFire() { | ||
return false; | ||
} | ||
} | ||
/* | ||
* The Seventh | ||
* see license.txt | ||
*/ | ||
package seventh.client.weapon; | ||
|
||
import seventh.client.entities.ClientPlayerEntity; | ||
import seventh.client.gfx.Art; | ||
import seventh.shared.WeaponConstants; | ||
|
||
/** | ||
* @author Tony | ||
* | ||
*/ | ||
public class ClientMP44 extends ClientWeapon { | ||
|
||
/** | ||
* @param owner | ||
*/ | ||
public ClientMP44(ClientPlayerEntity owner) { | ||
super(owner); | ||
|
||
this.weaponIcon = Art.mp44Icon; | ||
this.weaponImage = Art.mp44Image; | ||
this.muzzleFlash = Art.newMP44MuzzleFlash(); | ||
this.weaponWeight = WeaponConstants.MP44_WEIGHT; | ||
|
||
this.weaponKickTime = 100; | ||
this.endFireKick = 0f; | ||
this.beginFireKick = 6.2f; | ||
} | ||
|
||
/* (non-Javadoc) | ||
* @see seventh.client.weapon.ClientWeapon#isAutomatic() | ||
*/ | ||
@Override | ||
public boolean isAutomatic() { | ||
return true; | ||
} | ||
|
||
public boolean isBurstFire() { | ||
return false; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,74 +1,48 @@ | ||
/* | ||
* see license.txt | ||
*/ | ||
package seventh.client.weapon; | ||
|
||
import seventh.client.entities.ClientPlayerEntity; | ||
import seventh.client.gfx.Art; | ||
import seventh.game.weapons.Weapon.WeaponState; | ||
import seventh.shared.TimeStep; | ||
import seventh.shared.WeaponConstants; | ||
|
||
/** | ||
* @author Tony | ||
* | ||
*/ | ||
public class ClientRisker extends ClientWeapon { | ||
|
||
private final long weaponTime = 1300; | ||
private long timer; | ||
|
||
/** | ||
* @param ownerId | ||
*/ | ||
public ClientRisker(ClientPlayerEntity owner) { | ||
super(owner); | ||
|
||
this.weaponIcon = Art.riskerIcon; | ||
// this.weaponImage = Art.sniperRifleImage; | ||
this.weaponImage = Art.riskerImage; | ||
this.muzzleFlash = Art.newRiskerMuzzleFlash(); | ||
this.weaponWeight = WeaponConstants.RISKER_WEIGHT; | ||
|
||
this.weaponKickTime = 280; | ||
this.endFireKick = 10.7f; | ||
this.beginFireKick = 0f; | ||
} | ||
|
||
/* (non-Javadoc) | ||
* @see palisma.client.weapon.ClientWeapon#update(leola.live.TimeStep) | ||
*/ | ||
@Override | ||
public void update(TimeStep timeStep) { | ||
super.update(timeStep); | ||
|
||
if(getState() == WeaponState.READY) { | ||
timer = -1; | ||
} | ||
|
||
timer -= timeStep.getDeltaTime(); | ||
|
||
if(getState() == WeaponState.FIRING) { | ||
if(timer<=0) { | ||
timer = weaponTime; | ||
//Sounds.startPlaySound(fireSound, channelId); | ||
} | ||
} | ||
} | ||
|
||
/* (non-Javadoc) | ||
* @see seventh.client.weapon.ClientWeapon#isBurstFire() | ||
*/ | ||
@Override | ||
public boolean isBurstFire() { | ||
return true; | ||
} | ||
|
||
/* (non-Javadoc) | ||
* @see palisma.client.weapon.ClientWeapon#onFire() | ||
*/ | ||
@Override | ||
protected boolean onFire() { | ||
return true; | ||
} | ||
} | ||
/* | ||
* see license.txt | ||
*/ | ||
package seventh.client.weapon; | ||
|
||
import seventh.client.entities.ClientPlayerEntity; | ||
import seventh.client.gfx.Art; | ||
import seventh.shared.WeaponConstants; | ||
|
||
/** | ||
* @author Tony | ||
* | ||
*/ | ||
public class ClientRisker extends ClientWeapon { | ||
|
||
/** | ||
* @param ownerId | ||
*/ | ||
public ClientRisker(ClientPlayerEntity owner) { | ||
super(owner); | ||
|
||
this.weaponIcon = Art.riskerIcon; | ||
// this.weaponImage = Art.sniperRifleImage; | ||
this.weaponImage = Art.riskerImage; | ||
this.muzzleFlash = Art.newRiskerMuzzleFlash(); | ||
this.weaponWeight = WeaponConstants.RISKER_WEIGHT; | ||
|
||
this.weaponKickTime = 280; | ||
this.endFireKick = 10.7f; | ||
this.beginFireKick = 0f; | ||
} | ||
|
||
/* (non-Javadoc) | ||
* @see seventh.client.weapon.ClientWeapon#isBurstFire() | ||
*/ | ||
@Override | ||
public boolean isBurstFire() { | ||
return true; | ||
} | ||
|
||
/* (non-Javadoc) | ||
* @see palisma.client.weapon.ClientWeapon#onFire() | ||
*/ | ||
@Override | ||
protected boolean onFire() { | ||
return true; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,72 +1,46 @@ | ||
/* | ||
* see license.txt | ||
*/ | ||
package seventh.client.weapon; | ||
|
||
import seventh.client.entities.ClientPlayerEntity; | ||
import seventh.client.gfx.Art; | ||
import seventh.game.weapons.Weapon.WeaponState; | ||
import seventh.shared.TimeStep; | ||
import seventh.shared.WeaponConstants; | ||
|
||
/** | ||
* @author Tony | ||
* | ||
*/ | ||
public class ClientShotgun extends ClientWeapon { | ||
|
||
private final long weaponTime = 1300; | ||
private long timer; | ||
|
||
/** | ||
* @param ownerId | ||
*/ | ||
public ClientShotgun(ClientPlayerEntity owner) { | ||
super(owner); | ||
this.weaponIcon = Art.shotgunIcon; | ||
this.weaponImage = Art.shotgunImage; | ||
this.muzzleFlash = Art.newShotgunMuzzleFlash(); | ||
this.weaponWeight = WeaponConstants.SHOTGUN_WEIGHT; | ||
|
||
this.weaponKickTime = 66; | ||
this.endFireKick = 18.7f; | ||
this.beginFireKick = 0f; | ||
} | ||
|
||
/* (non-Javadoc) | ||
* @see palisma.client.weapon.ClientWeapon#update(leola.live.TimeStep) | ||
*/ | ||
@Override | ||
public void update(TimeStep timeStep) { | ||
super.update(timeStep); | ||
|
||
if(getState() == WeaponState.READY) { | ||
timer = -1; | ||
} | ||
|
||
timer -= timeStep.getDeltaTime(); | ||
|
||
if(getState() == WeaponState.FIRING) { | ||
if(timer<=0) { | ||
timer = weaponTime; | ||
// Sounds.startPlaySound(fireSound, channelId, this.); | ||
} | ||
} | ||
} | ||
|
||
/* (non-Javadoc) | ||
* @see palisma.client.weapon.ClientWeapon#onFire() | ||
*/ | ||
@Override | ||
protected boolean onFire() { | ||
return true; | ||
} | ||
|
||
/* (non-Javadoc) | ||
* @see seventh.client.weapon.ClientWeapon#isPumpAction() | ||
*/ | ||
@Override | ||
public boolean isPumpAction() { | ||
return true; | ||
} | ||
} | ||
/* | ||
* see license.txt | ||
*/ | ||
package seventh.client.weapon; | ||
|
||
import seventh.client.entities.ClientPlayerEntity; | ||
import seventh.client.gfx.Art; | ||
import seventh.shared.WeaponConstants; | ||
|
||
/** | ||
* @author Tony | ||
* | ||
*/ | ||
public class ClientShotgun extends ClientWeapon { | ||
|
||
/** | ||
* @param ownerId | ||
*/ | ||
public ClientShotgun(ClientPlayerEntity owner) { | ||
super(owner); | ||
this.weaponIcon = Art.shotgunIcon; | ||
this.weaponImage = Art.shotgunImage; | ||
this.muzzleFlash = Art.newShotgunMuzzleFlash(); | ||
this.weaponWeight = WeaponConstants.SHOTGUN_WEIGHT; | ||
|
||
this.weaponKickTime = 66; | ||
this.endFireKick = 18.7f; | ||
this.beginFireKick = 0f; | ||
} | ||
|
||
/* (non-Javadoc) | ||
* @see palisma.client.weapon.ClientWeapon#onFire() | ||
*/ | ||
@Override | ||
protected boolean onFire() { | ||
return true; | ||
} | ||
|
||
/* (non-Javadoc) | ||
* @see seventh.client.weapon.ClientWeapon#isPumpAction() | ||
*/ | ||
@Override | ||
public boolean isPumpAction() { | ||
return true; | ||
} | ||
} |
Oops, something went wrong.