Пример #1
0
        internal ColorForm(Button i_SenderButton, GameLogic.GameLogic i_GameLogic)
        {
            m_SenderButton = i_SenderButton;
            m_GameLogic    = i_GameLogic;

            this.Text          = "Pick A Color:";
            this.Size          = new System.Drawing.Size(210, 140);
            this.StartPosition = FormStartPosition.CenterScreen;

            m_ColorButtons = new Button[8];
            for (int i = 0; i < 2; i++)
            {
                for (int j = 0; j < 4; j++)
                {
                    m_ColorButtons[4 * i + j]          = new Button();
                    m_ColorButtons[4 * i + j].Width    = 40;
                    m_ColorButtons[4 * i + j].Height   = 40;
                    m_ColorButtons[4 * i + j].Location = new Point(
                        10 + j * (m_ColorButtons[0].Width + 5),
                        10 + i * (m_ColorButtons[0].Width + 5));
                    this.Controls.Add(m_ColorButtons[4 * i + j]);
                    m_ColorButtons[4 * i + j].Click += colorButton_Click;
                }
            }

            m_ColorButtons[0].BackColor = Color.HotPink;
            m_ColorButtons[1].BackColor = Color.Red;
            m_ColorButtons[2].BackColor = Color.Green;
            m_ColorButtons[3].BackColor = Color.Turquoise;
            m_ColorButtons[4].BackColor = Color.Blue;
            m_ColorButtons[5].BackColor = Color.Yellow;
            m_ColorButtons[6].BackColor = Color.Brown;
            m_ColorButtons[7].BackColor = Color.White;
        }
Пример #2
0
 public GameForm(int i_NumOfChancesCount)
 {
     m_GameLogic         = new GameLogic.GameLogic(i_NumOfChancesCount, k_NumOfColors);
     m_NumOfChancesCount = i_NumOfChancesCount;
     m_FirstRow          = new FirstRow(m_GameLogic);
     m_FirstRow.AddButtonsToForm(this.Controls.Add);
     m_Rows = new Row[i_NumOfChancesCount];
     for (int i = 0; i < m_Rows.Length; i++)
     {
         m_Rows[i] = new Row(i, m_GameLogic);
         m_Rows[i].AddButtonsToForm(this.Controls.Add);
         m_Rows[i].AttachActivateNextRowMethod(this.ActivateNextRow);
         m_Rows[i].AttachReveal(this.RevealFirstRow);
     }
     this.Text = "Bool Pgia";
     this.Size = new System.Drawing.Size(
         300,
         100 + m_NumOfChancesCount * 45);
     this.StartPosition = FormStartPosition.CenterScreen;
     this.play();
 }
Пример #3
0
    private void clearlevel(string[] link, int gametype, PhotonMessageInfo info)
    {
        if (info != null && !info.Sender.IsMasterClient)
        {
            Log.AddLine("RPCerror", MsgType.Error, info.Sender.ID.ToString(), nameof(clearlevel));
            AntisManager.Response(info.Sender.ID, true, string.Empty);
            return;
        }

        switch (gametype)
        {
        case 0:
            IN_GAME_MAIN_CAMERA.GameMode = GameMode.KillTitan;
            if (!(logic is KillTitanLogic))
            {
                logic = new KillTitanLogic(logic);
            }

            break;

        case 1:
            IN_GAME_MAIN_CAMERA.GameMode = GameMode.SurviveMode;
            if (!(logic is SurviveLogic))
            {
                logic = new SurviveLogic(logic);
            }

            break;

        case 2:
            IN_GAME_MAIN_CAMERA.GameMode = GameMode.PvpAhss;
            if (!(logic is PVPLogic))
            {
                logic = new PVPLogic(logic);
            }

            break;

        case 3:
            IN_GAME_MAIN_CAMERA.GameMode = GameMode.Racing;
            if (!(logic is RacingLogic))
            {
                logic = new RacingLogic(logic);
            }

            break;

        default:
        case 4:
            IN_GAME_MAIN_CAMERA.GameMode = GameMode.None;
            if (logic == null || logic.GetType() != typeof(GameLogic.GameLogic))
            {
                logic = new GameLogic.GameLogic(logic);
            }

            break;
        }

        if (SkinSettings.CustomSkins.Value != 1)
        {
            return;
        }

        CustomLevel.LoadSkin(link, info);
    }
Пример #4
0
 public PVPLogic(GameLogic logic) : this()
 {
     CopyFrom(logic);
 }
Пример #5
0
 public EndlessLogic(GameLogic logic) : this()
 {
     CopyFrom(logic);
 }
Пример #6
0
 public SurviveLogic(GameLogic logic) : this()
 {
     CopyFrom(logic);
 }