Re-organize all projects (#4166)

This commit is contained in:
DrSmugleaf
2021-06-09 22:19:39 +02:00
committed by GitHub
parent 9f50e4061b
commit ff1a2d97ea
1773 changed files with 5258 additions and 5508 deletions

View File

@@ -1,8 +1,8 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Content.Client.GameObjects.Components.Arcade;
using Content.Client.Utility;
using Content.Client.Arcade.UI;
using Content.Client.Resources;
using Content.Shared.Arcade;
using Content.Shared.Input;
using Robust.Client.Graphics;

View File

@@ -1,5 +1,5 @@
using Content.Client.GameObjects.Components.Arcade;
using Content.Shared.GameObjects.Components.Arcade;
using Content.Client.Arcade.UI;
using Content.Shared.Arcade;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.CustomControls;
using Robust.Shared.Localization;

View File

@@ -0,0 +1,78 @@
using Content.Shared.Arcade;
using Robust.Client.GameObjects;
using Robust.Shared.GameObjects;
namespace Content.Client.Arcade.UI
{
public class BlockGameBoundUserInterface : BoundUserInterface
{
private BlockGameMenu? _menu;
public BlockGameBoundUserInterface(ClientUserInterfaceComponent owner, object uiKey) : base(owner, uiKey)
{
}
protected override void Open()
{
base.Open();
_menu = new BlockGameMenu(this);
_menu.OnClose += Close;
_menu.OpenCentered();
}
protected override void ReceiveMessage(BoundUserInterfaceMessage message)
{
switch (message)
{
case BlockGameMessages.BlockGameVisualUpdateMessage updateMessage:
switch (updateMessage.GameVisualType)
{
case BlockGameMessages.BlockGameVisualType.GameField:
_menu?.UpdateBlocks(updateMessage.Blocks);
break;
case BlockGameMessages.BlockGameVisualType.HoldBlock:
_menu?.UpdateHeldBlock(updateMessage.Blocks);
break;
case BlockGameMessages.BlockGameVisualType.NextBlock:
_menu?.UpdateNextBlock(updateMessage.Blocks);
break;
}
break;
case BlockGameMessages.BlockGameScoreUpdateMessage scoreUpdate:
_menu?.UpdatePoints(scoreUpdate.Points);
break;
case BlockGameMessages.BlockGameUserStatusMessage userMessage:
_menu?.SetUsability(userMessage.IsPlayer);
break;
case BlockGameMessages.BlockGameSetScreenMessage statusMessage:
if (statusMessage.isStarted) _menu?.SetStarted();
_menu?.SetScreen(statusMessage.Screen);
if (statusMessage is BlockGameMessages.BlockGameGameOverScreenMessage gameOverScreenMessage)
_menu?.SetGameoverInfo(gameOverScreenMessage.FinalScore, gameOverScreenMessage.LocalPlacement, gameOverScreenMessage.GlobalPlacement);
break;
case BlockGameMessages.BlockGameHighScoreUpdateMessage highScoreUpdateMessage:
_menu?.UpdateHighscores(highScoreUpdateMessage.LocalHighscores,
highScoreUpdateMessage.GlobalHighscores);
break;
case BlockGameMessages.BlockGameLevelUpdateMessage levelUpdateMessage:
_menu?.UpdateLevel(levelUpdateMessage.Level);
break;
}
}
public void SendAction(BlockGamePlayerAction action)
{
SendMessage(new BlockGameMessages.BlockGamePlayerActionMessage(action));
}
protected override void Dispose(bool disposing)
{
base.Dispose(disposing);
if (!disposing)
return;
_menu?.Dispose();
}
}
}

View File

@@ -0,0 +1,53 @@
using Robust.Client.GameObjects;
using Robust.Shared.GameObjects;
using Robust.Shared.ViewVariables;
using static Content.Shared.Arcade.SharedSpaceVillainArcadeComponent;
namespace Content.Client.Arcade.UI
{
public class SpaceVillainArcadeBoundUserInterface : BoundUserInterface
{
[ViewVariables] private SpaceVillainArcadeMenu? _menu;
//public SharedSpaceVillainArcadeComponent SpaceVillainArcade;
public SpaceVillainArcadeBoundUserInterface(ClientUserInterfaceComponent owner, object uiKey) : base(owner, uiKey)
{
SendAction(PlayerAction.RequestData);
}
public void SendAction(PlayerAction action)
{
SendMessage(new SpaceVillainArcadePlayerActionMessage(action));
}
protected override void Open()
{
base.Open();
/*if(!Owner.Owner.TryGetComponent(out SharedSpaceVillainArcadeComponent spaceVillainArcade))
{
return;
}
SpaceVillainArcade = spaceVillainArcade;*/
_menu = new SpaceVillainArcadeMenu(this);
_menu.OnClose += Close;
_menu.OpenCentered();
}
protected override void ReceiveMessage(BoundUserInterfaceMessage message)
{
if (message is SpaceVillainArcadeDataUpdateMessage msg) _menu?.UpdateInfo(msg);
}
protected override void Dispose(bool disposing)
{
base.Dispose(disposing);
if (disposing) _menu?.Dispose();
}
}
}