public override void Update()
    {
        float second   = (float)DeltaTime.TotalSeconds;
        int   posIndex = 0;

        // player existed
        if (boxes.Count > 0)
        {
            BoxInfo[] boxPacket = new BoxInfo[boxes.Count];
            foreach (var box in boxes.Values)
            {
                boxPacket[posIndex] = box.UpdatePosAndRot(second);
                posIndex++;
            }

            Array.Sort(boxPacket, (x, y) => x.boxId.CompareTo(y.boxId));
            Network_Broadcast(
                new object[] { SimpleGameMetrics.ServerGameSwitchCode.BoxInfo, boxPacket },
                Reliability.Sequence);


            //if (bullets.Count > 0)
            {
                List <BulletInfo> bulletPacket = new List <BulletInfo>();
                for (int i = 0; i < bullets.Count; i++)
                {
                    if (bullets[i].UpdateBullet(second))
                    {
                        // if bullet timed out, recycle bullet
                        bulletPool.Recycle(bullets[i]);
                        bullets.RemoveAt(i--);
                    }
                    else
                    {
                        // update bullet info into client
                        bulletPacket.Add(bullets[i].GetInfo());
                    }
                }
                bulletPacket.Sort((x, y) => x.id.CompareTo(y.id));
                Network_Broadcast(
                    new object[] { SimpleGameMetrics.ServerGameSwitchCode.BulletInfo, bulletPacket.ToArray() },
                    Reliability.Sequence);
            }
        }

        HandleJoinRequest();

        HandleExitEvent();
    }