public void addEffect(GameTime gameTime, Texture2D texture) { effect_Tex = texture; effect = new ParticleSystem(); effect.Init(gameTime, texture, this, 1500f, .01f, 0); hasEffect = true; }
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); } }
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); } }
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); } }