예제 #1
0
        public GameScene(Game game, GraphicsDeviceManager manager)
            : base(game, manager)
        {
            time     = 70;
            started  = true;
            paused   = false;
            finished = false;
            text     = "";


            graphics    = manager;
            spriteBatch = new SpriteBatch(graphics.GraphicsDevice);
            posList     = new Vector2[9];

            random       = new Random();
            timerManager = new TimerManager();

            breads = new FishBread[9];

            customers = new Customer[5];
            for (int i = 0; i < 5; i++)
            {
                customers[i] = new Customer();
            }
            isMove = new bool[5];
            // TODO: Add your initialization logic here

            int k = 0;

            for (int i = 0; i < 9; i++)
            {
                breads[i] = new FishBread();
                if (i % 3 == 0)
                {
                    k++;
                }

                teelPos    = new Vector2((i % 3) * 200 + 300, 200 * k - 100);
                posList[i] = teelPos;
            }


            oldState = Keyboard.GetState();

            bg          = new Texture2D(graphics.GraphicsDevice, 100, 100);
            bg          = game.Content.Load <Texture2D>("market");
            font        = game.Content.Load <SpriteFont>("Fonts\\GameFont");
            rankingfont = game.Content.Load <SpriteFont>("Rankingfont");
        }
예제 #2
0
        public GameScene(Game game, GraphicsDeviceManager manager)
            : base(game, manager)
        {
            graphics    = manager;
            spriteBatch = new SpriteBatch(graphics.GraphicsDevice);
            posList     = new Vector2[9];

            random        = new Random();
            termClickTime = 0;
            timerManager  = new TimerManager();

            breads = new FishBread[9];

            // TODO: Add your initialization logic here

            int k = 0;

            for (int i = 0; i < 9; i++)
            {
                breads[i] = new FishBread();
                if (i % 3 == 0)
                {
                    k++;
                }

                teelPos    = new Vector2((i % 3) * 200 + 300, 200 * k - 100);
                posList[i] = teelPos;
            }


            oldState = Keyboard.GetState();

            //spManger.SetBatch(spriteBatch);


            //spManger.AddSprite(TEEL_STATE.OJ_IDLE, game.Content, "Sprite/teel/teel/teel0000");
            //spManger.AddSprite(TEEL_STATE.OJ_BASEING, game.Content, "Sprite/teel/base/teel", (int)SPRITE_COUNT.SP_BASEING);
            //spManger.AddSprite(TEEL_STATE.OJ_BASE, game.Content, "Sprite/teel/base/teel0009");
            //spManger.AddSprite(TEEL_STATE.OJ_PATING, game.Content, "Sprite/teel/pat/teel", (int)SPRITE_COUNT.SP_PATING);
            //spManger.AddSprite(TEEL_STATE.OJ_PAT, game.Content, "Sprite/teel/pat/teel0002");
            //spManger.AddSprite(TEEL_STATE.OJ_REVERSEING, game.Content, "Sprite/teel/reverse/teel", (int)SPRITE_COUNT.SP_REVERSING);
            //spManger.AddSprite(TEEL_STATE.OJ_FINISHED, game.Content, "Sprite/teel/reverse/teel0016");
            //spManger.AddSprite(TEEL_STATE.OJ_FINISHING, game.Content, "Sprite/teel/finishing/teel", (int)SPRITE_COUNT.SP_FINISHING);
            //spManger.AddSprite(TEEL_STATE.OJ_BURNING, game.Content, "Sprite/teel/burn/teel", (int)SPRITE_COUNT.SP_BURNING);
            bg = new Texture2D(graphics.GraphicsDevice, 100, 100);
            bg = game.Content.Load <Texture2D>("background");
            //Game1.sprite = game.Content.Load<Texture2D>("hand");
        }
 public LongClickTimer(FishBread _breads, int _startTime)
 {
     startTime    = _startTime + term;
     breads       = _breads;
     breads.Start = 0;
 }