Control the easing functions

Hello again…

I created the following simple code (typescript):

    let action = cc.moveTo(2, 300, 300).easing(cc.easeBounceOut);        
    this.node.runAction(action);

Now my questions are as follow:

  1. I wonder if there is any chance to control the bounce effect?
    Lets say I want 2 bounces instead of the default 4 bounces.

  2. How can I create my own easing functions? can you provide ts examples?

  3. Do I have a some sort of “wait” functions? I have multiple objects and I want to start all of them with delay of 0.2 between them.

Thanks in advanced…

  1. Do I have a some sort of “wait” functions? I have multiple objects and I want to start all of them with delay of 0.2 between them.

You can create a sequence object which receives an array of actions. So, for example:

const action1 = cc.moveTo(…);
const delay1 = cc.delayTiem(0.2);
const action2 = cc.somethingElse(…);
const delay2 = cc.delayTime(0.4);
etc.
const sequence = cc.sequence([action1, delay1, action2, delay2…]);

When you run the sequence as the action of the node, it will follow the array order. Hope this helps.

Thank you, Helps a lot!