Skip to content
This repository has been archived by the owner on Jan 18, 2022. It is now read-only.

Commit

Permalink
removing client attributes argument (#454)
Browse files Browse the repository at this point in the history
  • Loading branch information
jessicafalk authored Oct 8, 2018
1 parent e342664 commit 0e0e51c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 11 deletions.
11 changes: 2 additions & 9 deletions workers/unity/Assets/Playground/Config/PlayerTemplate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,9 @@ namespace Playground
{
public static class PlayerTemplate
{
public static EntityTemplate CreatePlayerEntityTemplate(string workerId, List<string> clientAttributeSet,
Improbable.Vector3f position)
public static EntityTemplate CreatePlayerEntityTemplate(string workerId, Improbable.Vector3f position)
{
var clientAttribute = clientAttributeSet.First(attribute => attribute != WorkerUtils.UnityClient);

if (clientAttribute == null)
{
throw new InvalidOperationException(
$"Expected an attribute that is not \"{WorkerUtils.UnityClient}\" but none was found.");
}
var clientAttribute = $"workerId:{workerId}";

var playerInput = PlayerInput.Component.CreateSchemaComponentData(0, 0, false);
var launcher = Launcher.Component.CreateSchemaComponentData(100, 0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ namespace Improbable.Gdk.PlayerLifecycle
{
public delegate EntityTemplate GetPlayerEntityTemplateDelegate(
string clientWorkerId,
List<string> clientAttributeSet,
Vector3f position);

public static class PlayerLifecycleConfig
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ protected override void OnUpdate()
}

var playerEntity = PlayerLifecycleConfig.CreatePlayerEntityTemplate(request.CallerWorkerId,
request.CallerAttributeSet, request.Payload.Position);
request.Payload.Position);
createEntitySender.RequestsToSend.Add(WorldCommands.CreateEntity.CreateRequest
(
playerEntity,
Expand Down

0 comments on commit 0e0e51c

Please sign in to comment.