HTML5 game Kiwijs (2)-Display Game wizard __HTML5

Source: Internet
Author: User
Tags addchild

Kiwi.js the game scene named State, so the game can create a lot of state to show different game scenes, the wizard used the API name is Sprite, this is a look at the know.

Let me create a simple scene to display a background picture and a moving monster.

Display the background image, we can create the Staticimage object, the corresponding constructor is Kiwi.GameObjects.StaticImage (state Atlas [x=0] [y=0])

Shows the monster that can move, need to use Sprite object, the corresponding constructor is

Kiwi.GameObjects.Sprite (state Atlas [x=0] [y=0] [enableinput=false])

Here is the code

<! DOCTYPE html>  


Effect



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.