Added IInteractable and Stations
This commit is contained in:
@@ -105,6 +105,10 @@ namespace Subsystems
|
||||
case "MapDataError":
|
||||
Debug.Log("Received MapData server error");
|
||||
break;
|
||||
case "SabotageStarted":
|
||||
Debug.Log("Sabotage started");
|
||||
HandleSabotageStarted(gameEvent);
|
||||
break;
|
||||
default:
|
||||
Debug.Log("Received GameEvent of type: " + gameEvent.EventType);
|
||||
break;
|
||||
@@ -157,6 +161,36 @@ namespace Subsystems
|
||||
_gameClient.StartGame();
|
||||
|
||||
}
|
||||
#region GameEvent Handlers
|
||||
private void HandleSabotageStarted(GameEvent gameEvent)
|
||||
{
|
||||
SabotageStartedPayload payload = gameEvent.GetPayload<SabotageStartedPayload>();
|
||||
switch (payload.Type)
|
||||
{
|
||||
case SabotageType.CommsBlackout:
|
||||
for(int i = 0;i < payload.RequiredSimultaneousRepairs; i++)
|
||||
{
|
||||
//create stations
|
||||
}
|
||||
//Ui.alert
|
||||
//DisableComms
|
||||
return;
|
||||
case SabotageType.CriticalMeltdown:
|
||||
for (int i = 0; i < payload.RequiredSimultaneousRepairs; i++)
|
||||
{
|
||||
//create stations
|
||||
}
|
||||
//UI.alert
|
||||
//UI Time remain
|
||||
return;
|
||||
|
||||
default:
|
||||
Debug.Log($"Sabotage of unknown type: {payload.Type}");
|
||||
return;
|
||||
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user