Ejemplo n.º 1
0
        protected override void WriteInternal(BitStream stream, MyEntity controlledEntity)
        {
            MyContextKind context = GetContextByPage(MyGuiScreenTerminal.GetCurrentScreen());

            stream.WriteInt32((int)context, 2);
            if (context != MyContextKind.None)
            {
                var entityId = MyGuiScreenTerminal.InteractedEntity != null ? MyGuiScreenTerminal.InteractedEntity.EntityId : 0;
                stream.WriteInt64(entityId);
            }
        }
Ejemplo n.º 2
0
        protected override void WriteInternal(BitStream stream, MyEntity controlledEntity)
        {
            MyContextKind contextByPage = GetContextByPage(MyGuiScreenTerminal.GetCurrentScreen());

            stream.WriteInt32((int)contextByPage, 2);
            if (contextByPage != MyContextKind.None)
            {
                long value = (MyGuiScreenTerminal.InteractedEntity != null) ? MyGuiScreenTerminal.InteractedEntity.EntityId : 0L;
                stream.WriteInt64(value, 64);
            }
        }