Exemplo n.º 1
0
        static Offset <FActor> serialise_actor(
            FlatBufferBuilder b,
            Offset <FMotor>[] motors,
            IActor actor,
            string identifier)
        {
            var n            = b.CreateString(identifier);
            var motor_vector = FActor.CreateMotorsVector(b, motors);

            FActor.StartFActor(b);
            if (actor is KillableActor)
            {
                FActor.AddAlive(b, ((KillableActor)actor).IsAlive);
            }
            else
            {
                FActor.AddAlive(b, true);
            }

            FActor.AddActorName(b, n);
            FActor.AddMotors(b, motor_vector);
            return(FActor.EndFActor(b));
        }
Exemplo n.º 2
0
 public static FActor GetRootAsFActor(ByteBuffer _bb, FActor obj)
 {
     return(obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb));
 }
Exemplo n.º 3
0
 public FActor?ActorsByKey(string key)
 {
     int o = this.__p.__offset(8); return(o != 0 ? FActor.__lookup_by_key(this.__p.__vector(o), key, this.__p.bb) : null);
 }