| 
									
										
										
										
											2018-04-21 21:24:46 +08:00
										 |  |  | #include "..\e2dtransition.h"
 | 
					
						
							|  |  |  | #include "..\e2dnode.h"
 | 
					
						
							| 
									
										
										
										
											2017-10-21 19:09:31 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-02-27 21:07:43 +08:00
										 |  |  | e2d::TransitionEmerge::TransitionEmerge(double duration) | 
					
						
							| 
									
										
										
										
											2018-05-09 00:34:15 +08:00
										 |  |  | 	: Transition(duration) | 
					
						
							| 
									
										
										
										
											2017-10-21 19:09:31 +08:00
										 |  |  | { | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-05-17 12:22:52 +08:00
										 |  |  | e2d::TransitionEmerge * e2d::TransitionEmerge::create(double duration) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | 	return Create<TransitionEmerge>(duration); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-04-17 11:41:33 +08:00
										 |  |  | void e2d::TransitionEmerge::_init(Scene * prev, Scene * next) | 
					
						
							|  |  |  | { | 
					
						
							| 
									
										
										
										
											2018-05-09 00:34:15 +08:00
										 |  |  | 	Transition::_init(prev, next); | 
					
						
							|  |  |  | 	_outLayerParam.opacity = 1; | 
					
						
							|  |  |  | 	_inLayerParam.opacity = 0; | 
					
						
							| 
									
										
										
										
											2018-04-17 11:41:33 +08:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-04-17 01:11:56 +08:00
										 |  |  | void e2d::TransitionEmerge::_updateCustom() | 
					
						
							| 
									
										
										
										
											2017-10-21 19:09:31 +08:00
										 |  |  | { | 
					
						
							| 
									
										
										
										
											2018-05-09 00:34:15 +08:00
										 |  |  | 	_outLayerParam.opacity = float(1 - _delta); | 
					
						
							|  |  |  | 	_inLayerParam.opacity = float(_delta); | 
					
						
							| 
									
										
										
										
											2017-10-21 19:09:31 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-05-08 20:03:29 +08:00
										 |  |  | 	if (_delta >= 1) | 
					
						
							| 
									
										
										
										
											2018-01-30 16:45:38 +08:00
										 |  |  | 	{ | 
					
						
							|  |  |  | 		this->_stop(); | 
					
						
							| 
									
										
										
										
											2017-12-09 15:27:11 +08:00
										 |  |  | 	} | 
					
						
							|  |  |  | } | 
					
						
							| 
									
										
										
										
											2017-10-21 19:09:31 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-02-07 16:37:12 +08:00
										 |  |  | void e2d::TransitionEmerge::_reset() | 
					
						
							| 
									
										
										
										
											2017-12-09 15:27:11 +08:00
										 |  |  | { | 
					
						
							| 
									
										
										
										
											2017-10-21 19:09:31 +08:00
										 |  |  | } |