| 
									
										
										
										
											2017-10-19 00:50:04 +08:00
										 |  |  |  | #include "..\eactions.h"
 | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-10-19 12:47:36 +08:00
										 |  |  |  | e2d::EActionTwo::EActionTwo(EAction * actionFirst, EAction * actionSecond) : | 
					
						
							| 
									
										
										
										
											2017-10-19 12:48:58 +08:00
										 |  |  |  | 	m_pFirstAction(actionFirst), | 
					
						
							|  |  |  |  | 	m_pSecondAction(actionSecond) | 
					
						
							| 
									
										
										
										
											2017-10-19 00:50:04 +08:00
										 |  |  |  | { | 
					
						
							| 
									
										
										
										
											2017-12-16 15:49:48 +08:00
										 |  |  |  | 	ASSERT(m_pFirstAction && m_pSecondAction, "EActionTwo NULL pointer exception!"); | 
					
						
							| 
									
										
										
										
											2017-10-19 12:48:58 +08:00
										 |  |  |  | 	m_pFirstAction->retain(); | 
					
						
							|  |  |  |  | 	m_pSecondAction->retain(); | 
					
						
							| 
									
										
										
										
											2017-10-19 00:50:04 +08:00
										 |  |  |  | } | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-10-19 12:47:36 +08:00
										 |  |  |  | e2d::EActionTwo::~EActionTwo() | 
					
						
							| 
									
										
										
										
											2017-10-19 00:50:04 +08:00
										 |  |  |  | { | 
					
						
							| 
									
										
										
										
											2017-10-31 17:19:13 +08:00
										 |  |  |  | 	SafeRelease(&m_pFirstAction); | 
					
						
							|  |  |  |  | 	SafeRelease(&m_pSecondAction); | 
					
						
							| 
									
										
										
										
											2017-10-19 00:50:04 +08:00
										 |  |  |  | } | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-10-19 12:48:58 +08:00
										 |  |  |  | e2d::EActionTwo * e2d::EActionTwo::clone() const | 
					
						
							| 
									
										
										
										
											2017-10-19 00:50:04 +08:00
										 |  |  |  | { | 
					
						
							| 
									
										
										
										
											2017-10-19 12:48:58 +08:00
										 |  |  |  | 	return new EActionTwo(m_pFirstAction->clone(), m_pSecondAction->clone()); | 
					
						
							| 
									
										
										
										
											2017-10-19 00:50:04 +08:00
										 |  |  |  | } | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-10-19 12:47:36 +08:00
										 |  |  |  | e2d::EActionTwo * e2d::EActionTwo::reverse(bool actionReverse) const | 
					
						
							| 
									
										
										
										
											2017-10-19 00:50:04 +08:00
										 |  |  |  | { | 
					
						
							|  |  |  |  | 	if (actionReverse) | 
					
						
							|  |  |  |  | 	{ | 
					
						
							| 
									
										
										
										
											2017-10-19 12:48:58 +08:00
										 |  |  |  | 		return new EActionTwo(m_pSecondAction->reverse(), m_pFirstAction->reverse()); | 
					
						
							| 
									
										
										
										
											2017-10-19 00:50:04 +08:00
										 |  |  |  | 	} | 
					
						
							|  |  |  |  | 	else | 
					
						
							|  |  |  |  | 	{ | 
					
						
							| 
									
										
										
										
											2017-10-19 12:48:58 +08:00
										 |  |  |  | 		return new EActionTwo(m_pSecondAction->clone(), m_pFirstAction->clone()); | 
					
						
							| 
									
										
										
										
											2017-10-19 00:50:04 +08:00
										 |  |  |  | 	} | 
					
						
							|  |  |  |  | } | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-10-19 12:47:36 +08:00
										 |  |  |  | void e2d::EActionTwo::_init() | 
					
						
							| 
									
										
										
										
											2017-10-19 00:50:04 +08:00
										 |  |  |  | { | 
					
						
							|  |  |  |  | 	EAction::_init(); | 
					
						
							| 
									
										
										
										
											2018-02-06 15:34:47 +08:00
										 |  |  |  | 	m_pFirstAction->m_pTarget = m_pTarget; | 
					
						
							|  |  |  |  | 	m_pSecondAction->m_pTarget = m_pTarget; | 
					
						
							| 
									
										
										
										
											2017-10-19 00:50:04 +08:00
										 |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-10-19 12:48:58 +08:00
										 |  |  |  | 	m_pFirstAction->_init(); | 
					
						
							| 
									
										
										
										
											2017-10-19 00:50:04 +08:00
										 |  |  |  | } | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-12-08 15:37:52 +08:00
										 |  |  |  | void e2d::EActionTwo::_update() | 
					
						
							| 
									
										
										
										
											2017-10-19 00:50:04 +08:00
										 |  |  |  | { | 
					
						
							| 
									
										
										
										
											2017-12-08 15:37:52 +08:00
										 |  |  |  | 	EAction::_update(); | 
					
						
							| 
									
										
										
										
											2017-11-03 12:51:01 +08:00
										 |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-10-19 12:48:58 +08:00
										 |  |  |  | 	if (!m_pFirstAction->_isEnding()) | 
					
						
							| 
									
										
										
										
											2017-10-19 00:50:04 +08:00
										 |  |  |  | 	{ | 
					
						
							| 
									
										
										
										
											2017-12-08 15:37:52 +08:00
										 |  |  |  | 		m_pFirstAction->_update(); | 
					
						
							| 
									
										
										
										
											2017-10-19 12:48:58 +08:00
										 |  |  |  | 		if (m_pFirstAction->_isEnding()) | 
					
						
							| 
									
										
										
										
											2017-10-19 00:50:04 +08:00
										 |  |  |  | 		{ | 
					
						
							|  |  |  |  | 			// <20><><EFBFBD><EFBFBD> true <20><>ʾ<EFBFBD><CABE>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD><EFBFBD>
 | 
					
						
							| 
									
										
										
										
											2017-10-19 12:48:58 +08:00
										 |  |  |  | 			m_pSecondAction->_init(); | 
					
						
							| 
									
										
										
										
											2017-10-19 00:50:04 +08:00
										 |  |  |  | 		} | 
					
						
							|  |  |  |  | 	} | 
					
						
							| 
									
										
										
										
											2017-10-19 12:48:58 +08:00
										 |  |  |  | 	else if (!m_pSecondAction->_isEnding()) | 
					
						
							| 
									
										
										
										
											2017-10-19 00:50:04 +08:00
										 |  |  |  | 	{ | 
					
						
							| 
									
										
										
										
											2017-12-08 15:37:52 +08:00
										 |  |  |  | 		m_pSecondAction->_update(); | 
					
						
							| 
									
										
										
										
											2017-10-19 00:50:04 +08:00
										 |  |  |  | 	} | 
					
						
							|  |  |  |  | 	else | 
					
						
							|  |  |  |  | 	{ | 
					
						
							|  |  |  |  | 		this->stop(); | 
					
						
							|  |  |  |  | 	} | 
					
						
							|  |  |  |  | } | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-02-06 15:34:47 +08:00
										 |  |  |  | void e2d::EActionTwo::reset() | 
					
						
							| 
									
										
										
										
											2017-10-19 00:50:04 +08:00
										 |  |  |  | { | 
					
						
							| 
									
										
										
										
											2018-02-06 15:34:47 +08:00
										 |  |  |  | 	EAction::reset(); | 
					
						
							| 
									
										
										
										
											2017-10-19 00:50:04 +08:00
										 |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-02-06 15:34:47 +08:00
										 |  |  |  | 	m_pFirstAction->reset(); | 
					
						
							|  |  |  |  | 	m_pSecondAction->reset(); | 
					
						
							| 
									
										
										
										
											2017-10-19 00:50:04 +08:00
										 |  |  |  | } | 
					
						
							| 
									
										
										
										
											2017-12-04 10:03:14 +08:00
										 |  |  |  | 
 | 
					
						
							|  |  |  |  | void e2d::EActionTwo::_resetTime() | 
					
						
							|  |  |  |  | { | 
					
						
							|  |  |  |  | 	m_pFirstAction->_resetTime(); | 
					
						
							|  |  |  |  | 	m_pSecondAction->_resetTime(); | 
					
						
							|  |  |  |  | } |