2DShooterWeaponSystem  1.9.0
WeaponSystemConfiguration Class Reference

Data class for weapon configurations held by the main WeaponSystem component. More...

Public Attributes

string weaponName
 
float bulletSpread
 
float bulletSpreadPingPongMax
 
float spreadPingPongSpeed = 1f
 
float bulletSpacing
 
int bulletCount
 
float bulletRandomness
 
float bulletSpeed
 
float weaponFireRate
 
float weaponXOffset
 
float weaponYOffset
 
float ricochetChancePercent
 
float magazineChangeDelay
 
Color bulletColour = Color.white
 
Texture2D weaponIcon
 
int magazineSize
 
int magazineRemainingBullets
 
int ammoAvailable
 
int ammoUsed
 
bool autoFire
 
bool bulletCountsAsAmmo
 
bool playReloadingSfx
 
bool weaponRelativeToComponent
 
float trackingTurnRate
 
bool lerpTurnRate
 
float circularFireRotationRate
 
bool circularFireMode
 
Transform targetToTrack
 
AudioClip reloadSfxClip
 
Transform gunPoint
 
WeaponSystem.ShooterType ShooterType
 
WeaponSystem.BulletOption BulletOptionType
 

Detailed Description

Data class for weapon configurations held by the main WeaponSystem component.

It keeps individual "weapon configuration" data for each weapon configuration you create using an instance of the WeaponSystem component. This allows you to create an inventory of guns/weapons for a player for example, and within the WeaponSystem component, you are able to iterate through a list of these configurations and easily change between "guns" or weapon configurations. Each property in this class will map back to a matching property on the WeaponSystem component, so when you switch weapons, each field from this WeaponSystemConfiguration instance is mapped to a field on the WeaponSystem instance. Bullets are then fired from the WeaponSystem instance and all the fields that were defined in this class, are then applied to the bullets.

Member Data Documentation

◆ ammoAvailable

int WeaponSystemConfiguration.ammoAvailable

◆ ammoUsed

int WeaponSystemConfiguration.ammoUsed

◆ autoFire

bool WeaponSystemConfiguration.autoFire

◆ bulletColour

Color WeaponSystemConfiguration.bulletColour = Color.white

◆ bulletCount

int WeaponSystemConfiguration.bulletCount

◆ bulletCountsAsAmmo

bool WeaponSystemConfiguration.bulletCountsAsAmmo

◆ BulletOptionType

WeaponSystem.BulletOption WeaponSystemConfiguration.BulletOptionType

◆ bulletRandomness

float WeaponSystemConfiguration.bulletRandomness

◆ bulletSpacing

float WeaponSystemConfiguration.bulletSpacing

◆ bulletSpeed

float WeaponSystemConfiguration.bulletSpeed

◆ bulletSpread

float WeaponSystemConfiguration.bulletSpread

◆ bulletSpreadPingPongMax

float WeaponSystemConfiguration.bulletSpreadPingPongMax

◆ circularFireMode

bool WeaponSystemConfiguration.circularFireMode

◆ circularFireRotationRate

float WeaponSystemConfiguration.circularFireRotationRate

◆ gunPoint

Transform WeaponSystemConfiguration.gunPoint

◆ lerpTurnRate

bool WeaponSystemConfiguration.lerpTurnRate

◆ magazineChangeDelay

float WeaponSystemConfiguration.magazineChangeDelay

◆ magazineRemainingBullets

int WeaponSystemConfiguration.magazineRemainingBullets

◆ magazineSize

int WeaponSystemConfiguration.magazineSize

◆ playReloadingSfx

bool WeaponSystemConfiguration.playReloadingSfx

◆ reloadSfxClip

AudioClip WeaponSystemConfiguration.reloadSfxClip

◆ ricochetChancePercent

float WeaponSystemConfiguration.ricochetChancePercent

◆ ShooterType

WeaponSystem.ShooterType WeaponSystemConfiguration.ShooterType

◆ spreadPingPongSpeed

float WeaponSystemConfiguration.spreadPingPongSpeed = 1f

◆ targetToTrack

Transform WeaponSystemConfiguration.targetToTrack

◆ trackingTurnRate

float WeaponSystemConfiguration.trackingTurnRate

◆ weaponFireRate

float WeaponSystemConfiguration.weaponFireRate

◆ weaponIcon

Texture2D WeaponSystemConfiguration.weaponIcon

◆ weaponName

string WeaponSystemConfiguration.weaponName

◆ weaponRelativeToComponent

bool WeaponSystemConfiguration.weaponRelativeToComponent

◆ weaponXOffset

float WeaponSystemConfiguration.weaponXOffset

◆ weaponYOffset

float WeaponSystemConfiguration.weaponYOffset

The documentation for this class was generated from the following file: