Swift game combat-run Cool Panda 03 panda running animation

Source: Internet
Author: User


Original: Swift game combat-Parkour Panda 03 Panda running animation








In this section, we'll use skaction to create animations for pandas, and we'll learn to animate through texture groups, using the perpetual cycle of skaction to keep the panda running.


Points:


use of enumeration: used to record the action status of a panda


 
enum Status: Int {
Case run = 1, jump, jump2, roll // When run is assigned a value of 1, jump, jump2, roll will be automatically assigned a value of 2,3,4
} 





Animating with sequence frame textures:


Skaction.animatwithtextures (texture array, time between playback)





Cycle Animation Forever:


Skaction.repeatactionforever ()
Project file Address


http://yun.baidu.com/share/link?shareid=3824235955&uk=541995622





Swift game Combat-Parkour Panda Series 00 Game preview 01 Create project Import footage 02 Create Panda class


Swift game combat-run Cool Panda 03 panda running animation


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.