示例#1
0
        public override void _Ready()
        {
            MDStatics.GI = this;

            // Configuration first
            CreateConfiguration();

            // Init static classes first
            MDLog.Initialize(GetLogDirectory());
            MDArguments.PopulateArgs();
            MDProfiler.Initialize();
            MDOnScreenDebug.Initialize();

            // Hook up events
            GetTree().Connect("node_added", this, nameof(OnNodeAdded_Internal));
            GetTree().Connect("node_removed", this, nameof(OnNodeRemoved_Internal));

            // Init instances
            CreateGameSession();
            CreateGameSynchronizer();
            CreateReplicator();
            CreateInterfaceManager();

            RegisterNodeAndChildren(GetTree().Root);
        }