Egret provides a very convenient creation tool, we call the creation of the file sum as a project. In the following operation, we operate on the project we created, and the following steps are created:
It is to be noted that Egret supports Windows and Mac OS X two platforms. In different platforms, we use the same Egret command. For different commands, you can refer to the relevant platform in the documentation of the operation of the introduction.
When Egret is created, you need to specify the directory where the project is created. Egret will store all the created project files in the specified directory.
1.Windows system into the project directory
We typed the command line tool in Windows with the following figure:
Enter the project directory in the 2.MAC OS x system
We create a folder called Egretdemo in Mac OS x. The folder path is:/volumes/mac1/egretdemo/
Use the CD command in the terminal to navigate to the current directory, cd/volumes/mac1/egretdemo/
3. Create the Hello World project
Below we create our project through the tools provided by Egret, we call the current project name "HelloWorld". Use the command in the terminal: Egret Create HelloWorld.
After a few seconds, the Egret tool creates a project called "HelloWorld" in the directory we set up. In the directory you set up, Egret will create the same project name as the project. You will see a folder called "HelloWorld" in the specified/volumes/mac1/egretdemo/directory. So the files for the current project all exist in this folder.
We will see four subfolders in the generated project folder.
Workspace //Egret Workspace
|-HelloWorld//Game
| |-src//Game code directory, the source code is stored in this directory, its file suffix named '. ts '.
|-|-RESOURCES//game Resource Directory, which holds the resources for the game, including picture files, audio files, resource profiles, etc.
|--launcher//Game entry, all Web pages that can be run to view game effects are stored in this folder.
|--index.html//Startup Files |--
libs//egret Engine Library |--
bin-debug//compiled code directory, the code that holds the current debug mode, most of the code in this folder is '. js ' File.
|--Egretproperties.json//egret Project compilation parameters