first commit
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
using System;
|
||||
using System.Runtime.Serialization;
|
||||
using BinaryPack.Attributes;
|
||||
|
||||
namespace NitroxModel.DataStructures.GameLogic.Entities.Metadata;
|
||||
|
||||
[Serializable]
|
||||
[DataContract]
|
||||
public class EggMetadata : EntityMetadata
|
||||
{
|
||||
[DataMember(Order = 1)]
|
||||
public float TimeStartHatching { get; }
|
||||
|
||||
[DataMember(Order = 2)]
|
||||
public float Progress { get; }
|
||||
|
||||
[IgnoreConstructor]
|
||||
protected EggMetadata()
|
||||
{
|
||||
//Constructor for serialization. Has to be "protected" for json serialization.
|
||||
}
|
||||
|
||||
public EggMetadata(float timeStartHatching, float progress)
|
||||
{
|
||||
TimeStartHatching = timeStartHatching;
|
||||
Progress = progress;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return $"[{nameof(EggMetadata)} TimeStartHatching: {TimeStartHatching}, Progress: {Progress}]";
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user