예제 #1
0
 /// <summary>
 /// Attaches the event to the screen and executes its function.
 /// </summary>
 /// <param name="gameEntity">Game entity that will be effected by the event.</param>
 /// <param name="eventProduct">Instance of an event to execute.</param>
 private void ExecuteEvent(IEntity gameEntity, EventProduct eventProduct)
 {
     // Attach the base event screen then triggering the event.
     GameCore.Instance.WindowManager.Add(typeof(Event));
     OnEventTriggered?.Invoke(gameEntity, eventProduct);
 }
예제 #2
0
 /// <summary>
 /// Called when the event director has triggered an event either by random or on purpose.
 /// </summary>
 private void Director_OnEventTriggered(IEntity simEntity, EventProduct directorEvent)
 {
     UserData.DirectorEvent = directorEvent;
     UserData.SourceEntity  = simEntity;
     SetForm(typeof(EventExecutor));
 }