- Home /
Counter is not working correctly with LeanTween
The counter is not working correctly with leantween animation line. When I deleted the leantween line, it is working correctly. How can I fix this?
public static void solveMatches(List<Gem> matches) {
foreach (Gem g in matches) {
//I am trying to add here a destroying animation
LeanTween.rotate (g.gameObject, new Vector3(0.0f, 270.0f, 0.0f), 0.5f).setDestroyOnComplete(g.gameObject).setEase(LeanTweenType.easeOutQuad);
soundControl = true; //destroy sound
++count;
}
Comment
Your answer
Follow this Question
Related Questions
Sprite rotation with animation (2d project) 0 Answers
How to rotate an object using animation clip in opposite direction? 1 Answer
Character still walking when no key is already pressed 1 Answer
2D Sprite Animation - Rotate animation on axis 1 Answer
Localscale-flipped 2D character retains original rotation since 5.4 2 Answers