Skip to content

Commit

Permalink
fix: fixed dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
momintlh committed Sep 6, 2024
1 parent a9b9483 commit 12559a2
Show file tree
Hide file tree
Showing 86 changed files with 53 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ private void Initialize()
}, () =>
{
PlayroomKit.OnPlayerJoin(AddPlayer);
print($"[Unity Log] isHost: {PlayroomKit.IsHost()}");
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
browser: 0
webDriverDirectory: Assets\
webDriverDirectory:
browserArguments: []
httpServerPort: 6500
indexFile: {fileID: 4900000, guid: f9b34a310cdb64b38a68c4c1319bf1a7, type: 3}
Expand Down
8 changes: 8 additions & 0 deletions Assets/PlayroomKit/dependencies.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: c0011418c9d75434988a06b6df93b283, type: 3}
m_Name: ParrelSyncProjectSettings
m_EditorClassIdentifier:
m_OptionalSymbolicLinkFolders: []

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
37 changes: 4 additions & 33 deletions Assets/Scripts/GameManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,41 +35,12 @@ void Start()
}, () =>
{
PlayroomKit.OnPlayerJoin(AddPlayer);

Debug.Log(PlayroomKit.IsHost());

if (PlayroomKit.IsHost())
{
setRoomProperties();
}
else
{
CalculateRoomCreatedTime();
}
PlayroomKit.RpcRegister("score", (data, caller) => print($"{data} by {PlayroomKit.GetPlayer(caller).GetProfile().name}"));
}, () => { Debug.Log("OnDisconnect callback"); });
}

void setRoomProperties()
{
PlayroomKit.SetState("roomCreated", DateTime.Now.ToString(), true);
var time = PlayroomKit.GetState<string>("roomCreated");

Debug.Log($"[Host]: {time}");
PlayroomKit.SetState("isGameStarted", false, true);
}

void CalculateRoomCreatedTime()
{
string roomCreatedString = PlayroomKit.GetState<string>("roomCreated");
Debug.Log($"[Non Host]: {roomCreatedString}");
}

private void logScore(string data, string sender)
{
Debug.LogWarning($"{data} by {PlayroomKit.GetPlayer(sender).GetProfile().name}");
}





/// <summary>
/// Update the player position and sync.
/// </summary>
Expand Down

0 comments on commit 12559a2

Please sign in to comment.