Exemplo n.º 1
0
 public void InitGame()
 {
     this.pacmanLife   = new PacmanLife();
     this.currentScore = new Score();
     this.eatenFruits  = new List <Fruit>();
     this.InitGameObjects();
 }
Exemplo n.º 2
0
        public PlayingState()
        {
            this.Add(new SpriteGameObject("BackGround2.0"));

            ghosts = new GameObjectList();
            wave();
            this.Add(ghosts);

            coins = new GameObjectList();
            String[] assetName     = { "Dot" };
            int      nCoinPerlevel = 100;

            for (int iCoinType = 0; iCoinType < assetName.Length; iCoinType++)
            {
                for (int ICoin = 0; ICoin < nCoinPerlevel; ICoin++)
                {
                    coins.Add(new Coin(assetName[iCoinType]));
                }
            }
            this.Add(coins);

            thePlayer = new Player();
            this.Add(thePlayer);

            items = new GameObjectList();
            Items();
            this.Add(items);


            theScore = new Score("GameFont");
            Add(theScore);
            thepacmanLife          = new PacmanLife("GameFont");
            thepacmanLife.Position = new Vector2(0, fontSize);
            Add(thepacmanLife);
            Reset();
        }