/// <summary> /// Begins fight between two players /// </summary> /// <param name="player1"></param> /// <param name="player2"></param> public void MakeMatch(Player player1, Player player2) { GameMatch match = new GameMatch(GameMode.Ranked); match.Player1 = player1; player1.CurrentMatch = match; player1.InGameID = 1; player1.Refresh(); match.Player2 = player2; player2.CurrentMatch = match; player2.InGameID = 2; player2.Refresh(); match.Player1Upgrades = new UpgradesInfo(); match.Player2Upgrades = new UpgradesInfo(); match.Field1 = fieldManager.GenerateFieldForPlayer(player1); match.Field1.InGameID = 1; match.Field2 = fieldManager.GenerateFieldForPlayer(player2); match.Field1.InGameID = 2; Matches.Add(match); GameCore.Instance.StartMatch(match); }