punish v6.8.18.0
This commit is contained in:
commit
060278c1b7
317 changed files with 554155 additions and 0 deletions
|
@ -0,0 +1,42 @@
|
|||
using System;
|
||||
using System.Numerics;
|
||||
using System.Text.Json.Serialization;
|
||||
using Questionable.Model.Common.Converter;
|
||||
|
||||
namespace Questionable.Model.Gathering;
|
||||
|
||||
public sealed class GatheringLocation
|
||||
{
|
||||
[JsonIgnore]
|
||||
public Guid InternalId { get; } = Guid.NewGuid();
|
||||
|
||||
[JsonConverter(typeof(VectorConverter))]
|
||||
public Vector3 Position { get; set; }
|
||||
|
||||
public int? MinimumAngle { get; set; }
|
||||
|
||||
public int? MaximumAngle { get; set; }
|
||||
|
||||
public float? MinimumDistance { get; set; }
|
||||
|
||||
public float? MaximumDistance { get; set; }
|
||||
|
||||
public bool IsCone()
|
||||
{
|
||||
if (MinimumAngle.HasValue)
|
||||
{
|
||||
return MaximumAngle.HasValue;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public float CalculateMinimumDistance()
|
||||
{
|
||||
return MinimumDistance ?? 1f;
|
||||
}
|
||||
|
||||
public float CalculateMaximumDistance()
|
||||
{
|
||||
return MaximumDistance ?? 3f;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue