public void CreateBoxStatus(Vector2 BoxPos, Game_Player Player) { if (Player.PlyHealth < 0) { Player.PlyHealth = 0; } int PosX = (int)BoxPos.X; int PosXP = (int)BoxPos.X + BoxStatusTx[0].Width; int PoxY = (int)BoxPos.Y + 25; int Healt = Player.PlyHealth / 5; int Popul = Player.Popularity / 5; TextTitle = Player.PlyName; Color ColorHBar = new Color(new Vector4(255, 0, 0, 10)); Color ColorHPolBar = new Color(new Vector4(255, 255, 255, 10)); UI2DRenderer.FillRectangle(new Rectangle(PosX, PoxY, BoxStatusTx[0].Width, BoxStatusTx[0].Height), BoxStatusTx[0], ColorHBar); UI2DRenderer.FillRectangle(new Rectangle(PosX, PoxY + 20, BoxStatusTx[0].Width, BoxStatusTx[0].Height), BoxStatusTx[0], ColorHPolBar); PosX += BoxStatusTx[0].Width; UI2DRenderer.FillRectangle(new Rectangle(PosX, PoxY, BoxStatusTx[1].Width * Healt, BoxStatusTx[1].Height), BoxStatusTx[1], ColorHBar); //UI2DRenderer.FillRectangle(new Rectangle(PosX, PoxY + 20, BoxStatusTx[1].Width * Popul, BoxStatusTx[1].Height), BoxStatusTx[1], ColorHPolBar); PosX += BoxStatusTx[1].Width * Healt; PosXP += BoxStatusTx[1].Width * Popul; UI2DRenderer.FillRectangle(new Rectangle(PosX, PoxY, BoxStatusTx[2].Width, BoxStatusTx[2].Height), BoxStatusTx[2], ColorHBar); //UI2DRenderer.FillRectangle(new Rectangle(PosXP, PoxY + 20, BoxStatusTx[2].Width, BoxStatusTx[2].Height), BoxStatusTx[2], ColorHPolBar); UI2DRenderer.WriteText(BoxPos, TextTitle, Color.DarkGray, CalibriFont, new Vector2(0.5f, 0.5f)); }
private SoundManager SndGame; //Class to Manager the Soundseffects #endregion #region Constructor public Game_Logic(int NumMaxPLayer) { int x; SndGame = new SoundManager(); /**********Creation Logic Game ********/ GameState = Game_States.INTRO; LstState = Game_States.INTRO; ScrennState = Game_SCR.RUNNING; CurrentPlayer = 0; MaxPlayers = NumMaxPLayer; Players = new Game_Player[MaxPlayers]; for (x = 0; x < MaxPlayers; x++) { Players[x] = new Game_Player(); } //Only the Player 1 Is connected (use the KeyBoard) AddPlayer("Player 1", 1); //Defino Personaje Por Player Players[0].PlySelect = 1; //Players[1].PlySelect = 4; //Players[2].PlySelect = 5; //Players[3].PlySelect = 8; Players[1].PlySelect = 2; Players[2].PlySelect = 3; Players[3].PlySelect = 4; /*** History ****/ HistoryIni = new string[8]; HistoryEnd = new string[8]; CreateHistory(); //Weapons Weapons = new Game_Weapon[MaxPlayers]; MaxWeapons = NumMaxPLayer; //pause PauseGame = false; //Initial Level Level = 0; LevelH = 10; //Mode Multiplayer MultiMode = Play_MultiMode.DEATHMATCH; //Mode of Game Mode = Game_Mode.MULTI_PLY; //Status Pause_Status = Pausa_Status.RETURN; }
public Game_Logic(int NumMaxPLayer) { int x; SndGame = new SoundManager(); /**********Creation Logic Game ********/ GameState = Game_States.INTRO; LstState = Game_States.INTRO; ScrennState = Game_SCR.RUNNING; CurrentPlayer = 0; MaxPlayers = NumMaxPLayer; Players = new Game_Player[MaxPlayers]; for (x = 0; x < MaxPlayers; x++) { Players[x] = new Game_Player(); } //Only the Player 1 Is connected (use the KeyBoard) AddPlayer("Player 1", 1); //Defino Personaje Por Player Players[0].PlySelect = 1; //Players[1].PlySelect = 4; //Players[2].PlySelect = 5; //Players[3].PlySelect = 8; Players[1].PlySelect = 2; Players[2].PlySelect = 3; Players[3].PlySelect = 4; /*** History ****/ HistoryIni = new string[8]; HistoryEnd = new string[8]; CreateHistory(); //Weapons Weapons = new Game_Weapon[MaxPlayers]; MaxWeapons = NumMaxPLayer; //pause PauseGame = false; //Initial Level Level = 0; LevelH = 10; //Mode Multiplayer MultiMode = Play_MultiMode.DEATHMATCH; //Mode of Game Mode = Game_Mode.MULTI_PLY; //Status Pause_Status = Pausa_Status.RETURN; }
public void CreateBoxStatus(Vector2 BoxPos, Game_Player Player) { if (Player.PlyHealth < 0) Player.PlyHealth = 0; int PosX = (int)BoxPos.X; int PosXP = (int)BoxPos.X + BoxStatusTx[0].Width; int PoxY = (int)BoxPos.Y + 25; int Healt = Player.PlyHealth / 5; int Popul = Player.Popularity / 5; TextTitle = Player.PlyName; Color ColorHBar = new Color(new Vector4(255, 0, 0, 10)); Color ColorHPolBar = new Color(new Vector4(255, 255, 255, 10)); UI2DRenderer.FillRectangle(new Rectangle(PosX, PoxY, BoxStatusTx[0].Width, BoxStatusTx[0].Height), BoxStatusTx[0], ColorHBar); UI2DRenderer.FillRectangle(new Rectangle(PosX, PoxY + 20, BoxStatusTx[0].Width, BoxStatusTx[0].Height), BoxStatusTx[0], ColorHPolBar); PosX += BoxStatusTx[0].Width; UI2DRenderer.FillRectangle(new Rectangle(PosX, PoxY, BoxStatusTx[1].Width * Healt, BoxStatusTx[1].Height), BoxStatusTx[1], ColorHBar); //UI2DRenderer.FillRectangle(new Rectangle(PosX, PoxY + 20, BoxStatusTx[1].Width * Popul, BoxStatusTx[1].Height), BoxStatusTx[1], ColorHPolBar); PosX += BoxStatusTx[1].Width * Healt; PosXP += BoxStatusTx[1].Width * Popul; UI2DRenderer.FillRectangle(new Rectangle(PosX, PoxY, BoxStatusTx[2].Width, BoxStatusTx[2].Height), BoxStatusTx[2], ColorHBar); //UI2DRenderer.FillRectangle(new Rectangle(PosXP, PoxY + 20, BoxStatusTx[2].Width, BoxStatusTx[2].Height), BoxStatusTx[2], ColorHPolBar); UI2DRenderer.WriteText(BoxPos, TextTitle, Color.DarkGray, CalibriFont, new Vector2(0.5f, 0.5f)); }