Changeset 9872 for code/branches/levelMichael/src/modules/overlays
- Timestamp:
- Dec 5, 2013, 8:46:18 PM (11 years ago)
- Location:
- code/branches/levelMichael/src/modules/overlays/hud
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/levelMichael/src/modules/overlays/hud/CountDown.cc
r9870 r9872 35 35 <OverlayGroup name="spacefightHUD" scale = "1, 1"> 36 36 <CountDown 37 position = "0.49, 0.05" 38 pickpoint = "0.0, 0.0" 39 font = "ShareTechMono" 40 textsize = 0.06 41 colour = "1.0, 1.0, 1.0, 1.0" 42 align = "right" 43 counter = "10.0" 44 active = "false" 37 position = "0.49, 0.05" 38 pickpoint = "0.0, 0.0" 39 font = "ShareTechMono" 40 textsize = 0.06 41 colour = "1.0, 1.0, 1.0, 1.0" 42 align = "right" 43 counter = "10.0" 44 speedfactor = "1.0" 45 active = "false" 45 46 > 46 47 <events> … … 82 83 SUPER(CountDown, XMLPort, xmlelement, mode); 83 84 XMLPortParam(CountDown, "counter", setCounter, getCounter, xmlelement, mode).defaultValues(10); 85 XMLPortParam(CountDown, "speedfactor", setSpeed, getSpeed, xmlelement, mode).defaultValues(1); 84 86 } 85 87 … … 97 99 else 98 100 { 99 this->counter_ -= dt ;101 this->counter_ -= dt*speed_; 100 102 this->setCaption(multi_cast<std::string>((int)this->counter_)); //TODO: evtl. initialize with +0.5f 101 103 } -
code/branches/levelMichael/src/modules/overlays/hud/CountDown.h
r9870 r9872 52 52 inline float getCounter() const 53 53 { return this->counter_; } 54 inline void setSpeed(float value) 55 { this->speed_ = value; } 56 inline float getSpeed() const 57 { return this->speed_; } 58 54 59 protected: 55 60 … … 57 62 PlayerInfo* owner_; 58 63 float counter_; 64 float speed_; 59 65 bool hasStopped_; 60 66 };
Note: See TracChangeset
for help on using the changeset viewer.