public void SendEvent(Vector3 position, MyGlobalEventEnum eventType, int seed, Vector3 up, Vector3 forward) { var msg = new MyEventEvent(); msg.Position = new MyMwcPositionAndOrientation(position, forward, up); msg.EventTypeEnum = (int)eventType; msg.Seed = seed; Peers.SendToAll(ref msg, NetDeliveryMethod.ReliableOrdered); }
public MyGlobalEvent(MyGlobalEventEnum Type, MyTextsWrapperEnum Name, MyTextsWrapperEnum Description, float RatePerHour, MyTexture2D Icon, EventHandler Action, bool WriteToEventLog, bool Enabled) { this.Type = Type; this.Name = Name; this.Description = Description; this.RatePerHour = RatePerHour; //occurences per hour this.ActivationDateTime = null; this.Icon = Icon; this.Action = Action; this.WriteToEventLog = WriteToEventLog; this.Enabled = Enabled; }
public void SendEvent(Vector3 position, MyGlobalEventEnum eventType, int seed) { SendEvent(position, eventType, seed, Vector3.Up, Vector3.Forward); }
public MyGlobalEvent(MyGlobalEventEnum Type, MyTextsWrapperEnum Name, MyTextsWrapperEnum Description, DateTime activationDateTime, MyTexture2D Icon, EventHandler Action, bool WriteToEventLog, bool Enabled) : this(Type, Name, Description, 0, Icon, Action, WriteToEventLog, Enabled) { ActivationDateTime = activationDateTime; }
public static void SetRatePerHour(MyGlobalEventEnum globalAction, float ratePerHour) { MyGlobalEvent globalEvent = m_globalEvents[(int)globalAction]; globalEvent.RatePerHour = ratePerHour; }
public static void Enable(MyGlobalEventEnum globalAction, bool enabled) { MyGlobalEvent globalEvent = m_globalEvents[(int)globalAction]; globalEvent.Enabled = enabled; }
public static void StartGlobalEvent(MyGlobalEventEnum globalAction) { MyGlobalEvent globalEvent = m_globalEvents[(int)globalAction]; StartGlobalEvent(globalEvent); }
public static MyGlobalEvent GetGlobalEventByType(MyGlobalEventEnum value) { return m_globalEvents[(int) value]; }
public void AddGlobalEvent(MyGlobalEventEnum eventID) { AddEvent((int)eventID, EventTypeEnum.GlobalEvent); }
public static MyGlobalEvent GetGlobalEventByType(MyGlobalEventEnum value) { return(m_globalEvents[(int)value]); }