Castle Game Engine: CastleItems: Class TItemWeapon

# Class TItemWeapon
Description | Hierarchy | Fields | Methods | Properties
## Unit CastleItems ## Declaration `type TItemWeapon = class(TInventoryItem)` ## Description no description available, TInventoryItem description follows An item that can be used, kept in the inventory, or (using PutOnWorld that wraps it in TItemOnWorld) dropped on 3D world. Thanks to the Quantity property, this may actually represent many "stacked" items, all having the same properties. ## Hierarchy TComponent TInventoryItem TItemWeapon ## Overview ### Methods
| `procedure Attack; virtual;`
| `procedure Use; override;`
| `function Resource: TItemWeaponResource;`
| `procedure Equip; virtual;`
| `procedure EquippedAttack(const LifeTime: Single); virtual;`
| `procedure EquippedUpdate(const LifeTime: Single); virtual;`
| `function EquippedScene(const LifeTime: Single): TCastleScene; virtual;`
## Description ### Methods
| `procedure Attack; virtual;`
Make real `attack`, immediate (short-range/shoot) or firing missile. Called during weapon TItemWeaponResource.AttackAnimation, at the time TItemWeaponResource.AttackTime. The default implementation in `TItemWeapon` does a short-range/shoot `attack` (if AttackDamageConst or AttackDamageRandom or AttackKnockbackDistance non-zero) and fires a missile (if FireMissileName not empty).
| `procedure Use; override;`
| `function Resource: TItemWeaponResource;`
| `procedure Equip; virtual;`
Owner equips this weapon.
| `procedure EquippedAttack(const LifeTime: Single); virtual;`
Owner starts attack with this equipped weapon.
| `procedure EquippedUpdate(const LifeTime: Single); virtual;`
Time passses for equipped weapon.
| `function EquippedScene(const LifeTime: Single): TCastleScene; virtual;`
Return the 3D model to render for this equipped weapon, or `Nil` if none.
Generated by PasDoc 0.13.0 on 2015-06-15 04:43:10