Actors > Tweening > scale actor

 snippet: 



Usages: 
1. enlarging or shrinking actors, For example, a very high resolution actor that is 4x the intended size. This will allow use of higher resolution sprites without using 4x thus helps to save some spaces. 

2. flipping actors; which is very useful for some background, we use this snippet to produce more tile directions and patterns back in the "infinite" scene generation which is still techinically finite, procedural generation for the tiles all versions. https://stencyl-nator.blogspot.com/p/endless-scenes.html

Pleasse take note that the flipping axis is set relative to the rotation of the actor. 
In this case, flip on vertical axis, the axis will follow actor roitation. 

codes and shortcuts 
Preview code: actor.growTo(-100/100, 100/100, 0, Easing.linear);
short cut:  actor.growTo(-1, 1, 0, Easing.linear);

No comments:

Post a Comment