Example #1
0
        internal static void Internal_OnActorEvent(ActorEventType eventType, Actor a, Actor b)
        {
            switch (eventType)
            {
            case ActorEventType.Spawned:
                ActorSpawned?.Invoke(a);
                break;

            case ActorEventType.Deleted:
                ActorDeleted?.Invoke(a);
                break;

            case ActorEventType.ParentChanged:
                ActorParentChanged?.Invoke(a, b);
                break;

            case ActorEventType.OrderInParentChanged:
                ActorOrderInParentChanged?.Invoke(a);
                break;

            case ActorEventType.NameChanged:
                ActorNameChanged?.Invoke(a);
                break;

            case ActorEventType.ActiveChanged:
                ActorActiveChanged?.Invoke(a);
                break;
            }
        }
Example #2
0
   public static Offset<ActorEventData> CreateActorEventData(FlatBufferBuilder builder,
 ActorEventType type = (ActorEventType)0,
 int time = 0)
   {
       builder.StartObject(2);
       ActorEventData.AddTime(builder, time);
       ActorEventData.AddType(builder, type);
       return ActorEventData.EndActorEventData(builder);
   }
Example #3
0
 public static Offset <ActorEventData> CreateActorEventData(FlatBufferBuilder builder,
                                                            ActorEventType type = (ActorEventType)0,
                                                            int time            = 0)
 {
     builder.StartObject(2);
     ActorEventData.AddTime(builder, time);
     ActorEventData.AddType(builder, type);
     return(ActorEventData.EndActorEventData(builder));
 }
Example #4
0
 public static void AddType(FlatBufferBuilder builder, ActorEventType type)
 {
     builder.AddSbyte(0, (sbyte)(type), 0);
 }
Example #5
0
 public ActorEvent(Actor source, Actor victim, ActorEventType aetype)
 {
     this.source = source;
     this.victim = victim;
     this.aetype = aetype;
 }
Example #6
0
 public static void AddType(FlatBufferBuilder builder, ActorEventType type)
 {
     builder.AddSbyte(0, (sbyte)(type), 0);
 }
Example #7
0
 public static Rule GetGameRule(ActorEventType aetype)
 {
     return(genericRules[(int)aetype]);
 }