当前位置:网站首页>Cocos learning diary 1 - node

Cocos learning diary 1 - node

2022-06-23 04:40:00 herb. dr

Catalog

One 、 Picture node

1.1 Create sprite node

1.2 Put the picture on the node

Two 、 Text node

2.1 Node action

2.2 Add a node

3、 ... and 、UI node

3.1 effect

3.2 establish

3.3 Button node structure

Four 、 Nodes and components

4.1 Add components to the node  

4.2 Delete the component on the node

4.3 The relationship between components and nodes


One 、 Picture node

1.1 Create sprite node

1.2 Put the picture on the node

Drag the picture to the right

Two 、 Text node

2.1 Node action

Then the text is displayed on the screen

2.2 Add a node

3、 ... and 、UI node

3.1 effect

button、EditBox And so on. , For user input

3.2 establish

3.3 Button node structure

It has a three-tier structure , Namely press-button control > Button background > The text in the button

Among them, the button background can put pictures and so on

Button control can control the state of the button

Four 、 Nodes and components

4.1 Add components to the node  

 

4.2 Delete the component on the node

 

4.3 The relationship between components and nodes

1、 The node itself has no type , What really works is the component

Picture node = Node + Sprite Components

2、 A node can be attached to multiple components

However, only one rendering component can be attached , Can not be hung at the same time Sprite and Label

原网站

版权声明
本文为[herb. dr]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/174/202206222338455854.html