Why is my sound making my game lag in Swift Spritekit?

后端 未结 2 583
日久生厌
日久生厌 2021-01-20 03:58

I have this sound effect when my hero node collects a coin and there is this small hiccup in my game. Its not smooth like in other games when there is sound involved when co

2条回答
  •  盖世英雄少女心
    2021-01-20 04:05

    you should not be calling prepareToPlay on the collision, prepareToPlay sets up the sound buffer, do that in your didMoveToView function

提交回复
热议问题