Skip to content

Commit 25dda26

Browse files
authored
Fix typos and grammar (#543)
1 parent 0f9e80b commit 25dda26

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

docs/en/manuals/addressing.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ Relative addressing works by automatically prepending the current naming context
111111

112112
### Shorthands
113113

114-
Defold provides two handy shorthands that you can use to send message without specifying a complete URL:
114+
Defold provides two handy shorthands that you can use to send messages without specifying a complete URL:
115115

116116
:[Shorthands](../shared/url-shorthands.md)
117117

@@ -155,7 +155,7 @@ The absolute address of the manager script is `"/manager#controller"` and this a
155155

156156
## Hashed identifiers
157157

158-
The engine stores all identifiers as hashed values. All functions that take as argument a component or a game object accepts a string, hash or an URL object. We have seen how to use strings for addressing above.
158+
The engine stores all identifiers as hashed values. All functions that take as argument a component or a game object accepts a string, hash or a URL object. We have seen how to use strings for addressing above.
159159

160160
When you get the identifier of a game object, the engine will always return an absolute path identifier that is hashed:
161161

@@ -190,7 +190,7 @@ go.set_position(pos, relative_id)
190190

191191
To complete the picture, let's look at the full format of Defold addresses: the URL.
192192

193-
An URL is an object, usually written as specially formatted strings. A generic URL consists of three parts:
193+
A URL is an object, usually written as a specially formatted string. A generic URL consists of three parts:
194194

195195
`[socket:][path][#fragment]`
196196

docs/en/manuals/message-passing.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Let's first look at a few simple usage examples. Suppose that you are building a
2020
![Message passing structure](images/message_passing/message_passing_structure.png)
2121

2222
::: sidenote
23-
The content of this example lives in two separate files. There is one file for the main bootstrap collection and one for the collection with the id "level". However, file names _do not matter_ in Defold. The identity you assign instances does.
23+
The content of this example lives in two separate files. There is one file for the main bootstrap collection and one for the collection with the id "level". However, file names _do not matter_ in Defold. The identity you assign to instances does.
2424
:::
2525

2626
The game contains a few simple mechanics that require communication between the objects:
@@ -110,7 +110,7 @@ The game contains a few simple mechanics that require communication between the
110110

111111
## Sending messages
112112

113-
The mechanics of sending a message is, as we have seen above, very simple. You call the function `msg.post()` which posts your message to the message queue. Then, each frame, the engine runs through the queue and delivers each message to its target address. For some system messages (like `"enable"`, `"disable"`, `"set_parent"` etc) the engine code handles the message. The engine also produces some system messages (like `"collision_response"` on physics collisions) that are delivered to your objects. For user messages sent to script components, the engine simply calls a special Defold Lua function named `on_message()`.
113+
The mechanics of sending a message are, as we have seen above, very simple. You call the function `msg.post()` which posts your message to the message queue. Then, each frame, the engine runs through the queue and delivers each message to its target address. For some system messages (like `"enable"`, `"disable"`, `"set_parent"` etc) the engine code handles the message. The engine also produces some system messages (like `"collision_response"` on physics collisions) that are delivered to your objects. For user messages sent to script components, the engine simply calls a special Defold Lua function named `on_message()`.
114114

115115
You can send arbitrary messages to any existing object or component and it is up to the code on the recipient side to respond to the message. If you send a message to a script component and the script code ignores the message, that is fine. The responsibility of dealing with messages is fully on the receiving end.
116116

@@ -151,7 +151,7 @@ There is a hard limit to the `message` parameter table size. This limit is set t
151151

152152
### Shorthands
153153

154-
Defold provides two handy shorthands that you can use to send message without specifying a complete URL:
154+
Defold provides two handy shorthands that you can use to send messages without specifying a complete URL:
155155

156156
:[Shorthands](../shared/url-shorthands.md)
157157

@@ -203,7 +203,7 @@ A more in depth description on how proxies work can be found in the [Collection
203203

204204
## Message chains
205205

206-
When a message that has been posted is eventually dispatched the recipients’ `on_message()` is called. It is quite common that the reaction code post new messages, which are added to the message queue.
206+
When a message that has been posted is eventually dispatched, the recipients’ `on_message()` is called. It is quite common that the reaction code posts new messages, which are added to the message queue.
207207

208208
When the engine starts dispatching it will work through the message queue and call each message recipient's `on_message()` function and go on until the message queue is empty. If the dispatching pass adds new messages to the queue, it will do another pass. There is, however, a hard limit to how many times the engine tries to empty the queue, which effectively puts a limit to how long message chains you can expect to be fully dispatched within a frame. You can easily test how many dispatch passes the engine performs between each `update()` with the following script:
209209

docs/en/manuals/script-properties.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ go.property("target", msg.url())
3131

3232
function init(self)
3333
-- store initial position of target.
34-
-- self.target is an url referencing another objects.
34+
-- self.target is a url referencing another object.
3535
self.target_pos = go.get_position(self.target)
3636
...
3737
end
@@ -78,7 +78,7 @@ function update(self, dt)
7878
end
7979
```
8080

81-
User-defined script properties can also be accessed through the getting, setting and animation functions, the same way as any other property:
81+
User-defined script properties can also be accessed through the get, set and animate functions, the same way as any other property:
8282

8383
```lua
8484
-- another.script
@@ -99,7 +99,7 @@ If you use a factory to create the game object, it is possible to set script pro
9999
local props = { health = 50, target = msg.url("player") }
100100
local id = factory.create("#can_factory", nil, nil, props)
101101

102-
-- Accessing to factory created script properties
102+
-- Accessing factory-created script properties
103103
local url = msg.url(nil, id, "can")
104104
local can_health = go.get(url, "health")
105105
```
@@ -117,7 +117,7 @@ local ids = collectionfactory.create("#cangang_factory", nil, nil, props)
117117

118118
The property values provided via `factory.create()` and `collectionfactory.create()` will override any value set in the prototype file as well as the default values in the script.
119119

120-
If several script components attached to a game object defines the same property, each component will get initialized with the value provided to `factory.create()` or `collectionfactory.create()`.
120+
If several script components attached to a game object define the same property, each component will get initialized with the value provided to `factory.create()` or `collectionfactory.create()`.
121121

122122

123123
## Resource properties

0 commit comments

Comments
 (0)