Exemple #1
0
 public static void RailEventCallBack(RAILEventID eventId, EventBase data)
 {
     if ((int)eventId != 2)
     {
         return;
     }
     CoreSocialModule.ProcessRailSystemStateChange((RailSystemState)((RailSystemStateChanged)data).state);
 }
Exemple #2
0
 private void TickThread(object context)
 {
     Monitor.Enter(CoreSocialModule._railTickLock);
     while (this.isRailValid)
     {
         if (CoreSocialModule.OnTick != null)
         {
             CoreSocialModule.OnTick();
         }
         Monitor.Wait(CoreSocialModule._railTickLock);
     }
     Monitor.Exit(CoreSocialModule._railTickLock);
 }
Exemple #3
0
        public override void Initialize()
        {
            // ISSUE: method pointer
            this._callbackHelper.RegisterCallback((RAILEventID)2001, new RailEventCallBackHandler(RailEventCallBack));
            // ISSUE: method pointer
            this._callbackHelper.RegisterCallback((RAILEventID)2101, new RailEventCallBackHandler(RailEventCallBack));
            IRailPlayerStats       myPlayerStats     = this.GetMyPlayerStats();
            IRailPlayerAchievement playerAchievement = this.GetMyPlayerAchievement();

            if (myPlayerStats == null || playerAchievement == null)
            {
                return;
            }
            myPlayerStats.AsyncRequestStats("");
            playerAchievement.AsyncRequestAchievement("");
            while (!this._areStatsReceived && !this._areAchievementReceived)
            {
                CoreSocialModule.RailEventTick();
                Thread.Sleep(10);
            }
        }
Exemple #4
0
        public override void Initialize()
        {
            //IL_0012: Unknown result type (might be due to invalid IL or missing references)
            //IL_001c: Expected O, but got Unknown
            //IL_002e: Unknown result type (might be due to invalid IL or missing references)
            //IL_0038: Expected O, but got Unknown
            //IL_0052: Unknown result type (might be due to invalid IL or missing references)
            //IL_005e: Unknown result type (might be due to invalid IL or missing references)
            _callbackHelper.RegisterCallback((RAILEventID)2001, new RailEventCallBackHandler(RailEventCallBack));
            _callbackHelper.RegisterCallback((RAILEventID)2101, new RailEventCallBackHandler(RailEventCallBack));
            IRailPlayerStats       myPlayerStats       = GetMyPlayerStats();
            IRailPlayerAchievement myPlayerAchievement = GetMyPlayerAchievement();

            if (myPlayerStats != null && myPlayerAchievement != null)
            {
                myPlayerStats.AsyncRequestStats("");
                myPlayerAchievement.AsyncRequestAchievement("");
                while (!_areStatsReceived && !_areAchievementReceived)
                {
                    CoreSocialModule.RailEventTick();
                    Thread.Sleep(10);
                }
            }
        }