|
Mana
|
An item lying on the floor. More...
#include <flooritem.h>
Public Member Functions | |
| FloorItem (int id, int itemId, const Vector &position, Map *map) | |
| Constructor. | |
| Type | getType () const override |
| Returns the type of the ActorSprite. | |
| bool | draw (Graphics *graphics, int offsetX, int offsetY) const override |
| Draws the Actor to the given graphics context. | |
| int | getItemId () const |
| Returns the item ID. | |
| const ItemInfo & | getInfo () const |
| Returns the item info for this floor item. | |
| int | getTileX () const override |
| Returns the x coordinate in tiles of the actor. | |
| int | getTileY () const override |
| Returns the y coordinate in tiles of the actor. | |
Public Member Functions inherited from ActorSprite | |
| ActorSprite (int id) | |
| ~ActorSprite () override | |
| int | getId () const |
| void | setId (int id) |
| int | getDrawOrder () const override |
| Returns the pixel Y coordinate that the actor should be drawn at. | |
| bool | drawSpriteAt (Graphics *graphics, int x, int y) const |
| virtual void | logic () |
| void | setMap (Map *map) override |
| virtual Map::BlockType | getBlockType () const |
| Gets the way the object blocks pathfinding for other objects. | |
| void | controlParticle (Particle *particle) |
| Take control of a particle. | |
| virtual TargetCursorSize | getTargetCursorSize () const |
| Returns the required size of a target cursor for this being. | |
| void | setTargetType (TargetCursorType type) |
| Sets the target animation for this actor. | |
| void | untarget () |
| Untargets the actor. | |
| void | setAlpha (float alpha) override |
| Sets the alpha value used to draw the actor. | |
| float | getAlpha () const override |
| Returns the current alpha value used to draw the actor. | |
| int | getWidth () const |
| int | getHeight () const |
Public Member Functions inherited from Actor | |
| Actor () | |
| virtual | ~Actor () |
| const Vector & | getPosition () const |
| Returns the pixel position of this actor. | |
| virtual void | setPosition (const Vector &pos) |
| Sets the pixel position of this actor. | |
| int | getPixelX () const |
| Returns the pixels X coordinate of the actor. | |
| int | getPixelY () const |
| Returns the pixel Y coordinate of the actor. | |
| virtual bool | drawnWhenBehind () const |
| Determines wether the actor should be drawn translucent when behind another object. | |
| Map * | getMap () const |
Private Attributes | |
| int | mItemId |
| int | mX |
| int | mY |
| ResourceRef< Image > | mImage |
Additional Inherited Members | |
Public Types inherited from ActorSprite | |
| enum | Type { UNKNOWN , PLAYER , NPC , MONSTER , FLOOR_ITEM , PORTAL } |
| enum | TargetCursorSize { TC_SMALL = 0 , TC_MEDIUM , TC_LARGE , NUM_TC } |
| enum | TargetCursorType { TCT_NONE = -1 , TCT_NORMAL = 0 , TCT_IN_RANGE , NUM_TCT } |
Static Public Member Functions inherited from ActorSprite | |
| static void | load () |
| static void | unload () |
Protected Member Functions inherited from ActorSprite | |
| void | setupSpriteDisplay (const SpriteDisplay &display, bool forceDisplay=true) |
Protected Attributes inherited from ActorSprite | |
| int | mId |
| std::vector< ParticleHandle > | mChildParticleEffects |
| CompoundSprite | mSprites |
Protected Attributes inherited from Actor | |
| Map * | mMap = nullptr |
| Vector | mPos |
| Position in pixels relative to map. | |
An item lying on the floor.
Definition at line 31 of file flooritem.h.
Constructor.
| id | the unique ID of this item instance |
| itemId | the item ID |
| position | the position in pixels |
| map | the map this item is on |
Definition at line 32 of file flooritem.cpp.
|
overridevirtual |
Draws the Actor to the given graphics context.
Note: this function could be simplified if the graphics context would support setting a translation offset. It already does this partly with the clipping rectangle support.
Reimplemented from ActorSprite.
Definition at line 63 of file flooritem.cpp.
| const ItemInfo & FloorItem::getInfo | ( | ) | const |
Returns the item info for this floor item.
Useful for adding an item link for the floor item to chat.
Definition at line 76 of file flooritem.cpp.
|
inline |
Returns the item ID.
Definition at line 54 of file flooritem.h.
|
inlineoverridevirtual |
Returns the x coordinate in tiles of the actor.
Reimplemented from Actor.
Definition at line 62 of file flooritem.h.
|
inlineoverridevirtual |
Returns the y coordinate in tiles of the actor.
Reimplemented from Actor.
Definition at line 63 of file flooritem.h.
|
inlineoverridevirtual |
Returns the type of the ActorSprite.
Reimplemented from ActorSprite.
Definition at line 47 of file flooritem.h.
|
private |
Definition at line 68 of file flooritem.h.
|
private |
Definition at line 66 of file flooritem.h.
|
private |
Definition at line 67 of file flooritem.h.
|
private |
Definition at line 67 of file flooritem.h.