Beispiel #1
0
        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));
        }
Beispiel #2
0
        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;
            }
        }