Homepage | Demos | Overview | Downloads | Tutorials | Reference | Credits |
Transition.ccGo to the documentation of this file.00001 #include "Transition.h" 00002 #include "StateNode.h" 00003 #include "Wireless/Wireless.h" 00004 #include "SoundPlay/SoundManager.h" 00005 00006 void Transition::fire() { 00007 //serr->printf("%s fire() - 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); 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 fire() - 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: dst $ 00030 * $Name: tekkotsu-2_2 $ 00031 * $Revision: 1.8 $ 00032 * $State: Exp $ 00033 * $Date: 2004/10/08 00:08:34 $ 00034 */ 00035 |
Tekkotsu v2.2 |
Generated Tue Oct 19 14:19:16 2004 by Doxygen 1.3.9.1 |