Add basic teleportation and portals (#269)
* Add basic teleportation and portals * Address PJB's feedback and minor cleanup
This commit is contained in:
committed by
Pieter-Jan Briers
parent
52a6d9ff43
commit
1f320eccd7
25
Content.Server/GameObjects/EntitySystems/PortalSystem.cs
Normal file
25
Content.Server/GameObjects/EntitySystems/PortalSystem.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using Content.Server.GameObjects.Components.Movement;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.GameObjects.Systems;
|
||||
|
||||
namespace Content.Server.GameObjects.EntitySystems
|
||||
{
|
||||
[UsedImplicitly]
|
||||
public class PortalSystem : EntitySystem
|
||||
{
|
||||
public override void Initialize()
|
||||
{
|
||||
EntityQuery = new TypeEntityQuery(typeof(ServerPortalComponent));
|
||||
}
|
||||
|
||||
public override void Update(float frameTime)
|
||||
{
|
||||
foreach (var entity in RelevantEntities)
|
||||
{
|
||||
var comp = entity.GetComponent<ServerPortalComponent>();
|
||||
comp.OnUpdate();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user