Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/spaceshipcontrol/src/world_entities/playable.cc @ 5875

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
Line 
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:
12   main-programmer: Silvan Nellen
13   co-programmer: Benjamin Knecht
14*/
15
16#include "weapons/weapon_manager.h"
17#include "playable.h"
18#include "event_handler.h"
19#include "player.h"
20
21
22Playable::Playable()
23{
24  this->init();
25}
26
27Playable::~Playable()
28{
29
30}
31
32void Playable::init()
33{
34  this->setClassID(CL_PLAYABLE, "Playable");
35  PRINTF(4)("PLAYABLE INIT\n");
36  this->weaponMan = new WeaponManager(this);
37}
38
39/**
40 * subscribe to all events the controllable needs
41 */
42void Playable::subscribeEvents(Player* player)
43{
44  /*EventHandler*/
45  EventHandler* evh = EventHandler::getInstance();
46  for (int i = 0 ; i < events.size(); i++)
47  {
48    if (!evh->isSubscribed(ES_GAME, i))
49      evh->subscribe(player, ES_GAME, i);
50  }
51
52}
Note: See TracBrowser for help on using the repository browser.