Explorar o código

Update sample

Daniele Bartolini %!s(int64=10) %!d(string=hai) anos
pai
achega
620e3d41ae

+ 9 - 11
samples/01.hello-world/boot.package

@@ -1,11 +1,9 @@
-{
-	lua = [
-		"lua/game"
-	]
-	unit = [
-		"camera"
-	]
-	physics_config = [
-		"global"
-	]
-}
+lua = [
+	"lua/game"
+]
+unit = [
+	"camera"
+]
+physics_config = [
+	"global"
+]

+ 10 - 11
samples/01.hello-world/camera.unit

@@ -1,13 +1,12 @@
-{
-	cameras = {
-		camera = {
-			node = "root"
-			type = "perspective"
-			near_clip_distance = 0.01
-			far_clip_distance = 1000.0
-		}
-	}
-	nodes = {
-		root = { parent = null position = [0 0 0] rotation = [0 0 1 0] }
+cameras = {
+	camera = {
+		node = "root"
+		type = "perspective"
+		near_clip_distance = 0.01
+		far_clip_distance = 1000.0
 	}
 }
+
+nodes = {
+	root = { parent = null position = [0 0 0] rotation = [0 0 1 0] }
+}

+ 7 - 9
samples/01.hello-world/crown.config

@@ -1,12 +1,10 @@
-{
-	// Lua script to launch on boot
-	boot_script = "lua/game"
+// Lua script to launch on boot
+boot_script = "lua/game"
 
-	// Package to load on boot
-	boot_package = "boot"
+// Package to load on boot
+boot_package = "boot"
 
-	console_port = 10001
+console_port = 10001
 
-	window_width = 1280
-	window_height = 720
-}
+window_width = 1280
+window_height = 720

+ 18 - 20
samples/01.hello-world/global.physics_config

@@ -1,24 +1,22 @@
-{
-	materials" = {
-		default = { static_friction = 0.5 dynamic_friction = 0.5 restitution = 0.1 }
-		test = { static_friction = 0.2 dynamic_friction = 0.7 restitution = 0.5 }
-		light = { static_friction = 0.2 dynamic_friction = 0.2 restitution = 0.7}
-	}
+materials = {
+	default = { static_friction = 0.5 dynamic_friction = 0.5 restitution = 0.1 }
+	test = { static_friction = 0.2 dynamic_friction = 0.7 restitution = 0.5 }
+	light = { static_friction = 0.2 dynamic_friction = 0.2 restitution = 0.7}
+}
 
-	shapes = {
-		default = { trigger = false collision_filter = "default" }
-		trigger = { trigger = true collision_filter = "default" }
-	}
+shapes = {
+	default = { trigger = false collision_filter = "default" }
+	trigger = { trigger = true collision_filter = "default" }
+}
 
-	actors = {
-		static = { dynamic = false }
-		dynamic = { dynamic = true }
-		keyframed = { dynamic = true kinematic = true disable_gravity = true }
-		test = { dynamic = true linear_damping = 10.0 angular_damping = 23.0 }
-	}
+actors = {
+	static = { dynamic = false }
+	dynamic = { dynamic = true }
+	keyframed = { dynamic = true kinematic = true disable_gravity = true }
+	test = { dynamic = true linear_damping = 10.0 angular_damping = 23.0 }
+}
 
-	collision_filters = {
-		default = { collides_with = ["default"] }
-		foo = { collides_with = ["default" "foo"] }
-	}
+collision_filters = {
+	default = { collides_with = ["default"] }
+	foo = { collides_with = ["default" "foo"] }
 }