Homepage | Demos | Overview | Downloads | Tutorials | Reference | Credits |
00001 #include "Transition.h" 00002 #include "StateNode.h" 00003 #include "Wireless/Wireless.h" 00004 #include "SoundPlay/SoundManager.h" 00005 00006 void Transition::activate() { 00007 //serr->printf("%s activate() - enter %d\n",getName().c_str(),get_time()); 00008 00009 AddReference(); //just in case a side effect of this transition is to dereference the transition, we don't want to be deleted while still transitioning 00010 00011 if(sound.size()!=0) 00012 sndman->PlayFile(sound.c_str()); 00013 00014 for(unsigned int i=0; i<srcs.size(); i++) 00015 if(srcs[i]->isActive()) //It's usually a bad idea to call DoStop/DoStart when it's already stopped/started... 00016 srcs[i]->DoStop(); 00017 for(unsigned int i=0; i<dsts.size(); i++) 00018 if(!dsts[i]->isActive()) 00019 dsts[i]->DoStart(); 00020 00021 //serr->printf("%s activate() - leave %d\n",getName().c_str(),get_time()); 00022 RemoveReference(); 00023 } 00024 00025 /*! @file 00026 * @brief Implements Transition, represents a transition between StateNodes. 00027 * @author ejt (Creator) 00028 * 00029 * $Author: ejt $ 00030 * $Name: tekkotsu-2_0 $ 00031 * $Revision: 1.6 $ 00032 * $State: Exp $ 00033 * $Date: 2003/11/11 00:08:10 $ 00034 */ 00035
Tekkotsu v2.0 |
Generated Wed Jan 21 03:20:30 2004 by Doxygen 1.3.4 |