![]() |
2DShooterWeaponSystem
1.9.0
|
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 |
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.
int WeaponSystemConfiguration.ammoAvailable |
int WeaponSystemConfiguration.ammoUsed |
bool WeaponSystemConfiguration.autoFire |
Color WeaponSystemConfiguration.bulletColour = Color.white |
int WeaponSystemConfiguration.bulletCount |
bool WeaponSystemConfiguration.bulletCountsAsAmmo |
WeaponSystem.BulletOption WeaponSystemConfiguration.BulletOptionType |
float WeaponSystemConfiguration.bulletRandomness |
float WeaponSystemConfiguration.bulletSpacing |
float WeaponSystemConfiguration.bulletSpeed |
float WeaponSystemConfiguration.bulletSpread |
float WeaponSystemConfiguration.bulletSpreadPingPongMax |
bool WeaponSystemConfiguration.circularFireMode |
float WeaponSystemConfiguration.circularFireRotationRate |
Transform WeaponSystemConfiguration.gunPoint |
bool WeaponSystemConfiguration.lerpTurnRate |
float WeaponSystemConfiguration.magazineChangeDelay |
int WeaponSystemConfiguration.magazineRemainingBullets |
int WeaponSystemConfiguration.magazineSize |
bool WeaponSystemConfiguration.playReloadingSfx |
AudioClip WeaponSystemConfiguration.reloadSfxClip |
float WeaponSystemConfiguration.ricochetChancePercent |
WeaponSystem.ShooterType WeaponSystemConfiguration.ShooterType |
float WeaponSystemConfiguration.spreadPingPongSpeed = 1f |
Transform WeaponSystemConfiguration.targetToTrack |
float WeaponSystemConfiguration.trackingTurnRate |
float WeaponSystemConfiguration.weaponFireRate |
Texture2D WeaponSystemConfiguration.weaponIcon |
string WeaponSystemConfiguration.weaponName |
bool WeaponSystemConfiguration.weaponRelativeToComponent |
float WeaponSystemConfiguration.weaponXOffset |
float WeaponSystemConfiguration.weaponYOffset |