Class TItemOnWorld
Unit
CastleItems
Declaration
type TItemOnWorld = class(T3DOrient)
Description
Item that is placed on a 3D world, ready to be picked up. It's not in anyone's inventory.
Hierarchy
Overview
Fields
Methods
Properties
Description
Fields
 |
RotationSpeed: Single; static; |
Speed of the rotation of 3D item on world. In radians per second, default is DefaultRotationSpeed. Set to zero to disable rotation.
|
 |
AutoPick: boolean; static; |
Does the player automatically picks up items by walking over them. Default is True . If you set this to False , you most probably want to implement some other way of picking up items, use the ExtractItem method.
More precisely, this variable controls when TInventoryItem.Picked is called. When True , it is called for player when player steps over an item (otherwise it's never called). You can always override TInventoryItem.Picked for particular items to customize what happens at "pick" — the default implementation picks an item by adding it to inventory, but you could override it e.g. to consume some potions immediately on pickup.
|
 |
internal const DefaultRotationSpeed = Pi; |
|
Methods
 |
function GetExists: boolean; override; |
|
 |
function GetChild: T3D; override; |
|
 |
constructor Create(AOwner: TComponent); override; |
|
 |
destructor Destroy; override; |
|
 |
procedure Render(const Frustum: TFrustum; const Params: TRenderParams); override; |
Render the item, on current Position with current rotation etc. Current matrix should be modelview, this pushes/pops matrix state (so it 1. needs one place on matrix stack, 2. doesn't modify current matrix).
Pass current viewing Frustum to allow optimizing this (when item for sure is not within Frustum, we don't have to push it to OpenGL).
|
 |
procedure Update(const SecondsPassed: Single; var RemoveMe: TRemoveType); override; |
|
Properties
 |
property Collides default false; |
|
 |
property CollidesWithMoving default true; |
|
Generated by PasDoc 0.13.0 on 2014-10-26 05:15:13
|