Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6109 in orxonox.OLD


Ignore:
Timestamp:
Dec 14, 2005, 3:44:23 PM (18 years ago)
Author:
manuel
Message:

some debugging

Location:
branches/powerups/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/powerups/src/Makefile.am

    r5965 r6109  
    8080                  world_entities/power_ups/laser_power_up.cc \
    8181                  world_entities/power_ups/weapon_power_up.cc \
     82                  world_entities/power_ups/param_power_up.cc \
    8283                  world_entities/space_ships/space_ship.cc \
    8384                  subprojects/benchmark.cc
  • branches/powerups/src/world_entities/power_ups/param_power_up.cc

    r6107 r6109  
    1616#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WORLD_ENTITY
    1717
    18 #include "weapon_power_up.h"
     18#include "param_power_up.h"
    1919#include "factory.h"
    2020#include "state.h"
     
    2929
    3030CREATE_FACTORY(ParamPowerUp, CL_PARAM_POWER_UP);
     31
     32const char* ParamPowerUp::paramTypes[] = {
     33  "shield"
     34};
    3135
    3236ParamPowerUp::ParamPowerUp () : PowerUp(0.0, 0.0, 1.0)
     
    112116}
    113117
    114 const char* ParamPowerUp::paramTypes[] = {
    115   "shield"
    116 };
    117118
    118 
  • branches/powerups/src/world_entities/power_ups/param_power_up.h

    r6107 r6109  
    2424
    2525  void setValue(int value);
    26   void setType(EnumParamPowerUpType type)
     26  void setMaxValue(int value);
     27  void setMinValue(int value);
     28  void setType(const char* type);
     29  EnumParamPowerUpType getType();
     30  int getValue();
    2731
    2832protected:
     
    3438
    3539private:
    36   static const char* paramTypes;
     40  static const char* paramTypes[];
    3741  EnumParamPowerUpType type;
    3842  int value;
  • branches/powerups/src/world_entities/space_ships/space_ship.cc

    r6107 r6109  
    3434
    3535#include "power_ups/weapon_power_up.h"
     36#include "power_ups/param_power_up.h"
    3637
    3738#include "graphics_engine.h"
     
    428429  }
    429430  else if(powerUp->isA(CL_PARAM_POWER_UP)) {
    430 
     431    ParamPowerUp* ppu = dynamic_cast<ParamPowerUp*>(powerUp);
     432    switch(ppu->getType()) {
     433      case PARAM_SHIELD:
     434        break;
     435    }
    431436  }
    432437  return false;
Note: See TracChangeset for help on using the changeset viewer.