Today I saw a H5 game Eui example, I can not tell exactly what language I have compiled the code, as just learning H5 game development of the Novice can silently collect knowledge

Source: Internet
Author: User

Today saw a EUI demo, is also the fifth day of contact with the development of H5 game, I want to see if I can do something out, hey, my own writing is still a problem. In watching Eui which of the demo time met some wavering questions, I think put forward to

1. Toast

When I saw it, I wasn't sure if it was what I thought it was, so it was a bit of Baidu, and it was a mechanism for displaying information inside of Android. (PS: It's really a technology that brings together thousands of languages) toasts are not focused and toast displays a limited amount of time and will automatically disappear after a while. Toast is primarily used to display a prompt message to the user. It uses a toast class in the project to dynamically render a text prompt message.

2. Init

Initialization It's used in a lot of places.

3. The difference between Evt.currenttarget and Evt.target

Evt.currenttarget points to the element to which the event is bound (who binds it, to whom it points), and Evt.target always points to the element at the time the event occurred. Target occurs at the destination stage of the event flow, and Currenttarget occurs throughout the event

4. Static

I remember using it in Java, which means "static", to modify member variables and member methods, but also to form a static block of code, it also has a role in global variables, but there is no such concept in Java. The modified member is an independent object that can be shared by the instance of the class.

5. The difference between Egret.sprite and Egret.shape

Egret. Shape This class is primarily used for drawing applications to create simple shapes.

Erget. Sprite This class is a building block of a basic display list (a display list node that can contain children)

6. Egret Display object class Displayobject for four derived classes

They are: Bitmap (for bitmap display operations), shape (a display object that can be used for vector drawing), textfield,textinput (and the previous text operation).

7. The difference between public and private,protected

Public, it can be used under the same package in the current class using a descendant class using other packages

Private, he can only use it under the current class.

Protected it is similar to public use, but it cannot be used in other packages

8. The difference between break, continue, and return

In fact, these we are very familiar with, but I still want to write a deeper impression compared to a holiday to play.

Break in the body of the loop, which represents the end of the entire loop process, if the code behind it will no longer execute. It is typically used in if and switch statements.

Continue, only exits the current loop if there is a next loop to continue execution. It is mainly used for do and while,for,for in statements.

Return exits from the current method, returns to the statement of the invoked method to continue execution, and when return returns a value, the data type of the return value must be the same as the return type in the method declaration; The main purpose is to interrupt function execution to return to the calling function.

。。。。。。 In fact, these are very common knowledge, just use too little, after more practice more summary of the

Today I saw a H5 game Eui example, I can not tell exactly what language I have compiled the code, as just learning H5 game development of the Novice can silently collect knowledge

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.