Changeset 7339 in orxonox.OLD for trunk/src/world_entities/playable.cc
- Timestamp:
- Apr 19, 2006, 2:11:14 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/playable.cc
r7338 r7339 128 128 * @returns true on success, false otherwise 129 129 */ 130 bool Playable::setPlay Mode(Playable::Playmode playmode)130 bool Playable::setPlaymode(Playable::Playmode playmode) 131 131 { 132 132 if (!this->playmodeSupported(playmode)) … … 302 302 303 303 /** 304 * remove an event to the event list this Playable can capture.304 * @brief remove an event to the event list this Playable can capture. 305 305 * @param event the event to unregister. 306 306 */ … … 431 431 return flags!=oldFlags; 432 432 } 433 434 435 Playable::Playmode Playable::stringToPlaymode(const std::string& playmode) 436 { 437 if (playmode == "Vertical") 438 return Playable::Vertical; 439 if (playmode == "Horizontal") 440 return Playable::Horizontal; 441 if (playmode == "FromBehind") 442 return Playable::FromBehind; 443 if (playmode == "Full3D") 444 return Playable::Full3D; 445 446 return Playable::Full3D; 447 } 448 449 const char* Playable::playmodeToString(Playable::Playmode playmode) 450 { 451 switch(playmode) 452 { 453 case Playable::Vertical: 454 return "Vertical"; 455 case Playable::Horizontal: 456 return "Horizontal"; 457 case Playable::FromBehind: 458 return "FromBehind"; 459 case Playable::Full3D: 460 return "Full3D"; 461 462 default: 463 return "Full3D"; 464 } 465 466 }
Note: See TracChangeset
for help on using the changeset viewer.