public override void PlayerJoinedEvent(PlayerProfile p)
        {
            PlayerMarker m = new PlayerMarker(p);

            foreach (GameObject o in GetList(GameObjectTag.Form))
            {
                BasicGameForm f = (BasicGameForm)o;
                if (f.StartingForm.get())
                {
                    m.SetCurrentForm(f);
                }
            }

            Add(m);
            base.PlayerJoinedEvent(p);
        }
        public PlayerUIManager(PlayerShip ParentShip)
        {
            this.ParentShip = ParentShip;

            //MenuManager = new PlayerMenuManager(ParentShip);

            TurretPickerFrame = new FormFrame(ParentShip);
            TurretPickerFrame.ScreenOffset = new Vector2(0, 200);
            TurretForm.BuildAllTurrets(TurretPickerFrame);

            MenuFrame = new FormFrame(ParentShip);
            PlayerMenuBuilder.BuildPauseMenu(MenuFrame);
            PlayerMenuBuilder.BuildControllerOptions(MenuFrame);
            PlayerMenuBuilder.BuildScreenOptions(MenuFrame);

            PlayerMarker m = new PlayerMarker(ParentShip.MyProfile);

            ParentShip.ParentLevel.AddObject(m);
            m.Visible = false;
            m.MoveSpeed.set(10);
            m.ResizeSpeed.set(10);
            TurretPickerFrame.AddTarget(m);

            m = new PlayerMarker(ParentShip.MyProfile);
            ParentShip.ParentLevel.AddObject(m);
            m.MoveSpeed.set(5);
            m.ResizeSpeed.set(10);
            MenuFrame.AddTarget(m);

            TurretPickerFrame.DeActivate();
            MenuFrame.DeActivate();

            TurretPickerFrame.SetRestrictedView(ParentShip.MyProfile.PlayerNumber);
            MenuFrame.SetRestrictedView(ParentShip.MyProfile.PlayerNumber);

            AddHudBox(new HudHealthBox());
            AddHudBox(new HudScoreBox());
            AddHudBox(new HudWeaponsBox());
            AddHudBox(new HudOutline());
            AddHudBox(new HudProgressCircle());
            AddHudBox(new HudFactionFeed());
            AddHudBox(new HudTimerBox());
        }
        public override void PlayerQuitEvent(PlayerProfile p)
        {
            GameObject ToDestroy = null;

            foreach (GameObject g in Children)
            {
                if (g.GetType().Equals(typeof(PlayerMarker)) || g.GetType().IsSubclassOf(typeof(PlayerMarker)))
                {
                    PlayerMarker m = (PlayerMarker)g;
                    if (m.MyPlayer == p)
                    {
                        ToDestroy = m;
                        break;
                    }
                }
            }
            if (ToDestroy != null)
            {
                ToDestroy.Destroy();
            }

            base.PlayerQuitEvent(p);
        }