private void DebugColorEdit() { KeyControl keyPlayer = new KeyControl(Keys.NumPad4); KeyControl keyTeam1 = new KeyControl(Keys.NumPad2); KeyControl keyTeam2 = new KeyControl(Keys.NumPad3); KeyControl keyShift1 = new KeyControl(Keys.LeftControl); KeyControl keyShift2 = new KeyControl(Keys.RightControl); if (keyPlayer.KeyPressed()) { ColorMaskedSprite playerMaskedSprite = Owner.FindComponent <ColorMaskedSprite>(); if (PlayerIndex == PlayerIndex.One) // hack to avoid several Color incrementations { if (keyShift1.KeyDown() || keyShift2.KeyDown()) { Colors.Previous(); } else { Colors.Next(); } } playerMaskedSprite.Color1 = Colors.Current(); } else if (keyTeam1.KeyPressed() && m_team.TeamID == TeamId.TeamOne || (keyTeam2.KeyPressed() && m_team.TeamID == TeamId.TeamTwo)) { ColorMaskedSprite playerMaskedSprite = Owner.FindComponent <ColorMaskedSprite>(); if (keyShift1.KeyDown() || keyShift2.KeyDown()) { Colors.Current(); } else { Colors.Current(); } m_team.ColorScheme.Color1 = Colors.Current(); playerMaskedSprite.Color3 = Colors.Current(); } }
private void DebugColorEdit() { KeyControl keyArenaWall = new KeyControl(Keys.NumPad0); KeyControl keyArenaGround = new KeyControl(Keys.NumPad1); KeyControl keyTeam1 = new KeyControl(Keys.NumPad2); KeyControl keyTeam2 = new KeyControl(Keys.NumPad3); KeyControl keyShift1 = new KeyControl(Keys.LeftControl); KeyControl keyShift2 = new KeyControl(Keys.RightControl); if (keyArenaWall.KeyPressed()) { ColorMaskedSprite arenaMaskedSprite = Owner.FindComponent <ColorMaskedSprite>(); if (keyShift1.KeyDown() || keyShift2.KeyDown()) { arenaMaskedSprite.Color1 = Colors.Previous(); } else { arenaMaskedSprite.Color1 = Colors.Next(); } } else if (keyArenaGround.KeyPressed()) { ColorMaskedSprite arenaMaskedSprite = Owner.FindComponent <ColorMaskedSprite>(); if (keyShift1.KeyDown() || keyShift2.KeyDown()) { arenaMaskedSprite.Color4 = Colors.Previous(); } else { arenaMaskedSprite.Color4 = Colors.Next(); } } else { bool keyTeamPressed = false; Team team = null; if (keyTeam1.KeyPressed()) { keyTeamPressed = true; team = Game.GameManager.Teams[0]; } else if (keyTeam2.KeyPressed()) { keyTeamPressed = true; team = Game.GameManager.Teams[1]; } if (keyTeamPressed) { if (keyShift1.KeyDown() || keyShift2.KeyDown()) { Colors.Previous(); } else { Colors.Next(); } team.ColorScheme.Color1 = Colors.Current(); ColorMaskedSprite arenaMaskedSprite = Owner.FindComponent <ColorMaskedSprite>(); if (m_leftGoal.Team.TeamID == team.TeamID) { arenaMaskedSprite.Color2 = Colors.Current(); } else { arenaMaskedSprite.Color3 = Colors.Current(); } } } }