|
|
@@ -1,55 +1,29 @@
|
|
|
using System;
|
|
|
|
|
|
-using AtomicSharp;
|
|
|
-using Light = AtomicSharp.Light;
|
|
|
-using Node = AtomicSharp.Node;
|
|
|
+using Atomic;
|
|
|
+using AtomicPlayer;
|
|
|
|
|
|
namespace AtomicSharpTest
|
|
|
{
|
|
|
class MainClass
|
|
|
{
|
|
|
- static Node CreateNode() {
|
|
|
+ static Scene CreateScene() {
|
|
|
|
|
|
- return new AtomicSharp.Node ();
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- static void AddLight(Node node) {
|
|
|
-
|
|
|
- node.AddComponent (new Light (), 0, CreateMode.REPLICATED);
|
|
|
+ var node = new Node ();
|
|
|
+ var player = (Player)node.GetSubsystem ("Player");
|
|
|
+ player.LoadScene ("Scenes/Scene.scene", null);
|
|
|
+ return player.CurrentScene;
|
|
|
|
|
|
}
|
|
|
-
|
|
|
- static private Node parent;
|
|
|
- static private Node child;
|
|
|
-
|
|
|
- static void setup()
|
|
|
- {
|
|
|
- parent = CreateNode ();
|
|
|
- AddLight (parent);
|
|
|
- parent.Name = "MyNode";
|
|
|
-
|
|
|
- child = parent.CreateChild ("Child", CreateMode.REPLICATED, 0);
|
|
|
-
|
|
|
- child = null;
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
+
|
|
|
public static void Main (string[] args)
|
|
|
{
|
|
|
- AtomicSharp.AtomicSharp.Initialize ();
|
|
|
-
|
|
|
- setup ();
|
|
|
-
|
|
|
- while (AtomicSharp.AtomicSharp.RunFrame ()) {
|
|
|
-
|
|
|
- child = parent.GetChild ("Child", false);
|
|
|
+ Atomic.AtomicSharp.Initialize ();
|
|
|
|
|
|
- if (child.Parent.HasComponent("Light"))
|
|
|
- Console.Write (child.Parent.Name + " has a light\n");
|
|
|
+ CreateScene ();
|
|
|
|
|
|
- child = null;
|
|
|
-
|
|
|
+ while (Atomic.AtomicSharp.RunFrame ()) {
|
|
|
+
|
|
|
|
|
|
}
|
|
|
}
|