public static void ShootInLeg(TempPlayer player, int value) { ServerMatchManager manager = MatchMaker.matches[player.matchID]; TempPlayer other = manager.p1 == player ? manager.p2 : manager.p1; other.AddEffect(Constants.InjuredLegID, -10, 5); }
public static void ShootInArm(TempPlayer player, int value) { ServerMatchManager manager = MatchMaker.matches[player.matchID]; TempPlayer other = manager.p1 == player ? manager.p2 : manager.p1; other.AddEffect(Constants.InjuredArmID, -10, 5); //player.AddEffect(, 0, 10000); //TODO: CHECK IF IT'S Ok or change to some other value for duration }
public static void SearchingLoop() { while (players.Count != 0) { if (players.Count >= 2) { TempPlayer player1 = players[0]; players.RemoveAt(0); TempPlayer player2 = players[0]; players.RemoveAt(0); matches[matchID] = new ServerMatchManager(matchID, player1, player2); matches[matchID].InitializeMatch(); matchID++; } } isSearching = false; }