Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Entity {
- public:
- virtual ~Entity() { }
- virtual void Touch( Entity *e )
- {
- }
- };
- class Player : public Entity
- {
- public:
- //....
- };
- class Item : public Entity {
- public:
- virtual void Touch( Entity *e )
- {
- if( e->type == Player::type )
- {
- //...
- }
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement