コード例 #1
0
ファイル: Gnome.cs プロジェクト: evwhite1988/INF-125-Project
 public void addEffect(GameTime gameTime, Texture2D texture)
 {
     effect_Tex = texture;
     effect = new ParticleSystem();
     effect.Init(gameTime, texture, this, 1500f, .01f, 0);
     hasEffect = true;
 }
コード例 #2
0
ファイル: Game1.cs プロジェクト: evwhite1988/INF-125-Project
        private void doubleScore(GameTime gameTime)
        {
            gnomeScore = 50;
            evilScore = -300;

            for(int i = 0; i < playerList.Count; i++)
            {
                ParticleSystem effect = new ParticleSystem();
                effect.Init(gameTime, base_effect[i], playerList[i].scoreBoard, 2000, 1000.0f, 5.0f);
                activeEffects.Add(effect);
            }
        }
コード例 #3
0
ファイル: Game1.cs プロジェクト: evwhite1988/INF-125-Project
 private void doubleSpeed(GameTime gameTime)
 {
     gnomeSpeed = (int)(gnomeSpeed * 1.5);
     foreach (Gnome g in gnomeList)
     {
         ParticleSystem effect = new ParticleSystem();
         effect.Init(gameTime, base_effect[0], g, 1000, 1.0f, 1.0f);
         activeEffects.Add(effect);
     }
 }
コード例 #4
0
ファイル: Game1.cs プロジェクト: evwhite1988/INF-125-Project
        public void swapBases(GameTime gameTime)
        {
            List<Cell> bases = gameboard.getBases();
            foreach (Player p in playerList)
            {
                Player temp = getRandomPlayer();
                while (temp.Equals(p))
                    temp = getRandomPlayer();

                Vector2 base1_coord = p.playerBase.coord;
                p.playerBase.coord = temp.playerBase.coord;
                int row1 = ((int)(p.playerBase.coord.Y) / Variables.cellHeigth);
                int col1 = ((int)(p.playerBase.coord.X) / Variables.cellWidth);
                gameboard.getCell(row1, col1).setOwnedBy(p.index);

                temp.playerBase.coord = base1_coord;
                int row2 = ((int)(temp.playerBase.coord.Y) / Variables.cellHeigth);
                int col2 = ((int)(temp.playerBase.coord.X) / Variables.cellWidth);
                gameboard.getCell(row2, col2).setOwnedBy(temp.index);

            }

            for (int i = 0; i < playerList.Count; i++)
            {
                ParticleSystem effect = new ParticleSystem();
                effect.Init(gameTime, base_effect[i], playerList[i].playerBase, 3000, 1.0f, 5.0f);
                activeEffects.Add(effect);
            }
        }