public RootGameNode(World world) : base(world) { this.nameToWorldNodes = new Dictionary <string, AWorldNode>(); this.nextWorldNodeName = null; this.currentWorldNode = null; this.nameToWorldNodes.Add("AstraWorld", new TestWorld.AstraWorld(world)); }
private void UpdateCurrentWorldNode(World world) { if (string.IsNullOrEmpty(this.nextWorldNodeName) == false) { if (this.currentWorldNode != null) { this.currentWorldNode.VisitEnd(world); } if (this.nameToWorldNodes.ContainsKey(this.nextWorldNodeName)) { this.currentWorldNode = this.nameToWorldNodes[this.nextWorldNodeName]; this.currentWorldNode.VisitStart(world); } this.nextWorldNodeName = null; } }