Reducing usage of #if CLIENT / #elif SERVER

The server will implement some classes it probably shouldn't need because certain items or game states depend on them.
This commit is contained in:
juanjp600
2017-06-14 17:30:40 -03:00
parent 389a9512d9
commit 7bc535780c
471 changed files with 3985 additions and 3159 deletions
+42
View File
@@ -0,0 +1,42 @@
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using System;
using System.Collections.Generic;
namespace Barotrauma
{
partial class Screen
{
private static Screen selected;
public static Screen Selected
{
get { return selected; }
}
public virtual void Deselect()
{
}
public virtual void Select()
{
if (selected != null && selected != this)
{
selected.Deselect();
#if CLIENT
GUIComponent.KeyboardDispatcher.Subscriber = null;
#endif
}
selected = this;
}
public virtual Camera Cam
{
get { return null; }
}
public virtual void Update(double deltaTime)
{
}
}
}