Пример #1
0
        public bool IsReadyForReplication()
        {
            MDGameInstance GameInstance = MDStatics.GetGameSession().GetGameInstance();

            if (GameInstance.GetGameSynchronizer().IsDelayReplicatorUntilAllNodesAreSynched())
            {
                // If synch is active check if peer has completed node synch
                if (GameInstance.GetGameSynchronizer().HasPeerCompletedNodeSynch(PeerId))
                {
                    return(true);
                }
            }
            // If synch is not active then we use a delay
            else if (JoinTime + MDReplicator.JIPWaitTime < OS.GetTicksMsec())
            {
                return(true);
            }

            return(false);
        }
Пример #2
0
        /// <summary>Gets the ping of the given peer</summary>
        public static int GetPlayerPing(this Node Instance, int PeerId)
        {
            MDGameInstance GI = Instance.GetGameInstance();

            return(GI.GameSynchronizer.GetPlayerPing(PeerId));
        }
Пример #3
0
        /// <summary>Gets the estimated OS.GetTicksMsec of the given peer</summary>
        public static uint GetPlayerTicksMsec(this Node Instance, int PeerId)
        {
            MDGameInstance GI = Instance.GetGameInstance();

            return(GI.GameSynchronizer.GetPlayerTicksMsec(PeerId));
        }
Пример #4
0
        /// <summary>Grabs the Interface Manager from the GameInstance</summary>
        public static MDInterfaceManager GetInterfaceManager(this Node Instance)
        {
            MDGameInstance GI = Instance.GetGameInstance();

            return(GI.InterfaceManager);
        }
Пример #5
0
        /// <summary>Grabs the GameClock from the GameInstance</summary>
        public static MDGameClock GetGameClock(this Node Instance)
        {
            MDGameInstance GI = Instance.GetGameInstance();

            return(GI.GameClock);
        }
Пример #6
0
        /// <summary>Grabs the GameSynchronizer from the GameInstance</summary>
        public static MDGameSynchronizer GetGameSynchronizer(this Node Instance)
        {
            MDGameInstance GI = Instance.GetGameInstance();

            return(GI.GameSynchronizer);
        }
Пример #7
0
        /// <summary>Grabs the Configuration from the GameInstance</summary>
        public static MDConfiguration GetConfiguration(this Node Instance)
        {
            MDGameInstance GI = Instance.GetGameInstance();

            return(GI.Configuration);
        }
Пример #8
0
        /// <summary>Grabs the GameSession from the GameInstance</summary>
        public static MDGameSession GetGameSession(this Node Instance)
        {
            MDGameInstance GI = Instance.GetGameInstance();

            return(GI.GameSession);
        }