Ejemplo n.º 1
0
 private static void AddGlobalEventToEventLog(MyGlobalEvent globalEvent)
 {
     if (globalEvent.WriteToEventLog)
     {
         MySession.Static.EventLog.AddGlobalEvent(globalEvent.Type);
     }
 }
Ejemplo 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);
        }
Ejemplo n.º 3
0
 private static void AddGlobalEventToEventLog(MyGlobalEvent globalEvent)
 {
     if (globalEvent.WriteToEventLog)
     {
         MySession.Static.EventLog.AddGlobalEvent(globalEvent.Type);
     }
 }
Ejemplo 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);
        }
Ejemplo n.º 5
0
        public static void SetRatePerHour(MyGlobalEventEnum globalAction, float ratePerHour)
        {
            MyGlobalEvent globalEvent = m_globalEvents[(int)globalAction];

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

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

            StartGlobalEvent(globalEvent);
        }