Ver código fonte

Merge branch 'master' into master

Alexey Gulev 8 anos atrás
pai
commit
1c545ca455

+ 7 - 7
examples/_main/loader.go

@@ -29,9 +29,9 @@ components {
   }
 }
 embedded_components {
-  id: "basics/simple move"
+  id: "basics/simple_move"
   type: "collectionproxy"
-  data: "collection: \"/examples/basics/simple move/simple move.collection\"\n"
+  data: "collection: \"/examples/basics/simple_move/simple_move.collection\"\n"
   "exclude: false\n"
   ""
   position {
@@ -65,9 +65,9 @@ embedded_components {
   }
 }
 embedded_components {
-  id: "basics/message passing"
+  id: "basics/message_passing"
   type: "collectionproxy"
-  data: "collection: \"/examples/basics/message passing/message passing.collection\"\n"
+  data: "collection: \"/examples/basics/message_passing/message_passing.collection\"\n"
   "exclude: false\n"
   ""
   position {
@@ -101,9 +101,9 @@ embedded_components {
   }
 }
 embedded_components {
-  id: "basics/parent child"
+  id: "basics/parent_child"
   type: "collectionproxy"
-  data: "collection: \"/examples/basics/parent child/parent child.collection\"\n"
+  data: "collection: \"/examples/basics/parent_child/parent_child.collection\"\n"
   "exclude: false\n"
   ""
   position {
@@ -353,7 +353,7 @@ embedded_components {
   }
 }
 embedded_components {
-  id: "input/down duration"
+  id: "input/down_duration"
   type: "collectionproxy"
   data: "collection: \"/examples/input/down_duration/down_duration.collection\"\n"
   "exclude: false\n"

+ 1 - 1
examples/_main/menu.gui_script

@@ -100,7 +100,7 @@ end
 
 function init(self)
 	self.index = { "basics", "physics", "animation", "gui", "input", "audio", "render", "camera", "debug" }
-	self.index["basics"] = { "simple move", "message passing", "follow", "parent child", "spawn" }
+	self.index["basics"] = { "simple_move", "message_passing", "follow", "parent_child", "spawn" }
 	self.index["physics"] = { "dynamic", "kinematic", "trigger" }
 	self.index["animation"] = { "spinner", "flipbook", "tween", "spine" }
 	self.index["gui"] = { "button", "stencil", "load texture"}

+ 0 - 1
examples/_main/ui.gui_script

@@ -1,7 +1,6 @@
 function init(self)
 	self.closenode = gui.get_node("close")
 	msg.post("#", "hide")
-	msg.post("#", "acquire_input_focus")
 end
 
 function on_message(self, message_id, message, sender)

+ 0 - 0
examples/basics/message passing/bunny1.script → examples/basics/message_passing/bunny1.script


+ 0 - 0
examples/basics/message passing/bunny2.script → examples/basics/message_passing/bunny2.script


+ 2 - 2
examples/basics/message passing/message passing.collection → examples/basics/message_passing/message_passing.collection

@@ -4,7 +4,7 @@ embedded_instances {
   id: "bunny 1"
   data: "components {\n"
   "  id: \"script\"\n"
-  "  component: \"/examples/basics/message passing/bunny1.script\"\n"
+  "  component: \"/examples/basics/message_passing/bunny1.script\"\n"
   "  position {\n"
   "    x: 0.0\n"
   "    y: 0.0\n"
@@ -113,7 +113,7 @@ embedded_instances {
   id: "bunny 2"
   data: "components {\n"
   "  id: \"script\"\n"
-  "  component: \"/examples/basics/message passing/bunny2.script\"\n"
+  "  component: \"/examples/basics/message_passing/bunny2.script\"\n"
   "  position {\n"
   "    x: 0.0\n"
   "    y: 0.0\n"

+ 0 - 0
examples/basics/message passing/message passing.md → examples/basics/message_passing/message_passing.md


+ 0 - 0
examples/basics/message passing/message_passing.png → examples/basics/message_passing/message_passing.png


+ 0 - 5
examples/basics/parent child/parent child

@@ -1,5 +0,0 @@
----
-title: A game object follows input
-brief: This example shows how to make a game object move to the position the user clicks.
-scripts: follow.script
----

+ 0 - 0
examples/basics/parent child/child.script → examples/basics/parent_child/child.script


+ 0 - 0
examples/basics/parent child/parent.script → examples/basics/parent_child/parent.script


+ 2 - 2
examples/basics/parent child/parent child.collection → examples/basics/parent_child/parent_child.collection

@@ -5,7 +5,7 @@ embedded_instances {
   children: "child"
   data: "components {\n"
   "  id: \"script\"\n"
-  "  component: \"/examples/basics/parent child/parent.script\"\n"
+  "  component: \"/examples/basics/parent_child/parent.script\"\n"
   "  position {\n"
   "    x: 0.0\n"
   "    y: 0.0\n"
@@ -114,7 +114,7 @@ embedded_instances {
   id: "child"
   data: "components {\n"
   "  id: \"script\"\n"
-  "  component: \"/examples/basics/parent child/child.script\"\n"
+  "  component: \"/examples/basics/parent_child/child.script\"\n"
   "  position {\n"
   "    x: 0.0\n"
   "    y: 0.0\n"

+ 0 - 0
examples/basics/parent child/parent child.md → examples/basics/parent_child/parent_child.md


+ 0 - 0
examples/basics/parent child/parent_child.png → examples/basics/parent_child/parent_child.png


+ 1 - 1
examples/basics/simple move/simple move.collection → examples/basics/simple_move/simple_move.collection

@@ -4,7 +4,7 @@ embedded_instances {
   id: "gameobject"
   data: "components {\n"
   "  id: \"script\"\n"
-  "  component: \"/examples/basics/simple move/simple move.script\"\n"
+  "  component: \"/examples/basics/simple_move/simple_move.script\"\n"
   "  position {\n"
   "    x: 0.0\n"
   "    y: 0.0\n"

+ 1 - 1
examples/basics/simple move/simple move.md → examples/basics/simple_move/simple_move.md

@@ -1,7 +1,7 @@
 ---
 title: Moving game object
 brief: This example shows how to move a game object.
-scripts: simple move.script
+scripts: simple_move.script
 ---
 
 ![simple move](simple_move.png)

+ 0 - 0
examples/basics/simple move/simple_move.png → examples/basics/simple_move/simple_move.png


+ 0 - 0
examples/basics/simple move/simple move.script → examples/basics/simple_move/simple_move.script


+ 10 - 10
examples/input/down_duration/down_duration.script

@@ -32,18 +32,18 @@ end
 
 --[[
 1. Tell the engine that this object ("." is shorthand for the current game object) wants to receive input. The function `on_input()` will be called whenever input is received.
-2. Prepare format of output included two float
-3. Create method for updating the text label
-4. Create a formatted string from the format and duration and last_duration arguments
+2. Prepare format of output including two float placeholders.
+3. Create method for updating the text label.
+4. Create a formatted string from the format and duration and last_duration arguments.
 5. Set the label component to the stored text.
 6. Check if we receive an input action named "click".
 7. Check if it is pressed then run the following.
-8. Change flag for starting a timer
+8. Change flag for starting a timer.
 9. Check if it is released then run the following.
-10. Change flag for stopping a timer
-11. Save duration as last_duration
-12. Run method for updating text
-13. Check if tamer is started
-14. Add dt (delta time from the last frame) to the duration variable
-15. Run method for updating text
+10. Change flag for stopping a timer.
+11. Save duration as last_duration.
+12. Run method for updating text.
+13. Check if timer is started.
+14. Add dt (delta time from the last frame) to the duration variable.
+15. Run method for updating text.
 --]]

+ 4 - 3
publish.sh

@@ -1,9 +1,10 @@
 #!/usr/bin/env bash
 #
 
-BOB=".deps/bob.jar"
 GSUTIL=".deps/google-cloud-sdk/bin/gsutil"
-BOBURL="http://d.defold.com/archive/298b7ce75a1386a26124061dbccfa822df9bc982/bob/bob.jar"
+SHA1=$(curl -s http://d.defold.com/stable/info.json | python -c 'import json,sys;obj=json.load(sys.stdin);print obj["sha1"]')
+BOBURL="http://d.defold.com/archive/$SHA1/bob/bob.jar"
+BOB=".deps/bob_$SHA1.jar"
 
 if [ "$(uname)" == "Darwin" ]; then
     GCSDK="https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-155.0.0-darwin-x86_64.tar.gz"
@@ -11,7 +12,7 @@ fi
 
 if [ ! -f $BOB ]; then
     mkdir -p .deps
-    echo "Installing bob.jar"
+    echo "Installing bob.jar ($SHA1)"
     curl $BOBURL -o $BOB
 fi