Exemplo n.º 1
0
 private static void AddGlobalEventToEventLog(MyGlobalEvent globalEvent)
 {
     if (globalEvent.WriteToEventLog)
     {
         MySession.Static.EventLog.AddGlobalEvent(globalEvent.Type);
     }
 }
Exemplo n.º 2
0
        public static void StartGlobalEvent(MyGlobalEvent globalEvent)
        {
            if (MyMultiplayerGameplay.IsHosting)
            {
                MyMultiplayerGameplay.Static.SendEvent(MyCamera.Position, globalEvent.Type, MyMwcUtils.GetRandomInt(int.MaxValue));
            }

            globalEvent.Action(globalEvent, null);
            AddGlobalEventToEventLog(globalEvent);
        }
Exemplo n.º 3
0
 private static void AddGlobalEventToEventLog(MyGlobalEvent globalEvent)
 {
     if (globalEvent.WriteToEventLog)
     {
         MySession.Static.EventLog.AddGlobalEvent(globalEvent.Type);
     }
 }
Exemplo n.º 4
0
        public static void StartGlobalEvent(MyGlobalEvent globalEvent)
        {
            if (MyMultiplayerGameplay.IsHosting)
            {
                MyMultiplayerGameplay.Static.SendEvent(MyCamera.Position, globalEvent.Type, MyMwcUtils.GetRandomInt(int.MaxValue));
            }

            globalEvent.Action(globalEvent, null);
            AddGlobalEventToEventLog(globalEvent);
        }
Exemplo n.º 5
0
        public static void SetRatePerHour(MyGlobalEventEnum globalAction, float ratePerHour)
        {
            MyGlobalEvent globalEvent = m_globalEvents[(int)globalAction];

            globalEvent.RatePerHour = ratePerHour;
        }
Exemplo n.º 6
0
        public static void Enable(MyGlobalEventEnum globalAction, bool enabled)
        {
            MyGlobalEvent globalEvent = m_globalEvents[(int)globalAction];

            globalEvent.Enabled = enabled;
        }
Exemplo n.º 7
0
        public static void StartGlobalEvent(MyGlobalEventEnum globalAction)
        {
            MyGlobalEvent globalEvent = m_globalEvents[(int)globalAction];

            StartGlobalEvent(globalEvent);
        }