Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames

Gameplay.AntiAircraftWeapon


00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
class AntiAircraftWeapon extends TurretWeapon;

var (AntiAircraftWeapon) float energyUsage;

function useAmmo()
{
	rookMotor.useEnergy(energyUsage);
}

simulated function bool hasAmmo()
{
	return true;
}

simulated function bool canFire()
{
	return rookMotor.getEnergy() > energyUsage;
}

simulated protected function FireWeapon()
{
	// alternate fire animation
	if (fireAnimation == 'Fire1')
		fireAnimation = 'Fire2';
	else
		fireAnimation = 'Fire1';

	// alternate projectile mesh

	Super.FireWeapon();
}

simulated function onThirdPersonFireCount()
{
	// Alternate fire animation. This may potentially get out of sync with the server. I am assuming that we
	// can live with this. Otherwise perhaps select animation based on fire count.
	if (fireAnimation == 'Fire1')
		fireAnimation = 'Fire2';
	else
		fireAnimation = 'Fire1';

	Super.onThirdPersonFireCount();
}

defaultproperties
{
	firstPersonMesh = Mesh'Weapons.TurretBuggyFPS'
	firstPersonOffset = (X=0,Y=0,Z=0)

	roundsPerSecond = 2
	ammoCount = 200
	ammoUsage = 1

	projectileClass = class'AntiAircraftProjectile'
	projectileVelocity = 2600
	projectileInheritedVelFactor = 0.5

	aimClass = class'AimProjectileWeapons'

	energyUsage = 20

	bFirstPersonUseTrace = false

	fireAnimation = Fire1
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: ne 5.9.2004 15:53:10.000 - Creation time: st 23.5.2018 00:10:42.283 - Created with UnCodeX