/// <inheritdoc /> public INetworkPlayer CreateEntity(int id) { Transform spawnpoint = SpawnPointStrategy.GetSpawnpoint(); if (spawnpoint == null) { throw new InvalidOperationException($"The {this.GetType().Name} tried to load a spawnpoint from {nameof(SpawnPointStrategy)} but the point was null."); } return(CreateEntity(id, spawnpoint.position, spawnpoint.rotation)); }
public IEntitySpawnResults TrySpawnEntity(ISpawnContext context) { //Grabs a spawn point from the spawn point service. Transform spawnTransform = playerSpawnStrategy.GetSpawnpoint(); return(this.TrySpawnEntity(spawnTransform.position, spawnTransform.rotation, context)); }