Last change
on this file since 5875 was
5875,
checked in by bensch, 18 years ago
|
orxonox/branches/spaceshipcontrol: compiles again
|
File size:
1.0 KB
|
Rev | Line | |
---|
[5838] | 1 | /* |
---|
| 2 | orxonox - the future of 3D-vertical-scrollers |
---|
| 3 | |
---|
| 4 | Copyright (C) 2004 orx |
---|
| 5 | |
---|
| 6 | This program is free software; you can redistribute it and/or modify |
---|
| 7 | it under the terms of the GNU General Public License as published by |
---|
| 8 | the Free Software Foundation; either version 2, or (at your option) |
---|
| 9 | any later version. |
---|
| 10 | |
---|
| 11 | ### File Specific: |
---|
[5841] | 12 | main-programmer: Silvan Nellen |
---|
| 13 | co-programmer: Benjamin Knecht |
---|
[5838] | 14 | */ |
---|
| 15 | |
---|
[5875] | 16 | #include "weapons/weapon_manager.h" |
---|
[5838] | 17 | #include "playable.h" |
---|
[5875] | 18 | #include "event_handler.h" |
---|
| 19 | #include "player.h" |
---|
[5838] | 20 | |
---|
[5872] | 21 | |
---|
[5838] | 22 | Playable::Playable() |
---|
| 23 | { |
---|
| 24 | this->init(); |
---|
| 25 | } |
---|
| 26 | |
---|
[5875] | 27 | Playable::~Playable() |
---|
[5838] | 28 | { |
---|
[5875] | 29 | |
---|
| 30 | } |
---|
| 31 | |
---|
| 32 | void Playable::init() |
---|
| 33 | { |
---|
[5838] | 34 | this->setClassID(CL_PLAYABLE, "Playable"); |
---|
| 35 | PRINTF(4)("PLAYABLE INIT\n"); |
---|
| 36 | this->weaponMan = new WeaponManager(this); |
---|
| 37 | } |
---|
| 38 | |
---|
[5872] | 39 | /** |
---|
| 40 | * subscribe to all events the controllable needs |
---|
| 41 | */ |
---|
| 42 | void Playable::subscribeEvents(Player* player) |
---|
| 43 | { |
---|
| 44 | /*EventHandler*/ |
---|
[5875] | 45 | EventHandler* evh = EventHandler::getInstance(); |
---|
[5872] | 46 | for (int i = 0 ; i < events.size(); i++) |
---|
| 47 | { |
---|
[5875] | 48 | if (!evh->isSubscribed(ES_GAME, i)) |
---|
| 49 | evh->subscribe(player, ES_GAME, i); |
---|
| 50 | } |
---|
[5872] | 51 | |
---|
| 52 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.