Aetheria/Assets/Scripts/ServerShared/Behaviors/Reflector.cs
hyperion51 fc94531566 Behavior Canceling & Grouping
Behaviors are now grouped, behaviors within a group can cancel execution of the rest of the group
2020-05-11 01:17:10 +01:00

51 lines
No EOL
1.2 KiB
C#

using MessagePack;
using Newtonsoft.Json;
using Unity.Mathematics;
using static Unity.Mathematics.math;
[MessagePackObject, JsonObject(MemberSerialization.OptIn)]
public class ReflectorData : BehaviorData
{
[InspectableField, JsonProperty("crossSection"), Key(1)]
public PerformanceStat CrossSection = new PerformanceStat();
// [InspectableAnimationCurve, JsonProperty("visibility"), Key(1)]
// public float4[] VisibilityCurve;
public override IBehavior CreateInstance(GameContext context, Entity entity, Gear item)
{
return new Reflector(context, this, entity, item);
}
}
public class Reflector : IBehavior
{
public Entity Entity { get; }
public Gear Item { get; }
public GameContext Context { get; }
public BehaviorData Data => _data;
private ReflectorData _data;
public Reflector(GameContext context, ReflectorData data, Entity entity, Gear item)
{
Context = context;
_data = data;
Entity = entity;
Item = item;
}
public void Initialize()
{
}
public bool Update(float delta)
{
return true;
}
public void Remove()
{
}
}