Compare commits
5 commits
c8d4423ba8
...
b7921ddb36
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b7921ddb36 | ||
|
|
000f040652 | ||
|
|
8fc179c406 | ||
|
|
e680978f2d | ||
|
|
0c91aecec4 |
1 changed files with 72 additions and 70 deletions
|
|
@ -1,7 +1,8 @@
|
||||||
using System;
|
|
||||||
using Godot;
|
using Godot;
|
||||||
using SpacetimeDB;
|
using SpacetimeDB;
|
||||||
using SpacetimeDB.Types;
|
using SpacetimeDB.Types;
|
||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
public class Spacetime
|
public class Spacetime
|
||||||
{
|
{
|
||||||
|
|
@ -38,8 +39,7 @@ public class Spacetime
|
||||||
// Initialize the `AuthToken` module
|
// Initialize the `AuthToken` module
|
||||||
AuthToken.Init(".spacetime_csharp_quickstart");
|
AuthToken.Init(".spacetime_csharp_quickstart");
|
||||||
|
|
||||||
Connection = DbConnection
|
Connection = DbConnection.Builder()
|
||||||
.Builder()
|
|
||||||
.WithUri(host)
|
.WithUri(host)
|
||||||
.WithModuleName(dbName)
|
.WithModuleName(dbName)
|
||||||
.WithToken(AuthToken.Token)
|
.WithToken(AuthToken.Token)
|
||||||
|
|
@ -55,7 +55,9 @@ public class Spacetime
|
||||||
Identity = identity;
|
Identity = identity;
|
||||||
AuthToken.SaveToken(authToken);
|
AuthToken.SaveToken(authToken);
|
||||||
|
|
||||||
conn.SubscriptionBuilder().OnApplied(OnSubscriptionApplied).SubscribeToAllTables();
|
conn.SubscriptionBuilder()
|
||||||
|
.OnApplied(OnSubscriptionApplied)
|
||||||
|
.SubscribeToAllTables();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Our `OnSubscriptionApplied` callback:
|
/// Our `OnSubscriptionApplied` callback:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue