Does anyone have an idea how to make animation in scene editor to move simple enemy forth and back continuously as depicted below.
x: 0 N
The main problem is with scale, for Right facing enemy the Xscale
in dictionary is -1 for the opposite is 1. Tried to add animation with texture then add move action form 0 to N (in X ) in “n” seconds, then from N to 0 in “n” seconds and loops them together infinitely.
The point is how to switch facing of the enemy from right to left (and left to rigth) at the edges (0,N).
Please ignore my above question, I just figured out that I can achieve such behavior using EnemyBumper node. No need to touch SimpleEnemy or Enemy classes. Just put spawning node above two enemy bumpers and that is it .
You must be logged in to reply to this topic.
Download the new CartoonSmart TV App - Tons of FREE and Premium Lessons