Browse Source

Miscellaneous example updates.

Lara Engebretson 10 years ago
parent
commit
52a9ba9ebb

+ 0 - 5
BunnyMark/Resources/Components.asset

@@ -1,5 +0,0 @@
-{
-	"version": 1,
-	"guid": "5c825202fc08727c7c6943f3f8872228",
-	"FolderImporter": {}
-}

+ 13 - 0
BunnyMark/Resources/README.TXT

@@ -0,0 +1,13 @@
+
+BunnyMark for Atomic
+------------------
+
+The bunny benchmark running in the Atomic Game Engine
+
+INSTRUCTIONS:
+
+Select Tools/Toggle Profiler from the main menu to view stats
+
+Ctrl-P (Cmd-P on Mac) to launch the Atomic Player
+
+Left Click to spawn bunnies

+ 5 - 0
BunnyMark/Resources/README.TXT.asset

@@ -0,0 +1,5 @@
+{
+	"version": 1,
+	"guid": "944f0ddc0c39ff5e0b0c2ba08f2455cc",
+	"TextImporter": {}
+}

+ 32 - 0
BunnyMark/Resources/Scripts/main.js

@@ -138,5 +138,37 @@ exports.update = function() {
 
 }
 
+createInstructions();
+
+function createInstructions() {
+
+  var view = new Atomic.UIView();
+
+  // Create a layout, otherwise child widgets won't know how to size themselves
+  // and would manually need to be sized
+  var layout = new Atomic.UILayout();
+
+  // specify the layout region
+  layout.rect = view.rect;
+
+  view.addChild(layout);
+
+  // we're laying out on the X axis so "position" controls top and bottom alignment
+  layout.layoutPosition = Atomic.UI_LAYOUT_POSITION_RIGHT_BOTTOM;
+  // while "distribution" handles the Y axis
+  layout.layoutDistributionPosition = Atomic.UI_LAYOUT_DISTRIBUTION_POSITION_RIGHT_BOTTOM;
+    
+  var fd = new Atomic.UIFontDescription();
+  fd.id = "Vera";
+  fd.size = 18;
+    
+  var scoreText = new Atomic.UIEditField();
+  scoreText.fontDescription = fd;
+  scoreText.readOnly = true;
+  scoreText.multiline = true;
+  scoreText.adaptToContentSize = true;
+  scoreText.text = "BunnyMark\nLeft Click - Spawn Bunnies";
+  layout.addChild(scoreText);
+  }
 
 ;

+ 1 - 1
Butterflies/Resources/README.TXT

@@ -13,5 +13,5 @@ Right Click - Spawn Butterfly Particles
 
 CREDITS:
 
-Originally create for Atomic-Haxe by rsredsq:
+Originally created for Atomic-Haxe by rsredsq:
 https://github.com/rsredsq/atomic-haxe/tree/master/examples/Butterflies