コード例 #1
0
        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)));
        }
コード例 #2
0
        //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));
        }
コード例 #3
0
        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)));
        }
コード例 #4
0
 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));
 }