Moved campaign UI logic from LobbyScreen to a separate class

This commit is contained in:
Joonas Rikkonen
2017-08-29 19:32:14 +03:00
parent a75fd12020
commit dc3b9baa0d
5 changed files with 495 additions and 408 deletions
@@ -13,6 +13,8 @@ namespace Barotrauma
private static Texture2D iceCraters;
private static Texture2D iceCrack;
public Action<Location, LocationConnection> OnLocationSelected;
public void Update(float deltaTime, Rectangle rect, float scale = 1.0f)
{
Vector2 rectCenter = new Vector2(rect.Center.X, rect.Center.Y);
@@ -46,7 +48,9 @@ namespace Barotrauma
{
selectedConnection = connection;
selectedLocation = highlightedLocation;
GameMain.LobbyScreen.SelectLocation(highlightedLocation, connection);
OnLocationSelected?.Invoke(selectedLocation, selectedConnection);
//GameMain.LobbyScreen.SelectLocation(highlightedLocation, connection);
}
}