| 
									
										
										
										
											2018-05-08 20:03:29 +08:00
										 |  |  | #include "..\e2daction.h"
 | 
					
						
							| 
									
										
										
										
											2018-09-05 13:17:07 +08:00
										 |  |  | #include "..\e2dcomponent.h"
 | 
					
						
							| 
									
										
										
										
											2018-05-08 20:03:29 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-07-28 20:06:27 +08:00
										 |  |  | e2d::ScaleTo::ScaleTo(float duration, float scale) | 
					
						
							| 
									
										
										
										
											2018-05-08 20:03:29 +08:00
										 |  |  | 	: ScaleBy(duration, 0, 0) | 
					
						
							|  |  |  | { | 
					
						
							| 
									
										
										
										
											2018-09-04 22:42:34 +08:00
										 |  |  | 	end_scale_x_ = scale; | 
					
						
							|  |  |  | 	end_scale_y_ = scale; | 
					
						
							| 
									
										
										
										
											2018-05-08 20:03:29 +08:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-09-04 22:42:34 +08:00
										 |  |  | e2d::ScaleTo::ScaleTo(float duration, float scale_x, float scale_y) | 
					
						
							| 
									
										
										
										
											2018-05-08 20:03:29 +08:00
										 |  |  | 	: ScaleBy(duration, 0, 0) | 
					
						
							|  |  |  | { | 
					
						
							| 
									
										
										
										
											2018-09-04 22:42:34 +08:00
										 |  |  | 	end_scale_x_ = scale_x; | 
					
						
							|  |  |  | 	end_scale_y_ = scale_y; | 
					
						
							| 
									
										
										
										
											2018-05-08 20:03:29 +08:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-09-04 22:42:34 +08:00
										 |  |  | e2d::ScaleTo * e2d::ScaleTo::Clone() const | 
					
						
							| 
									
										
										
										
											2018-05-08 20:03:29 +08:00
										 |  |  | { | 
					
						
							| 
									
										
										
										
											2018-09-04 22:42:34 +08:00
										 |  |  | 	return new (e2d::autorelease) ScaleTo(duration_, end_scale_x_, end_scale_y_); | 
					
						
							| 
									
										
										
										
											2018-05-08 20:03:29 +08:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-09-04 22:42:34 +08:00
										 |  |  | void e2d::ScaleTo::Init() | 
					
						
							| 
									
										
										
										
											2018-05-08 20:03:29 +08:00
										 |  |  | { | 
					
						
							| 
									
										
										
										
											2018-09-04 22:42:34 +08:00
										 |  |  | 	ScaleBy::Init(); | 
					
						
							|  |  |  | 	delta_x_ = end_scale_x_ - start_scale_x_; | 
					
						
							|  |  |  | 	delta_y_ = end_scale_y_ - start_scale_y_; | 
					
						
							| 
									
										
										
										
											2018-05-08 20:03:29 +08:00
										 |  |  | } |