Ejemplo n.º 1
0
        public BAR()
        {
            LeftFire  = new TARY_VIMG(new Texture2D[] { GamePage.picBAR, GamePage.picBAR2 }, new Vector2(0, 799 - GamePage.picBAR.Height));
            RightFire = new TARY_VIMG(new Texture2D[] { GamePage.picBAR, GamePage.picBAR2 }, new Vector2(480 - GamePage.picBAR.Width, 799 - GamePage.picBAR.Height));

            LeftFire.stop();
            RightFire.stop();


            SCORE        = new TARY_SCORE(GamePage.picNum, new Vector2(480, 0));
            SCORE.ScoreV = 7;//多少位數
            SCORE.Score  = 0;
            SCORE.X     -= SCORE.Width;



            //**************
            StarBar[0] = new TARY_VIMG(GamePage.picStarBar, new Vector2(160, 740));
            StarBar[1] = new TARY_VIMG(GamePage.picStarBar, new Vector2(190, 740));
            StarBar[2] = new TARY_VIMG(GamePage.picStarBar, new Vector2(220, 740));
            StarBar[3] = new TARY_VIMG(GamePage.picStarBar, new Vector2(250, 740));
            StarBar[4] = new TARY_VIMG(GamePage.picStarBar, new Vector2(280, 740));
            StarBar[5] = new TARY_VIMG(GamePage.picStarBar, new Vector2(160, 700));
            StarBar[6] = new TARY_VIMG(GamePage.picStarBar, new Vector2(190, 700));
            StarBar[7] = new TARY_VIMG(GamePage.picStarBar, new Vector2(220, 700));
            StarBar[8] = new TARY_VIMG(GamePage.picStarBar, new Vector2(250, 700));
            StarBar[9] = new TARY_VIMG(GamePage.picStarBar, new Vector2(280, 700));


            for (int i = 0; i < StarBar.Length; i++)
            {
                StarBar[i].stop();
            }
        }
Ejemplo n.º 2
0
        public void fupdate()
        {
            if (CTYPE == "金幣")
            {
                money = new TARY_SCORE(GamePage.picNum2, IMG.centerLoc);

                money.X -= 80;


                money.Score  = Value;
                money.Prefix = "$";
                Event_GetOneP();
            }


            if (CTYPE == "閃電")
            {
                IMG.ImgNum = 4;
            }


            if (CTYPE == "武器")
            {
                IMG.ImgNum = 4;
            }
            //使得原點為中心 再將感應器縮小
            IMG.CenterPoint = true;
            IMG.H.Radius   -= 5;
        }
Ejemplo n.º 3
0
        public bool T_ScoreChgMoney = false;//是否啟動計分轉換金錢看板
        public LV(int num)
        {
            setLvNum = num;

            TITLE        = new TARY_VIMG(GamePage.picLEVEL, new Vector2(180, 230));
            TITLE2       = new TARY_SCORE(GamePage.picNum, new Vector2(280, 230));
            TITLE2.Score = num;
        }
Ejemplo n.º 4
0
        public LV(int num, int gp)
        {
            //此為指定關卡+直接跳到關卡的第幾群組

            setLvNum     = num;
            GROUP        = gp;
            TITLE        = new TARY_VIMG(GamePage.picLEVEL, new Vector2(180, 230));
            TITLE2       = new TARY_SCORE(GamePage.picNum, new Vector2(280, 230));
            TITLE2.Score = num;
        }
Ejemplo n.º 5
0
        public GAME_END()
        {
            Time = new TARY_TIMER(1, 350);
            Time.start();


            GAMEEND        = new TARY_VIMG(GamePage.picGAMEEND, new Vector2(15, 140));
            GAMEEND.Size   = 2;
            GAMESCORE      = new TARY_VIMG(GamePage.picSCORE, new Vector2(60, 300));
            GAMESCORE.Size = 2;
            SCORE          = new TARY_SCORE(GamePage.picNum, new Vector2(150, 300));
            SCORE.Score    = GamePage.HERO_SCORE;
            SCORE.Size     = 2;
            SCORE.ScoreV   = 7;


            for (int i = 0; i < bob.Count(); i++)
            {
                switch (GamePage.randObj.Next(1, 8))
                {
                case 1: ColorStar = GamePage.picStar7; break;                //白色為6   star1為背景色

                case 2: ColorStar = GamePage.picStar2; break;

                case 3: ColorStar = GamePage.picStar3; break;

                case 4: ColorStar = GamePage.picStar4; break;

                case 5: ColorStar = GamePage.picStar5; break;

                case 6: ColorStar = GamePage.picStar6; break;

                case 7: ColorStar = GamePage.picStar8; break;
                }

                bob[i] = new TARY_BOB(ColorStar, new Vector2(GamePage.randObj.Next(10, 470), GamePage.randObj.Next(10, 750)), GamePage.randObj.Next(15, 80));
            }
        }
