mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-09-01 17:47:24 +02:00
31 lines
856 B
C#
31 lines
856 B
C#
using System;
|
|
using Robust.Shared.GameStates;
|
|
using Robust.Shared.IoC;
|
|
using Robust.Shared.Serialization;
|
|
using Robust.Shared.Serialization.Manager.Attributes;
|
|
|
|
namespace Robust.Shared.GameObjects
|
|
{
|
|
/// <summary>
|
|
/// An optimisation component for stuff that should be set as collidable when it's awake and non-collidable when asleep.
|
|
/// </summary>
|
|
[NetworkedComponent()]
|
|
[Friend(typeof(CollisionWakeSystem))]
|
|
public sealed class CollisionWakeComponent : Component
|
|
{
|
|
[DataField("enabled")]
|
|
public bool Enabled = true;
|
|
|
|
[Serializable, NetSerializable]
|
|
public sealed class CollisionWakeState : ComponentState
|
|
{
|
|
public bool Enabled { get; }
|
|
|
|
public CollisionWakeState(bool enabled)
|
|
{
|
|
Enabled = enabled;
|
|
}
|
|
}
|
|
}
|
|
}
|