示例#1
0
 /// <inheritdoc />
 public PlayerEntityCreationContext([NotNull] NetworkEntityGuid entityGuid,
                                    [NotNull] PlayerEntitySessionContext sessionContext,
                                    EntityPrefab prefabType,
                                    Vector3 initialPosition,
                                    float orientation)
 {
     if (!Enum.IsDefined(typeof(EntityPrefab), prefabType))
     {
         throw new InvalidEnumArgumentException(nameof(prefabType), (int)prefabType, typeof(EntityPrefab));
     }
     EntityGuid      = entityGuid ?? throw new ArgumentNullException(nameof(entityGuid));
     SessionContext  = sessionContext ?? throw new ArgumentNullException(nameof(sessionContext));
     PrefabType      = prefabType;
     InitialPosition = initialPosition;
     Orientation     = orientation;
 }
示例#2
0
 /// <inheritdoc />
 public PlayerSessionClaimedEventArgs([NotNull] NetworkEntityGuid entityGuid, Vector3 spawnPosition, [NotNull] PlayerEntitySessionContext sessionContext)
 {
     EntityGuid     = entityGuid ?? throw new ArgumentNullException(nameof(entityGuid));
     SpawnPosition  = spawnPosition;
     SessionContext = sessionContext ?? throw new ArgumentNullException(nameof(sessionContext));
 }
示例#3
0
 /// <inheritdoc />
 public PlayerEntityEnterWorldCreationContext([NotNull] PlayerEntitySessionContext sessionContext, Vector3 spawnPosition)
 {
     SessionContext = sessionContext ?? throw new ArgumentNullException(nameof(sessionContext));
     SpawnPosition  = spawnPosition;
 }