diff --git a/en/advanced-topics/assets-manager.md b/en/advanced-topics/assets-manager.md index 91d879211..6b4a1c745 100644 --- a/en/advanced-topics/assets-manager.md +++ b/en/advanced-topics/assets-manager.md @@ -62,7 +62,7 @@ The manifest file is a json format that we use to compare local and remote asset     "engineVersion": engine version     "assets": all asset lists         "key": the relative path of the asset (relative to the asset root) -        "md5": The md5 value represents the version information of the asset file +        "md5": The md5 hash represents the version information of the asset file         "compressed": [optional] If the value is true, the file is automatically downloaded after being extracted, currently only supports zip compression format         "size": [optional] The byte size of the file used to quickly get progress information     "searchPaths": A list of search paths that need to be added to FileUtils diff --git a/en/advanced-topics/oc-reflection.md b/en/advanced-topics/oc-reflection.md index 61e236c6c..f8c5a3774 100644 --- a/en/advanced-topics/oc-reflection.md +++ b/en/advanced-topics/oc-reflection.md @@ -39,7 +39,7 @@ import +(NSString *)callNativeWithReturnString; ``` -## Useage +## Usage - In JS code, for invoking the native method `callNativeUIWithTitle:andContent:` of `NativeOcClass`, we can use `jsb.reflection.callStaticMethod` API like this: diff --git a/en/components/button.md b/en/components/button.md index 64cd2968a..20778a8cb 100755 --- a/en/components/button.md +++ b/en/components/button.md @@ -13,7 +13,7 @@ Click the **Add Component** button at the bottom of the **Properties** panel and | Property | Function explanation | -------------- | ----------- | |Interactable| Boolean type, if set to false then the Button component enters the forbidden state. -|enableAutoGrayEffect| Boolean type, if set to true, the Button's target sprite will turn gray when interactable is false. Don't take effect when Transition type is SPRITE and the disabledSprite property is exists. +|enableAutoGrayEffect| Boolean type, if set to true, the Button's target sprite will turn gray when interactable is false. |Transition| Enumeration type, including NONE, COLOR and SPRITE. Each type corresponds to a different Transition setting. Please see the **Button Transition** section below for details. | |Click Event| Default list type is null. Each event added by the user is composed of the node reference, component name and a response function. Please see the **Button Event** section below for details. @@ -61,7 +61,7 @@ Button Transition is used to indicate the status of the Button when clicked by t The Button can additionally add a Click event to respond to the player's click action. There are two ways to do this. -### Add a callback throught the Properties. +### Add a callback through the Properties. ![button-event](./button/button-event.png) diff --git a/en/components/layout.md b/en/components/layout.md index d826b147f..6c9f9e083 100755 --- a/en/components/layout.md +++ b/en/components/layout.md @@ -52,7 +52,7 @@ row before a new row is started. When choosing Vertical, it will fill an entire Node: 1. Scaling and rotation of child nodes are not considered. -2. After setting the Layout, the results need to be updated until the next frame, unless you manually 'updateLayout' api. +2. After setting the Layout, the results need to be updated until the next frame, unless you manually call `updateLayout` api. --- diff --git a/en/components/videoplayer.md b/en/components/videoplayer.md index 7a5cdbb71..2595e1acb 100644 --- a/en/components/videoplayer.md +++ b/en/components/videoplayer.md @@ -24,7 +24,7 @@ For more information about VideoPlayer's scripting interface, please refer to [V | Current Time | The current time when video start to play. | Volume | The volume of the video. (0.0 ~ 1.0) | | Mute | Mutes the VideoPlayer. Mute sets the volume=0, Un-Mute restore the original volume. | -| Keep Aspect Ratio | Whether keep the aspect ration of the original video. +| Keep Aspect Ratio | Whether keep the aspect ratio of the original video. | Is Fullscreen| Whether play video in fullscreen mode. | Video Player Event| the video player's callback, it will be triggered when certain event occurs. Please refer to the `VideoPlayer Event` section below or [VideoPlayerEvent API](../../../api/en/classes/VideoPlayer.html#videoplayerevent) for more details. diff --git a/en/content-workflow/node-component.md b/en/content-workflow/node-component.md index f91b4858c..46ceb0870 100755 --- a/en/content-workflow/node-component.md +++ b/en/content-workflow/node-component.md @@ -52,7 +52,7 @@ We can add multiple components to one node so that we can extend features to the Then set the Button component according to the following picture (the actual color attribute can be set freely according to your own taste): -![button property](node-component/button_property.jpeg) +![button property](node-component/button_property.png) Next, click the **Preview** button on the toolbar ![preview](../getting-started/basics/toolbar/preview.png) and hover the mouse over the sprite image in the browser window. You can then see the color of the image changes which means the **Button** component on the node has taken effect! diff --git a/en/content-workflow/node-component/button_property.png b/en/content-workflow/node-component/button_property.png new file mode 100644 index 000000000..2c5153a73 Binary files /dev/null and b/en/content-workflow/node-component/button_property.png differ diff --git a/en/content-workflow/node-component/drag_spriteframe.png b/en/content-workflow/node-component/drag_spriteframe.png index 4b943933a..39aa83428 100644 Binary files a/en/content-workflow/node-component/drag_spriteframe.png and b/en/content-workflow/node-component/drag_spriteframe.png differ diff --git a/en/content-workflow/node-component/inspector.png b/en/content-workflow/node-component/inspector.png index c0e4789d5..5c04f3523 100644 Binary files a/en/content-workflow/node-component/inspector.png and b/en/content-workflow/node-component/inspector.png differ diff --git a/en/content-workflow/node-tree.md b/en/content-workflow/node-tree.md index 0017b0cbc..8fd6b14f4 100644 --- a/en/content-workflow/node-tree.md +++ b/en/content-workflow/node-tree.md @@ -11,7 +11,7 @@ When creating and positioning nodes in **Scene** panel you get the convenience o **Node tree** is a data structure that arranges the hierarchy of nodes in scene, it's also called **Scene Graph** in cocos2d-x term. -You can read the [Basic concepts chapter of the Cocos2d-x programmer guide](http://docs.cocos2d-x.org/cocos2d-x/en/basic_concepts/), it describes the node tree very well with some pictures below. +You can read the [Basic concepts chapter of the Cocos2d-x programmer guide](https://docs.cocos.com/cocos2d-x/manual/en/basic_concepts/), it describes the node tree very well with some pictures below. Here's a simple game scene with background image, 3 actors, some text and a start game button: diff --git a/en/getting-started/basics/editor-panels/node-library.md b/en/getting-started/basics/editor-panels/node-library.md index c9f98de61..44ca30567 100644 --- a/en/getting-started/basics/editor-panels/node-library.md +++ b/en/getting-started/basics/editor-panels/node-library.md @@ -4,7 +4,7 @@ **Node Library** is a very simple direct visual control of the warehouse, We can drag and drop the preset node to the **Scene** or **Hierarchy**, quickly complete the creation of preset node. -When wo use the default layout, the node library will be displayed in the editor. If we use the editor's layout is not included node library, We can open the node library via the main menu `Panel->Node Library`, then drag it to editor. +When we use the default layout, the node library will be displayed in the editor. If we use the editor's layout is not included node library, We can open the node library via the main menu `Panel->Node Library`, then drag it to editor. **Node Library** includes two categories, represented by the two tabs: diff --git a/en/publish/publish-android-instant.md b/en/publish/publish-android-instant.md index 0a4c45cab..a907c5425 100644 --- a/en/publish/publish-android-instant.md +++ b/en/publish/publish-android-instant.md @@ -29,7 +29,7 @@ With games developed by Cocos Creator, just choose Google Play Instant as the pu ![](publish-android-instant/studio_setting.png) -3. If you need **refactor**, you can click the **Record** button in the **build** panel, and simulator will be opened. The simulatior will automatically record the resources used. What we need to do is to play the game according to the game flow and let the simulator record resources information. +3. If you need **refactor**, you can click the **Record** button in the **build** panel, and simulator will be opened. The simulator will automatically record the resources used. What we need to do is to play the game according to the game flow and let the simulator record resources information. ![](./publish-android-instant/record.png) @@ -60,7 +60,7 @@ The **Refactor** is used to edit the first package of the game and select the re ![](publish-android-instant/refactor_desc.png) -### Useage +### Usage 1. When you finish the Record, Click **Refactor** to open Refactor panel. diff --git a/en/publish/publish-native.md b/en/publish/publish-native.md index f33a907de..15c2e218c 100755 --- a/en/publish/publish-native.md +++ b/en/publish/publish-native.md @@ -63,6 +63,10 @@ Android requires that all APKs be digitally signed with a certificate before the Creator added the **App Bundle (Google Play)** option to the **v2.0.9**. If you choose Android or Android Instant platform, check this option to package the game into App Bundle format for uploading to Google Play store. Please refer to [Official Document](https://developer.android.com/guide/app-bundle/) for details. +### SDKBox + +SDKBox is a free tool for mobile game developers that aids in easily integrating popular social services and other SDKs with just a few lines of code. Support for nearly 30 SDKs such as Apple and Google's IAP In-App Purchases, all SDKs are rigorously tested and officially certified. Please refer to [SDKBox](../sdk/sdkbox.md) for detail. + ### Encrypt JS Encrypt the published script. After build, the JSC file is generated in the `src` directory, which is encrypted. And JS files will be backed up in the `js backups` directory for debugging, and will not enter the APP when packaged. diff --git a/en/publish/publish-oppo-instant-games.md b/en/publish/publish-oppo-instant-games.md index fdbe7e88a..8e66ec93d 100644 --- a/en/publish/publish-oppo-instant-games.md +++ b/en/publish/publish-oppo-instant-games.md @@ -26,11 +26,11 @@ The specific filling rules for the relevant parameter configuration are as follo - **Game Package Name** - **Game Package Name** is required and is filled in according to the user's needs. + **Game Package Name** is filled in according to the user's needs. It's required. - **Game Name** - **Game Name** is required. Is the name of the OPPO Mini Game. And the **Title** at the top of the **Build** panel does not participate in the OPPO mini game packaging process. + **Game Name**, the name of the OPPO Mini Game, is required. And the **Title** at the top of the **Build** panel does not participate in the OPPO mini game packaging process. - **Desktop Icon** diff --git a/en/publish/publish-vivo-instant-games.md b/en/publish/publish-vivo-instant-games.md index 33eec3e6e..f3449a124 100644 --- a/en/publish/publish-vivo-instant-games.md +++ b/en/publish/publish-vivo-instant-games.md @@ -40,11 +40,11 @@ The specific filling rules for the relevant parameter configuration are as follo - **App Package Name** - **App Package Name** is required and is filled in according to the user's needs. + **App Package Name** is filled in according to the user's needs. It's require. - **App Name** - **App Name** is required. Is the name of the vivo Mini Game. And the **Title** at the top of the **Build** panel does not participate in the vivo mini game packaging process. + **App Name**, the name of the vivo Mini Game, is required. And the **Title** at the top of the **Build** panel does not participate in the vivo mini game packaging process. - **Desktop Icon** diff --git a/en/publish/publish-web.md b/en/publish/publish-web.md index fdb7a9ba4..9521a7939 100755 --- a/en/publish/publish-web.md +++ b/en/publish/publish-web.md @@ -22,7 +22,8 @@ When merging assets automatically, all JSON files that the Start Scene depends o ### MD5 Cache -Compute MD5 to rename all resources, to resolve the CDN cache problem. +Append MD5 hash to the exported assets for resolving CDN or browser cache issue. + After being enabled, if any resource fails to load, it is because the renamed new file can not be found. It is usually because some third party resources was not loaded by `cc.loader`. If this happens, you can convert the url before loading, to fix the loading problem. ```js diff --git a/en/publish/publish-wechatgame-sub-domain.md b/en/publish/publish-wechatgame-sub-domain.md index cc05a88cb..a5c51bebc 100644 --- a/en/publish/publish-wechatgame-sub-domain.md +++ b/en/publish/publish-wechatgame-sub-domain.md @@ -1,6 +1,6 @@ # Access to the Open Data Context of WeChat Mini Games -In order to protect its social relationship chain data, **WeChat Mini Games** has added the concept of **Open Data Context**, which is a separate game execution environment. The resources, engines, and programs in the open data context are completely isolated from the main game. Developers can access the `wx.getFriendCloudStorage()` and `wx.getGroupCloudStorage()`, the two APIs provided by __WeChat__, only in the open data context. These API's will help to implement some features, such as leaderboards. Since the open data context can only be rendered on the offscreen canvas, `sharedCanvas`, we need to draw the `sharedCanvas` onto the main context. +In order to protect its social relationship chain data, **WeChat Mini Games** has added the concept of **Open Data Context**, which is a separate game execution environment. The resources, engines, and programs in the open data context are completely isolated from the main game. Developers can access the `wx.getFriendCloudStorage()` and `wx.getGroupCloudStorage()`, the two APIs provided by __WeChat__, only in the open data context. These APIs will help to implement some features, such as leaderboards. Since the open data context can only be rendered on the offscreen canvas, `sharedCanvas`, we need to draw the `sharedCanvas` onto the main context. Since the open data context is a closed, independent JavaScript scope, developers need to create two projects: @@ -17,7 +17,7 @@ The updated version is supported in __v2.0.1__ and higher, for __v1.9.1__ to __v ### Integration method -- Create an open data context project to obtain user data through the relevant API, and create a display of ui according to your own needs. The entire open data context project should only contain its content UI. The design resolution of the Canvas component in the scene should be set to the full resolution of the UI, without the corresponding main context resolution. +- Create an open data context project to obtain user data through the relevant API, and create a display of UI according to your own needs. The entire open data context project should only contain its content UI. The design resolution of the Canvas component in the scene should be set to the full resolution of the UI, without the corresponding main context resolution. - Create a node in the main context as an open data context container, add the `WXSubContextView` component to set the open data context view and update the open data context texture. The aspect ratio of this node should be equal to the aspect ratio of the open data context design resolution (otherwise stretching happens). The difference from the previous version is: @@ -100,7 +100,7 @@ The following method is applicable to v2.0.0. For earlier versions, please refer ### Integration method -- Create an open data context project to obtain user data through the relevant API, and create a display of ui according to your own needs. The open data context must use a full screen window, maintaining the same design resolution and adaptation mode as the main context. +- Create an open data context project to obtain user data through the relevant API, and create a display of UI according to your own needs. The open data context must use a full screen window, maintaining the same design resolution and adaptation mode as the main context. - The main context creates the Texture2D by acquiring the global object sharedCanvas (Canvas of the open data context), and then creates the SpriteFrame through the Texture2D, thereby assigning the SpriteFrame to the Sprite to be displayed to the main context, if the open data context is operational function (for example, operations such as sliding, dragging, etc.), then the main context needs to get the sharedCanvas in real time in the update to refresh the sprite. ### Module selection diff --git a/en/scripting/access-node-component.md b/en/scripting/access-node-component.md index 2e1d85f98..ef085c46e 100644 --- a/en/scripting/access-node-component.md +++ b/en/scripting/access-node-component.md @@ -194,7 +194,7 @@ If you already have the reference of a node or component in somewhere, you can a > You should use global variable with care and understanding, we do not recommend using it, you had better keep them readonly if really need to do that. -Let's define a global object `window.Global`, it will cantain two properties, `backNode` and `backLabel`. +Let's define a global object `window.Global`, it will contain two properties, `backNode` and `backLabel`. ```js // Globals.js, this file can have any name diff --git a/en/scripting/action-list.md b/en/scripting/action-list.md index 1cea2e687..5ce46a7fd 100755 --- a/en/scripting/action-list.md +++ b/en/scripting/action-list.md @@ -34,7 +34,7 @@ The developer can get to know the basic API for every action type in these actio | cc.flipX | X-axis flip | [API description](../../../api/en/modules/cc.html#flipX) | | cc.flipY | Y-axis flip | [API description](../../../api/en/modules/cc.html#flipY) | | cc.place | place at the target location | [API description](../../../api/en/modules/cc.html#place) | -| cc.callFunc | execute callback fuction | [API description](../../../api/en/modules/cc.html#callFunc) | +| cc.callFunc | execute callback function | [API description](../../../api/en/modules/cc.html#callFunc) | | cc.targetedAction | create action with existant action and a new target node | [API description](../../../api/en/modules/cc.html#targetedAction) | ## Interval action diff --git a/en/scripting/class.md b/en/scripting/class.md index 3f5d380db..f39d50f51 100644 --- a/en/scripting/class.md +++ b/en/scripting/class.md @@ -24,7 +24,7 @@ var obj = new Sprite(); ## Judge class -When you need to judget the class of an object, you can use the JavaScript built-in `instanceof`: +When you need to judge the class of an object, you can use the JavaScript built-in `instanceof`: ```javascript cc.log(obj instanceof Sprite); // true diff --git a/en/scripting/internal-events.md b/en/scripting/internal-events.md index 0f2ff8248..ae0b7292f 100755 --- a/en/scripting/internal-events.md +++ b/en/scripting/internal-events.md @@ -33,7 +33,7 @@ The Mouse event will only be triggered on desktop platforms, the event types the The important APIs of mouse events(`cc.Event.EventMouse`)are as follows(`cc.Event` standard events API excluded): -| fuction name | returned value type | meaning | +| function name | returned value type | meaning | | ------ |:-------:|:----:| | `getScrollY` | `Number` | get the y axis distance wheel scrolled, effective only when scrolling | | `getLocation` | `Object` | get mouse location object which includes x and y properties | diff --git a/en/scripting/javascript-primer.md b/en/scripting/javascript-primer.md index 58573770a..27da54571 100755 --- a/en/scripting/javascript-primer.md +++ b/en/scripting/javascript-primer.md @@ -188,7 +188,7 @@ myProfile.name; // Jare Guo myProfile.friends[1].name; // Nantas ``` -Objects are being largely used in JavaScript, and so is it in the fuction parameter passing. For example, in Cocos Creator, we can define the FireClass object like this: +Objects are being largely used in JavaScript, and so is it in the function parameter passing. For example, in Cocos Creator, we can define the FireClass object like this: ```js var MyComponent = cc.Class({ @@ -208,7 +208,7 @@ myFunction = function (myArgument) { } ``` -Now let's go over the method of introducing a function as a parameter into other fuctions: +Now let's go over the method of introducing a function as a parameter into other functions: ```js square = function (a) { @@ -244,10 +244,10 @@ Now, we will introduce a type of grammar often used in array and character strin var myArray = [123, 456]; myArray.push(789) // 123, 456, 789 var myString = "abcdef"; -myString.replace("a", "z"); // "zbcdef" +myString = myString.replace("a", "z"); // "zbcdef" ``` -The point symbol in the code above means "call `replace` a fuction of the `myString` character string object, and pass `a` and `z` as parameters, then get the returned value". +The point symbol in the code above means "call `replace` a function of the `myString` character string object, and pass `a` and `z` as parameters, then get the returned value". The biggest advantage of using point symbol expression is that you can link multiple tasks into one expression, which of course is on the condition of each function being called having the proper returned value. We won't spend too much time on introducing how to define a linkable function, but it's pretty simple to use them as long as you use the following pattern: `something.function1().function2().function3()` diff --git a/en/scripting/scheduler.md b/en/scripting/scheduler.md index 36dd0acb4..34015d00e 100755 --- a/en/scripting/scheduler.md +++ b/en/scripting/scheduler.md @@ -73,6 +73,6 @@ Below are all the functions of the timer in the component: These detailed descriptions about API can all be found in [Component API](http://docs.cocos2d-x.org/creator-api/en/classes/Component.html). -Besides this, if every frame needs to run a function, please add function `update` directly in to the component, so this function will be called by every frame. A detailed description can be found in [life cycle file](life-cycle-callbacks.md#update). +Besides this, if every frame needs to run a function, please add function `update` directly into the component, so this function will be called by every frame. A detailed description can be found in [life cycle file](life-cycle-callbacks.md#update). ### Caution: `cc.Node` does not contain Scheduler API \ No newline at end of file diff --git a/en/scripting/tween.md b/en/scripting/tween.md index 0293024bf..a63be9d13 100644 --- a/en/scripting/tween.md +++ b/en/scripting/tween.md @@ -95,28 +95,28 @@ cc.tween().to(1, { scale: 2 }, { easing: 'sineOutIn'}) cc.tween().to(1, { scale: 2 }, { easing: t => t*t; }) // Use the easing function only for a single property -// value must be used with easing or process +// value must be used with easing or progress cc.tween().to(1, { scale: 2, position: { value: cc.v3(100, 100, 100), easing: 'sineOutIn' } }) ``` -## Custom process +## Custom progress -Compared to easing, custom process function has more freedom to control the easing process. +Compared to easing, custom progress function has more freedom to control the easing process. ```js -// Customize the process for all properties +// Customize the progress for all properties cc.tween().to(1, { scale: 2, rotation: 90 }, { progress: (start, end, current, ratio) => { return start + (end - start) * ratio; } }) -// Customize the process for a single property +// Customize the progress for a single property cc.tween().to(1, { scale: 2, position: { value: cc.v3(), - process: (start, end, current, t) => { + progress: (start, end, current, t) => { // Note that the passed in property is cc.Vec3, so you need to use Vec3.lerp for interpolation calculations return start.lerp(end, t, current); } diff --git a/en/sdk/anysdk.md b/en/sdk/anysdk.md index 5dec35d59..c08c120f1 100644 --- a/en/sdk/anysdk.md +++ b/en/sdk/anysdk.md @@ -12,7 +12,7 @@ Because the AnySDK service only supports games under the company account, you ne - **Create a game through the Cocos Account Center** - Create a company game by entering the [Cocos Account Center](https://auth.cocos.com/#/) through Creator's **Service** panel. Please refer to the [Service panel -> Useage](cocos-services.md#usage) for details. + Create a company game by entering the [Cocos Account Center](https://auth.cocos.com/#/) through Creator's **Service** panel. Please refer to the [Service panel -> Usage](cocos-services.md#usage) for details. ![](anysdk/game.png) diff --git a/en/ui/label-layout.md b/en/ui/label-layout.md index 4ca514fd8..35d2b0326 100755 --- a/en/ui/label-layout.md +++ b/en/ui/label-layout.md @@ -110,7 +110,7 @@ Add a **Widget** component to the node with the Label component, then you can ma In the above picture, two Label subnodes are added to the background nodes. After respectively adding the Widget component to them, set the `Right` property of the Widget for the labels on the left side as `50%`, and set the `Left` property of the Widget for the labels on the right side as `60%`, then the multi-column layout of labels in the picture above can be realized. -And by setting margins on the aWidget, plus the layout type of labels, a flexible and beautiful layout for labels can be easily realized without concrete and minor adjustments to the bounding box. +And by setting margins on the Widget, plus the layout type of labels, a flexible and beautiful layout for labels can be easily realized without concrete and minor adjustments to the bounding box. ## Reference for checking components diff --git a/zh/components/button.md b/zh/components/button.md index 9727c87b9..78ea804da 100644 --- a/zh/components/button.md +++ b/zh/components/button.md @@ -16,7 +16,7 @@ Button 组件可以响应用户的点击操作,当用户点击 Button 时,Bu | -------------- | ----------- | | Target | Node 类型,当 Button 发生 Transition 的时候,会相应地修改 Target 节点的 SpriteFrame,颜色或者 Scale。 | | interactable | 布尔类型,设为 false 时,则 Button 组件进入禁用状态。 | -| enableAutoGrayEffect | 布尔类型,当设置为 true 的时候,如果 button 的 interactable 属性为 false,则 button 的 sprite Target 会使用内置 shader 变灰。| +| enableAutoGrayEffect | 布尔类型,当设置为 true 的时候,如果 button 的 interactable 属性为 false,则 button 的 sprite Target 会变为灰度。| | Transition | 枚举类型,包括 NONE, COLOR,SPRITE 和 SCALE。每种类型对应不同的 Transition 设置。详情见下方的 **Button Transition** 部分。 | | Click Event | 列表类型,默认为空,用户添加的每一个事件由节点引用,组件名称和一个响应函数组成。详情见下方的 **Button 事件** 部分。 | diff --git a/zh/components/layout.md b/zh/components/layout.md index 7a66361e9..f9de43214 100644 --- a/zh/components/layout.md +++ b/zh/components/layout.md @@ -54,4 +54,4 @@ Layout 是一种容器组件,容器能够开启自动布局功能,自动按 注意: 1. Layout 不会考虑子节点的缩放和旋转。 - 2. Layout 设置后的结果需要到下一帧才会更新,除非你设置完以后手动调用 'updateLayout' API。 + 2. Layout 设置后的结果需要到下一帧才会更新,除非你设置完以后手动调用 `updateLayout` API。 diff --git a/zh/content-workflow/node-component.md b/zh/content-workflow/node-component.md index 3b575d1a8..678c7f221 100644 --- a/zh/content-workflow/node-component.md +++ b/zh/content-workflow/node-component.md @@ -52,7 +52,7 @@ Cocos Creator 的工作流程是以组件式开发为核心的,组件式架构 之后按照下图对 Button 组件的属性进行设置(具体的颜色属性可以根据爱好自由设置): -![button property](node-component/button_property.jpeg) +![button property](node-component/button_property.png) 接下来点击工具栏上面的 **运行预览** 按钮 ![preview](../getting-started/basics/toolbar/preview.png),并在浏览器运行窗口中将鼠标悬停在图片上,可以看到图片的颜色发生变化,也就是我们为节点添加的 Button 组件行为生效了! diff --git a/zh/content-workflow/node-component/button_property.jpeg b/zh/content-workflow/node-component/button_property.jpeg deleted file mode 100644 index de041efe1..000000000 Binary files a/zh/content-workflow/node-component/button_property.jpeg and /dev/null differ diff --git a/zh/content-workflow/node-component/button_property.png b/zh/content-workflow/node-component/button_property.png new file mode 100644 index 000000000..2c5153a73 Binary files /dev/null and b/zh/content-workflow/node-component/button_property.png differ diff --git a/zh/content-workflow/node-component/drag_spriteframe.png b/zh/content-workflow/node-component/drag_spriteframe.png index 57d868f62..39aa83428 100644 Binary files a/zh/content-workflow/node-component/drag_spriteframe.png and b/zh/content-workflow/node-component/drag_spriteframe.png differ diff --git a/zh/content-workflow/node-component/inspector.png b/zh/content-workflow/node-component/inspector.png index 824e0e494..5c04f3523 100644 Binary files a/zh/content-workflow/node-component/inspector.png and b/zh/content-workflow/node-component/inspector.png differ diff --git a/zh/content-workflow/node-tree.md b/zh/content-workflow/node-tree.md index da6d0a42e..b18036c6d 100644 --- a/zh/content-workflow/node-tree.md +++ b/zh/content-workflow/node-tree.md @@ -10,7 +10,7 @@ 通过层级管理器或运行时脚本的操作,建立的节点之间的完整逻辑关系,就叫做节点树。 -我们用来自 [Cocos2d-x Programmer Guide](http://docs.cocos2d-x.org/cocos2d-x/en/basic_concepts/) 的一组图片来展示什么是节点树: +我们用来自 [Cocos2d-x Programmer Guide](https://docs.cocos.com/cocos2d-x/manual/zh/basic_concepts/) 的一组图片来展示什么是节点树: 下面是一个简单的游戏场景,包括背景图像,三个角色,标题文字,分数文字和开始游戏的按钮: diff --git a/zh/publish/publish-native.md b/zh/publish/publish-native.md index 327ff7dfc..2b49722a4 100644 --- a/zh/publish/publish-native.md +++ b/zh/publish/publish-native.md @@ -62,6 +62,10 @@ Android 要求所有 APK 必须先使用证书进行数字签署,然后才能 Creator 在 **v2.0.9** 中新增了 **App Bundle (Google Play)** 选项。如果选择 Android 或者 Android Instant 平台,勾选该项即可将游戏打包成 App Bundle 格式用于上传到 Google Play 商店。具体请参考 [官方文档](https://developer.android.com/guide/app-bundle/)(需要使用 VPN) +### SDKBox + +SDKBox 是免费的让移动游戏开发人员简单轻松集成第三方 SDK 的工具,主要面向海外的各种平台和服务。支持苹果和谷歌的 IAP 内购等近 30 种 SDK,所有的 SDK 都经过严格的测试与官方认证。详情请参考 [SDKBox](../sdk/sdkbox.md)。 + ### 加密脚本 加密发布后的脚本。会在构建后的 `src` 目录下生成 jsc 文件,这个文件是加密过的。而 js 文件会备份在 `js backups` 目录下以便调试,打包时不会进入 APP 中。 diff --git a/zh/publish/publish-web.md b/zh/publish/publish-web.md index 1630c8571..cf755dd37 100644 --- a/zh/publish/publish-web.md +++ b/zh/publish/publish-web.md @@ -22,7 +22,8 @@ Cocos Creator 提供了两种 Web 平台的页面模板,可以通过 **发布 ### MD5 Cache -给构建后的所有资源文件名将加上 MD5 信息,解决 CDN 资源缓存问题。 +给构建后的所有资源加上 MD5 信息,解决 CDN 或者浏览器资源缓存问题。 + 启用后,如果出现资源加载不了的情况,说明找不到重名后的新文件。这通常是因为有些第三方资源没通过 cc.loader 加载引起的。这时可以在加载前先用以下方法转换 url ,转换后的路径就能正确加载。 ```js diff --git a/zh/scripting/tween.md b/zh/scripting/tween.md index b05163832..dfd8316d5 100644 --- a/zh/scripting/tween.md +++ b/zh/scripting/tween.md @@ -94,28 +94,28 @@ cc.tween().to(1, { scale: 2 }, { easing: 'sineOutIn'}) cc.tween().to(1, { scale: 2 }, { easing: t => t*t; }) // 只对单个属性使用 easing 函数 -// value 必须与 easing 或者 process 配合使用 +// value 必须与 easing 或者 progress 配合使用 cc.tween().to(1, { scale: 2, position: { value: cc.v3(100, 100, 100), easing: 'sineOutIn' } }) ``` -## 自定义 process +## 自定义 progress -相对于 easing,自定义 process 函数可以更自由的控制缓动的过程。 +相对于 easing,自定义 progress 函数可以更自由的控制缓动的过程。 ```js -// 对所有属性自定义 process +// 对所有属性自定义 progress cc.tween().to(1, { scale: 2, rotation: 90 }, { progress: (start, end, current, ratio) => { return start + (end - start) * ratio; } }) -// 对单个属性自定义 process +// 对单个属性自定义 progress cc.tween().to(1, { scale: 2, position: { value: cc.v3(), - process: (start, end, current, t) => { + progress: (start, end, current, t) => { // 注意,传入的属性为 cc.Vec3,所以需要使用 Vec3.lerp 进行插值计算 return start.lerp(end, t, current); }