Пример #1
0
        //helper function writes to textboxes
        private void writeGraphic(Game.Graphic graphic)
        {
            if(graphic.isImageSet())
                textBox1.Text = graphic.getImage();

            if(graphic.isTextSet())
                textBox2.Text = graphic.Text;

            currentGraphic = graphic;
        }
Пример #2
0
        //N
        //N changed
        //public fmPlayGame()
        public fmPlayGame(int sStatus, string sPlayer, int sFloorNo, int sFloorX, int sFloorY, int sFirstDgtPass, int sSecDgtPass, int sThirdDgtPass, int sCaseStatus, int sHaveCase, int sHaveNote, int sHavePhone, int sHaveAudio, int sDifficulty, int sTimeRemain, string sCaseHint, int sScareMeter)
        {
            //N
            //public fmPlayGame(int sStatus, string sPlayer, int sFloorNo, int sFloorX, int sFloorY, int sFirstDgtPass, int sSecDgtPass, int sThirdDgtPass, int sCaseStatus, int sHaveCase, int sHaveNote, int sHavePhone, int sHaveAudio )
            //{
            //InitializeComponent();

            //N

            InitializeComponent();
            //N
            gStatus = sStatus;
            gPlayer = sPlayer;
            gFloorNo = sFloorNo;
            gFloorX = sFloorX;
            gFloorY = sFloorY;
            gFirstDgt = sFirstDgtPass;
            gSecDgt = sSecDgtPass;
            gThirdDgt = sThirdDgtPass;
            gCaseStatus = Convert.ToBoolean(sCaseStatus);
            gHaveCase = Convert.ToBoolean(sHaveCase);
            gHaveNote = Convert.ToBoolean(sHaveNote);
            gHavePhone = Convert.ToBoolean(sHavePhone);
            gHaveAudio = Convert.ToBoolean(sHaveAudio);
            gDifficulty = sDifficulty;
            gTimeRemain = sTimeRemain;
            gCaseHint = sCaseHint;
            gScareMeter = sScareMeter;

            //Set DffValue, difficulty as string
            switch (gDifficulty)
            {
                case 0:
                    DffValue = "Easy"; break;
                case 1:
                    DffValue = "Medium"; break;
                case 2:
                    DffValue = "Hard"; break;
                default:
                    DffValue = "Error: DffVal"; break;
            }
            //N
            currentGraphic = new Game.Graphic("");
            enteringCode = false;
            helping = true;
            gameStarted = false;

            //Sets frightened meter max and min
            //Increment by a set amount to increase and decrease how scared player is
            progressBar1.Maximum = 20;
            progressBar1.Minimum = 0;

            //KeyPress event handlers that call appropriate handler
            this.KeyPreview = true;
            this.KeyPress += new KeyPressEventHandler(Form1_Keypress);

            hb = new Game.HauntedBuilding();
        }