コード例 #1
0
            public void IsFullChange(bool isFull)
            {
                var msg = new IsFullMsg();

                msg.EntityId = m_batteryBlock.EntityId;
                msg.isFull   = isFull;

                Sync.Layer.SendMessageToServer(ref msg);
            }
コード例 #2
0
            static void IsFullChange(ref IsFullMsg msg, MyNetworkClient sender)
            {
                MyBatteryBlock batteryBlock;

                if (MyEntities.TryGetEntityById <MyBatteryBlock>(msg.EntityId, out batteryBlock))
                {
                    batteryBlock.m_isFull = msg.isFull;
                    if (Sync.IsServer)
                    {
                        Sync.Layer.SendMessageToAll(ref msg);
                    }
                }
            }
コード例 #3
0
            public void IsFullChange(bool isFull)
            {
                var msg = new IsFullMsg();
                msg.EntityId = m_batteryBlock.EntityId;
                msg.isFull = isFull;

                Sync.Layer.SendMessageToServer(ref msg);
            }
コード例 #4
0
 static void IsFullChange(ref IsFullMsg msg, MyNetworkClient sender)
 {
     MyBatteryBlock batteryBlock;
     if (MyEntities.TryGetEntityById<MyBatteryBlock>(msg.EntityId, out batteryBlock))
     {
         batteryBlock.m_isFull = msg.isFull;
         if (Sync.IsServer)
             Sync.Layer.SendMessageToAll(ref msg);
     }
 }