Ejemplo n.º 6
0
        int Temp_Money = 0;         //已算完的錢
        public SCORE(int Snum, int Mnum)
        {
            if (GamePage.HERO_S == 0)
            {
                NT = (GamePage.HERO_LV + 3) * 2;
            }
            else
            {
                NT = (GamePage.HERO_LV + 2) * ((GamePage.HERO_S * 2) + 2);
            }



            //先將錢算完 若使用者想跳過算錢動作  即可將值給定
            Temp_Money  = Mnum;
            Temp_Money += Snum / NT;
            if (Snum % NT != 0)
            {
                Temp_Money += 1;
            }


            Score        = new TARY_SCORE(GamePage.picNum, new Vector2(200, 200));
            Score.ScoreV = 7;
            Score.Size   = 2;
            Score.Score  = Snum;
            Score.Alpha  = 0;
            Money        = new TARY_SCORE(GamePage.picNum, new Vector2(160, 350));
            Money.Size   = 2;
            Money.Score  = Mnum;
            Money.Alpha  = 0;
            Money.Prefix = "$";


            SCORE_VIM       = new TARY_VIMG(GamePage.picSCORE, new Vector2(40, 200));
            SCORE_VIM.Size  = 2;
            SCORE_VIM.Alpha = 0;
        }
Ejemplo n.º 7
0
        int GP = 0;//若是重生 將編制 第幾群組

        public MENU_DEAD(int gp)
        {
            GamePage.HERO_LIFE--;
            GP          = gp;
            HERO        = new TARY_VIMG(GamePage.picHERO, new Vector2(180, 280));
            LIFE        = new TARY_SCORE(GamePage.picNum, new Vector2(240, 280));
            LIFE.Prefix = "× ";
            LIFE.Score  = GamePage.HERO_LIFE;


            GAMEOVER = new TARY_VIMG(GamePage.picGAMEOVER, new Vector2(90, 150));

            GAMESCORE      = new TARY_VIMG(GamePage.picSCORE, new Vector2(40, 400));
            GAMESCORE.Size = 2;

            SCORE        = new TARY_SCORE(GamePage.picNum, new Vector2(200, 400));
            SCORE.Score  = GamePage.HERO_SCORE;
            SCORE.Size   = 2;
            SCORE.ScoreV = 7;

            Time = new TARY_TIMER(1, 200);
            Time.start();
        }
Ejemplo n.º 8
0
        float leftBan = 0f, rightBan = 480f;        //飛行器飛行限制區域
        public HERO(Vector2 loc)
        {
            hero             = new TARY_VIMG(GamePage.picHERO, loc);
            hero.H.Radius   -= 3.5f;
            hero_dead        = new TARY_VIMG(GamePage.picHERO_DEAD, loc);
            hero_dead.Size   = hero.Size;
            hero_dead.ImgNum = 4;
            Hp               = new HPBAR(3, 3);
            BulletBAR        = new TARY_SCORE(GamePage.picNum, new Vector2(470, 50));
            BulletImg        = new TARY_VIMG(GamePage.picBallA[1], new Vector2(412, 65));
            BulletBAR.Score  = bulletMax + GamePage.R_BAR.bulletLv;
            BulletBAR.ScoreV = 2;
            BulletBAR.X     -= BulletBAR.Width;


            leftBan  -= GamePage.picHERO.Width / 2 - 18;
            rightBan -= GamePage.picHERO.Width / 2 + 18;

            //數位羅盤事件
            gSensor = new Accelerometer();//建立 Accelerometer 類別的物件
            gSensor.CurrentValueChanged += new EventHandler <SensorReadingEventArgs <AccelerometerReading> >(gSensor_CurrentValueChanged);
            gSensor.Start();
        }