Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/powerups/src/world_entities/power_ups/weapon_power_up.cc @ 5965

Last change on this file since 5965 was 5965, checked in by manuel, 18 years ago

many changes:
created generic weapon_power_up that can contain any kind of weapon
space_ship is now extendable and can pickup weapon_power_ups

File size: 1.2 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: Benjamin Grauer
13   co-programmer: ...
14*/
15
16#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WORLD_ENTITY
17
18#include "weapon_power_up.h"
19#include "factory.h"
20#include "state.h"
21#include "list.h"
22
23#include "primitive_model.h"
24
25using namespace std;
26
27CREATE_FACTORY(WeaponPowerUp, CL_WEAPON_POWER_UP);
28
29WeaponPowerUp::WeaponPowerUp ()
30{
31  this->init();
32}
33
34WeaponPowerUp::WeaponPowerUp(const TiXmlElement* root)
35{
36  this->init();
37  this->loadParams(root);
38}
39
40
41WeaponPowerUp::~WeaponPowerUp ()
42{
43}
44
45
46void WeaponPowerUp::init()
47{
48}
49
50
51void WeaponPowerUp::loadParams(const TiXmlElement* root)
52{
53  static_cast<PowerUp*>(this)->loadParams(root);
54
55}
56
57Weapon* WeaponPowerUp::getWeapon()
58{
59  return dynamic_cast<Weapon*>(Factory::getFirst()->fabricate(this->getWeaponID()));
60}
61
62ClassID WeaponPowerUp::getWeaponID()
63{
64  return this->weaponID;
65}
66
67long WeaponPowerUp::getCapsNeeded()
68{
69  return this->capsNeeded;
70}
Note: See TracBrowser for help on using the repository browser.