xyginext  0.2.0
Second generation of xygine game creation framework
Public Attributes | List of all members
xy::CommandTarget Struct Referencefinal

Attaches a command ID bitmask to an Entity. ID should be a bit mask of flags representing target IDs. For example: More...

#include <CommandTarget.hpp>

Public Attributes

sf::Uint32 ID = 0
 

Detailed Description

Attaches a command ID bitmask to an Entity. ID should be a bit mask of flags representing target IDs. For example:

enum CommandIDs { Player = 0x1, Enemy = 0x2, NPC = 0x4 };

CommandTarget target; target.ID |= Enemy | NPC;

The command target system will then apply any given commands to targets whose flags match one or more of the flags belonging to the command.

See also
CommandSystem