public int ListIndex; //last tiebreaker: location in the list public GameEventPriority(Priority priority, int portPriority, EventCause typeId, int id, int listIndex) { Priority = priority; PortPriority = portPriority; TypeID = typeId; ID = id; ListIndex = listIndex; }
public static WorldObjectBase imbue(WorldObjectBase obj, PerceptionCause perception) { var objLoc = MapLocationAspect.getMapLocationState(obj); if (objLoc == null) { throw new Exception("Cannot imbue an object with perception if it has no physical location."); } // Remember the hearing cause obj [kEventListeningKey] = perception; // Hook it up to listen to the world EventCause worldEvents = EventAspect.getEventCause(objLoc.world); perception.addDependency(worldEvents); return(obj); }
public static WorldObjectBase imbue(WorldObjectBase obj) { obj[kEventKey] = new EventCause(); return(obj); }
public KSPMEventArgs(EventType type, EventCause cause) { this.Event = type; this.CauseOfTheEvent = cause; }