Ejemplo n.º 1
0
        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;
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
 public static WorldObjectBase imbue(WorldObjectBase obj)
 {
     obj[kEventKey] = new EventCause();
     return(obj);
 }
Ejemplo n.º 4
0
 public KSPMEventArgs(EventType type, EventCause cause)
 {
     this.Event           = type;
     this.CauseOfTheEvent = cause;
 }