当前位置:网站首页>Wechat games (5)

Wechat games (5)

2022-06-22 07:25:00 qq_ forty-five million nine hundred and sixty-nine thousand fiv

This article is right Cocos creator Introduction to learning .

One 、Cocos creator brief introduction

Cocos Based on a larger perspective , It will cocos All development frameworks in the family 、 Tools and editors are integrated .
Cocos One stop solution for game development , Including from new project 、 Game making 、 The whole process from packaging to online . Developers can use cocos Fast code generation 、 Edit resources and animations , The final output is game products suitable for multiple platforms .

Two 、 Development scripts Java script

JavaScript Is a high-level scripting language belonging to the network , Has been widely used Web application development , Used to add various dynamic functions to web pages , Provide users with more smooth and beautiful browsing effect . Usually JavaScript The script is embedded in the HTML To realize its own functions .

3、 ... and 、Cocos creator Use

1. We are cocos creator Create a new one Hello JavaScript project , There will be one assets/Scene/hello world.fire file . Use cocos creator When developing games , A project can have only one .fire file . In a general way , I will rename this folder assets/scene, There is only main.fire file :assets/scene/main.fire.
2. double-click helloworld.fire file , You can see its structure in the hierarchy manager , The root node is a Canvas, Click on Canvas node , In the property panel on the right, you can see Canvas The components are Design Resolution attribute , As the size of the screen .
3.cocos creator Adopt component mode , Each node can mount different components , Including self-developed script components . Create a new one HelloWorld.js, All script classes associated with interface nodes inherit from cc.Component, We can state that Label attribute , Scenarios for associated interfaces num node .cc.Component A series of life cycle methods are defined , In different life cycles of nodes, the .

原网站

版权声明
本文为[qq_ forty-five million nine hundred and sixty-nine thousand fiv]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/173/202206220717147480.html