• Content count

  • Joined

  • Last visited

  1. rotate sprite along z-axis

    Ok, one another problem is because my coin is asymmetric . So when I scale from 1 to -1, then I want to constantly rotate in the same direction (again from 1 to -1). So as far as I can see one solution is create 2 frame spritesheet (reverse parties) and when tween is complete set second frame , set scale again to 1 and then play tween again.
  2. rotate sprite along z-axis

    Is there any way to rotate sprite (concretely coin) along z-axis? It is 3d efect but maybe achievable in canvas and phaser by setting scale or other properties. Ultimate efect I want to achieve can be done by such spritesheet:
  3. set up end frame of animation

    I want to run two animations in sequence. First animation is initially looped, then slow downed by tween, and when tween is complete (speed of animation is reduced) I want to stop that animation and run second. Problem is, because I want to set up end frame other than specified in animation creation; i.e. I want to first animation run until end frame is reached. Otherwise I could simply set up loop parameter to false and then run second animation. What is most efficient way to achieve this? Some API like Phaser.Animation.stop(index_of_end_frame) will be perfect for my purposes. Stopping animation when specified frame is reached. Edit: My solution is get number of pending frames ( amount of frames that must elapse to reach end frame), multiply it by delay of animation, and set up timeout that stop current animation and run second.