More refactors
This commit is contained in:
@@ -9,6 +9,10 @@ namespace Content.Shared.GameObjects.Components.Instruments
|
||||
{
|
||||
public override string Name => "Instrument";
|
||||
public override uint? NetID => ContentNetIDs.INSTRUMENTS;
|
||||
|
||||
public virtual void Update(float delta)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -20,6 +24,14 @@ namespace Content.Shared.GameObjects.Components.Instruments
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This message is sent to the client to start the synth.
|
||||
/// </summary>
|
||||
[Serializable, NetSerializable]
|
||||
public class InstrumentStartMidiMessage : ComponentMessage
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This message carries a MidiEvent to be played on clients.
|
||||
/// </summary>
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
using Content.Client.GameObjects.Components.Instruments;
|
||||
using Content.Shared.GameObjects.Components.Instruments;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.GameObjects.Systems;
|
||||
|
||||
namespace Content.Client.GameObjects.EntitySystems
|
||||
namespace Content.Shared.GameObjects.EntitySystems
|
||||
{
|
||||
public class InstrumentSystem : EntitySystem
|
||||
{
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
EntityQuery = new TypeEntityQuery(typeof(InstrumentComponent));
|
||||
EntityQuery = new TypeEntityQuery(typeof(SharedInstrumentComponent));
|
||||
}
|
||||
|
||||
public override void Update(float frameTime)
|
||||
@@ -18,7 +18,7 @@ namespace Content.Client.GameObjects.EntitySystems
|
||||
|
||||
foreach (var entity in RelevantEntities)
|
||||
{
|
||||
entity.GetComponent<InstrumentComponent>().Update(frameTime);
|
||||
entity.GetComponent<SharedInstrumentComponent>().Update(frameTime);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user