public static NetworkEntityGuid GetEntityGuidValue(this IReadonlyEntityDataFieldContainer container, EntityObjectField index) { if (container == null) { throw new ArgumentNullException(nameof(container)); } return(new NetworkEntityGuid(container.GetFieldValue <ulong>((int)index))); }
//TODO: Doc public static TValueType GetFieldValue <TValueType>(this IReadonlyEntityDataFieldContainer container, BaseObjectField index) where TValueType : struct { if (container == null) { throw new ArgumentNullException(nameof(container)); } return(container.GetFieldValue <TValueType>((int)index)); }
public static TValueType GetEnumFieldValue <TValueType>(this IReadonlyEntityDataFieldContainer container, GameObjectField index) where TValueType : Enum { if (container == null) { throw new ArgumentNullException(nameof(container)); } return(GenericMath.Convert <int, TValueType>(container.GetFieldValue <int>((int)index))); }
public SpellEffectApplicationContext([NotNull] NetworkEntityGuid spellSource, [NotNull] NetworkEntityGuid applicationTarget, [NotNull] ISpellEffectPairable spellEffectData, [NotNull] IReadonlyEntityDataFieldContainer applicationTargetEntityData) { SpellSource = spellSource ?? throw new ArgumentNullException(nameof(spellSource)); ApplicationTarget = applicationTarget ?? throw new ArgumentNullException(nameof(applicationTarget)); SpellEffectData = spellEffectData ?? throw new ArgumentNullException(nameof(spellEffectData)); ApplicationTargetEntityData = applicationTargetEntityData ?? throw new ArgumentNullException(nameof(applicationTargetEntityData)); }