Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 11, 2005, 1:34:18 AM (18 years ago)
Author:
manuel
Message:

hopefully we see some colored spheres arounf powerups now

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/powerups/src/world_entities/power_ups/power_up.cc

    r5973 r6040  
    1919#include "power_up.h"
    2020#include "extendable.h"
    21 
     21#include "primitive_model.h"
    2222
    2323using namespace std;
    2424
    25 PowerUp::PowerUp() { }
     25Model* PowerUp::sphereModel = new PrimitiveModel(PRIM_SPHERE, 7, 5);
    2626
    27 PowerUp::~PowerUp () {}
     27PowerUp::PowerUp(float r, float g, float b)
     28{
     29  this->sphereMaterial = new Material;
     30  this->sphereMaterial->setTransparency(.1);
     31  this->sphereMaterial->setDiffuse(r, g, b);
     32}
     33
     34PowerUp::~PowerUp ()
     35{
     36  delete this->sphereMaterial;
     37}
    2838
    2939
     
    4959  this->setVisibiliy(false);
    5060}
     61
     62void PowerUp::draw()
     63{
     64  WorldEntity::draw();
     65  this->sphereMaterial->select();
     66  sphereModel->draw();
     67}
     68
Note: See TracChangeset for help on using the changeset viewer.