Talking about Egret Egret

Source: Internet
Author: User
Tags mathematical constants

talking about Egret Egret        recently in a mobile project, technology selection of the time to contact with the egrets, a simple understanding of the later felt quite suitable, and eventually chose this engine. Why do you choose Egret engine? I have a crush on him. The main points are: 1, EGRET class structure and inheritance relationship with AS3, very easy to get started. 2, Egret as far as possible to maintain the properties of each class method with the same AS3, this way AS3 in the wording of the same use in the Egret. 3, Egret has a complete set of tools, you can easily develop HTML5 applications, but also easy to publish mobile phone native applications. 4, Egret Company's positive efforts, so that every short period of time will have a new version appears. And the compatibility between versions is very good, but also provides a one-click Upgrade. 5, if you are AS3 developers, see Egret you will be tempted, if you are a flex developer, see Egret you will feel the hope to see a career shift. So, as a former AS3 developer, it's just right to use Egret to develop a mobile end. Egret also supports development with typescript and JavaScript, and as a preferred object-oriented we naturally choose Typescript. There are now so many libraries in Egret: Egret Coreis the core library for displaying pictures, text, filters, events, playing sounds, and so on. Egret 3dIs his 3d engine, if it is 3d project will use this library. GameRelatively simple only a few classes MovieClip, ScrollView, URLLoader, URLRequest and so on. Euiis a set of interface libraries for designing interfaces. Pretty much with Flex. Drag-and-drop pendulum can be an interface, very convenient. Socketis WebSocket library, long-connected network communication to use, game development must. TweenIs his slow-moving library, but I usually use Tweenlite, Tweenmax JS version. Easy to use, as in Flash. ResLoading the management resources, you can load the map and the single small map. DragonbonesSkeletal animation GUI I did not use, is said to be outdated eui, now has replaced the GUI with EUI. Tiledmap parsing the tiled map.
There is nothing in other, and several mathematical constants and several types of definitions are stored.  Detailed development documentation, the official website has been introduced, very detailed, you can refer to http://edn.egret.com/cn/docs/here mainly to write the process of the project. first, you need to download Egret EngineAfter the installation is complete, open the Egretengine and download several tools in it Egret Wing 3, Texture merger, Egret IOS Support, Egret Android support, etc. Then, Open Egret Wing 3 Create a new Egret EUI projectPress F5 to start the project.The most important thing to write a project is to build a good code structure and organize the project code. I set up below the SRC folder below a few folders views are put interface. All the UI is here,Commons is a generic build, such as alert, a list of your own writing, and so on. games, the UI in the game scene
Halls, it's the UI in the lobby.
popups, it's a pop-up window
renderers, is a list of renderer
 Utils is a tool class, such as the uiutil of UI operations, the Stringutil of string operations, and so on. servers is a few of the services used in the game. I encapsulate the HTTP service, TCP service, put in here, external communication by sending events. Scenes games used in several scenes, such as responsible for loading the Loadingscene, Hall interface Hallscene, game interface Gamescene, may have a different tour        the play interface can be written as multiple gamescene. Models the database in the game. Store the data inside the game, including the data sent from several services within the servers, the data of the program itself, and the data        simple logic processing. The data used in the program is accessed through it. Managers as the name implies, where the manager stores, such as switching scenes to use the Scenemanager, management pop-up Windows Popupmanager, their own package of easy-to-use EventManager, the sound operation of the Soundmanager, As well as possible to localize the Localizemanager and so on. Events to customize the event, and to place your custom incident here for easy management. The controllers controller is the place where the UI and data are combined in a logical processing point. Mainly with scenes correspondence, a scene can correspond to multiple Controller,controller function is to classify scene functions, make logic more clear. Scene has different functions, you can build different controllers separately. writing code is to put in SRC, this is the same as Flashbuilder. Compile time Egret will write each of our code files, respectively compiled into the corresponding JS file and Js.map file (map file is added breakpoint debugging), and then placed inindex.html <!--game_files_start--> and <!--game_files_end--> in the middle  in index.html, Egret loads Egret's own class library, loads our custom libraries, loads the code we write, and finally starts the engine .Egret.runegret ({rendermode: "WebGL", audiotype:0}); Egret loads the code into the same environment. That's why we don't need to import code into the code like AS3. This is also a convenient place, the code you write in this file, in another file can be directly accessed. and Src side by side there is a resource folderThis folder is used to store the resources of the program, including not limited to pictures, music, text files and so on. The most important thing in resource is the Default.res.json file, the key that Res.getres uses to come from this file. Resource inside the Default.thm.json file is stored exml files, this file Egret will be automatically modified, do not need us to manually modify. The entrance of the program is the Main.ts file, this can be modified, but generally do not have to modify, default.

From for notes (Wiz)

Talking about Egret Egret

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.