C# Class OpenRA.GameRules.WeaponInfo

Datei anzeigen Open project: OpenRA/OpenRA Class Usage Examples

Public Methods

Method Description
Impact ( Target target, Actor firedBy, IEnumerable damageModifiers ) : void

Applies all the weapon's warheads to the target.

IsValidAgainst ( Actor victim, Actor firedBy ) : bool

Checks if the weapon is valid against (can target) the actor.

IsValidAgainst ( OpenRA.Traits.FrozenActor victim, Actor firedBy ) : bool

Checks if the weapon is valid against (can target) the frozen actor.

IsValidAgainst ( Target target, World world, Actor firedBy ) : bool

Checks if the weapon is valid against (can target) the target.

IsValidTarget ( IEnumerable targetTypes ) : bool
WeaponInfo ( string name, MiniYaml content ) : System

Private Methods

Method Description
LoadProjectile ( MiniYaml yaml ) : object
LoadWarheads ( MiniYaml yaml ) : object

Method Details

Impact() public method

Applies all the weapon's warheads to the target.
public Impact ( Target target, Actor firedBy, IEnumerable damageModifiers ) : void
target OpenRA.Traits.Target
firedBy Actor
damageModifiers IEnumerable
return void

IsValidAgainst() public method

Checks if the weapon is valid against (can target) the actor.
public IsValidAgainst ( Actor victim, Actor firedBy ) : bool
victim Actor
firedBy Actor
return bool

IsValidAgainst() public method

Checks if the weapon is valid against (can target) the frozen actor.
public IsValidAgainst ( OpenRA.Traits.FrozenActor victim, Actor firedBy ) : bool
victim OpenRA.Traits.FrozenActor
firedBy Actor
return bool

IsValidAgainst() public method

Checks if the weapon is valid against (can target) the target.
public IsValidAgainst ( Target target, World world, Actor firedBy ) : bool
target OpenRA.Traits.Target
world World
firedBy Actor
return bool

IsValidTarget() public method

public IsValidTarget ( IEnumerable targetTypes ) : bool
targetTypes IEnumerable
return bool

WeaponInfo() public method

public WeaponInfo ( string name, MiniYaml content ) : System
name string
content MiniYaml
return System