官术网_书友最值得收藏!

Node setup

Click Scene | New Scene and add the following nodes. Don't forget to set the children to not be selected, like you did with the Player scene:

  • Area2D (named Coin)
  • AnimatedSprite
  • CollisionShape2D

Make sure to save the scene once you've added the nodes.

Set up the AnimatedSprite like you did in the Player scene. This time, you only have one animation: a shine/sparkle effect that makes the coin look less flat and boring. Add all the frames and set the Speed (FPS) to 12. The images are a little too large, so set the Scale of AnimatedSprite to (0.5, 0.5). In the CollisionShape2D, use a CircleShape2D and size it to cover the coin image. Don't forget: never use the scale handles when sizing a collision shape. The circle shape has a single handle that adjusts the circle's radius.

主站蜘蛛池模板: 临安市| 阳西县| 莎车县| 吴川市| 阿鲁科尔沁旗| 兴化市| 武山县| 惠安县| 宾川县| 延寿县| 天全县| 武安市| 望城县| 禄丰县| 思茅市| 九龙城区| 台安县| 建宁县| 大渡口区| 琼结县| 民乐县| 绿春县| 城口县| 咸宁市| 隆昌县| 大埔县| 原阳县| 松滋市| 扎鲁特旗| 大竹县| 长乐市| 平遥县| 榆林市| 达孜县| 大新县| 霍邱县| 德安县| 中阳县| 石泉县| 东光县| 南郑县|