C# Class WeaponBase, Unity3D-Space-Shooter-Game

Inheritance: MonoBehaviour
Datei anzeigen Open project: emir01/Unity3D-Space-Shooter-Game Class Usage Examples

Public Properties

Property Type Description
AmmoDamageModifier float
AmmoSpeedModifier float
RateOfFire float

Public Methods

Method Description
Fire ( GameObject ammo, GameObject origin ) : void

Inherited from the concrete Weapon types.

Protected Methods

Method Description
ModifyAmmo ( GameObject ammo ) : void

The method that is responsible to modifying the ammo based on the ammo modifiers after the ammo is instantiated.

Method Details

Fire() public abstract method

Inherited from the concrete Weapon types.
public abstract Fire ( GameObject ammo, GameObject origin ) : void
ammo GameObject The ammo we are firing that could affect the rate of fire.
origin GameObject The origin we are firing from. (Player Ship)
return void

ModifyAmmo() protected method

The method that is responsible to modifying the ammo based on the ammo modifiers after the ammo is instantiated.
protected ModifyAmmo ( GameObject ammo ) : void
ammo GameObject
return void

Property Details

AmmoDamageModifier public_oe property

The modifier for the ammo damage.
public float AmmoDamageModifier
return float

AmmoSpeedModifier public_oe property

The modifier for the ammo speed
public float AmmoSpeedModifier
return float

RateOfFire public_oe property

The base weapon speed rate in seconds.
public float RateOfFire
return float