Class TItemWeapon

Unit

Declaration

type TItemWeapon = class(TInventoryItem)

Description

No description available, ancestor 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

Overview

Methods

Protected procedure Attack(const LevelProperties: TLevelProperties); virtual;
Protected procedure Use; override;
Public function Resource: TItemWeaponResource;
Public procedure Equip; virtual;
Public procedure EquippedAttack(const LevelProperties: TLevelProperties; const LifeTime: Single); virtual;
Public procedure EquippedUpdate(const LevelProperties: TLevelProperties; const LifeTime: Single); virtual;
Public function EquippedScene(const LifeTime: Single): TCastleScene; virtual;

Description

Methods

Protected procedure Attack(const LevelProperties: TLevelProperties); 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).

Protected procedure Use; override;
 
Public function Resource: TItemWeaponResource;
 
Public procedure Equip; virtual;

Owner equips this weapon.

Public procedure EquippedAttack(const LevelProperties: TLevelProperties; const LifeTime: Single); virtual;

Owner starts attack with this equipped weapon.

Public procedure EquippedUpdate(const LevelProperties: TLevelProperties; const LifeTime: Single); virtual;

Time passses for equipped weapon.

Public 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.15.0.