Преглед на файлове

Merge branch 'master' of https://github.com/defold/doc

Björn Ritzl преди 5 години
родител
ревизия
519cb18dbe
променени са 4 файла, в които са добавени 8 реда и са изтрити 3 реда
  1. 1 1
      docs/en/manuals/android.md
  2. 1 1
      docs/en/manuals/application-lifecycle.md
  3. 5 0
      docs/en/manuals/debugging-game-logic.md
  4. 1 1
      docs/en/manuals/physics.md

+ 1 - 1
docs/en/manuals/android.md

@@ -19,7 +19,7 @@ You can find more information from the [Google Play developer console](https://p
 
 ## Creating certificates and keys
 
-You need the to create certificates in *.pem*-format and keys in *.pk8*-format. You can generate these with the `openssl` tool:
+You need to create certificates in *.pem*-format and keys in *.pk8*-format. You can generate these with the `openssl` tool:
 
 ```sh
 $ openssl genrsa -out key.pem 2048

+ 1 - 1
docs/en/manuals/application-lifecycle.md

@@ -68,7 +68,7 @@ The update loop runs through a long sequence once every frame. The update sequen
 
 ## Input
 
-Input is is read from available devices, mapped against [input bindings](/manuals/input) and then dispatched. Any game object that has acquired input focus gets input sent to all its components' `on_input()` functions. A game object with a script component and a GUI component with a GUI script will get input to both components’ `on_input()` functions---given that they are defined and that they have acquired input focus.
+Input is read from available devices, mapped against [input bindings](/manuals/input) and then dispatched. Any game object that has acquired input focus gets input sent to all its components' `on_input()` functions. A game object with a script component and a GUI component with a GUI script will get input to both components’ `on_input()` functions---given that they are defined and that they have acquired input focus.
 
 Any game object that has acquired input focus and contains collection proxy components dispatches input to components inside the proxy collection. This process continues recursively down enabled collection proxies within enabled collection proxies.
 

+ 5 - 0
docs/en/manuals/debugging-game-logic.md

@@ -17,6 +17,10 @@ In addition to printing, the engine can also draw debug text and straight lines
 -- Draw value of "my_val" with debug text on the screen
 msg.post("@render:", "draw_text", { text = "My value: " .. my_val, position = vmath.vector3(200, 200, 0) })
 
+-- Draw colored text on the screen
+local color_green = vmath.vector4(0, 1, 0, 1)
+msg.post("@render:", "draw_debug_text", { text = "Custom color", position = vmath.vector3(200, 180, 0), color = color_green })
+
 -- Draw debug line between player and enemy on the screen
 local start_p = go.get_position("player")
 local end_p = go.get_position("enemy")
@@ -28,6 +32,7 @@ The visual debug messages adds data to the rendering pipeline and is drawn as pa
 
 * `"draw_line"` adds data that is rendered with the `render.draw_debug3d()` function in the render script.
 * `"draw_text"` is rendered with the "/builtins/fonts/system_font.font" that uses the "/builtins/fonts/system_font.material" material.
+* `"draw_debug_text"` is the same as `"draw_text"`, but it's rendered in a custom color.
 
 Note that you probably want to update this data every frame so posting the messages in the `update()` function is a good idea.
 

+ 1 - 1
docs/en/manuals/physics.md

@@ -213,7 +213,7 @@ For a game or application where you need to separate objects perfectly, the `"co
 
 Triggers are light weight collision objects. Thay are similar to ray casts in that they read the physics world as opposed to interacting with it.
 
-In a trigger collision `"collision_response"` messages are sent. In addition, triggers also send a special `"trigger_response"` message when the collision begins and end. The message has the following fields:
+In a trigger collision `"collision_response"` messages are sent. In addition, triggers also send a special `"trigger_response"` message when the collision begins and ends. The message has the following fields:
 
 `other_id`
 : the id of the instance the collision object collided with (`hash`).