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