Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 5872 was 5872, checked in by snellen, 18 years ago

player.cc and player.h updated ( in ../src/world_entities)

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