Compare commits
5 commits
b7921ddb36
...
c8d4423ba8
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c8d4423ba8 | ||
|
|
d818b735e5 | ||
|
|
6a4f5d9400 | ||
|
|
cd4842a7c4 | ||
|
|
f486ec8ea0 |
1 changed files with 70 additions and 72 deletions
|
|
@ -1,8 +1,7 @@
|
||||||
|
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
|
||||||
{
|
{
|
||||||
|
|
@ -39,7 +38,8 @@ public class Spacetime
|
||||||
// Initialize the `AuthToken` module
|
// Initialize the `AuthToken` module
|
||||||
AuthToken.Init(".spacetime_csharp_quickstart");
|
AuthToken.Init(".spacetime_csharp_quickstart");
|
||||||
|
|
||||||
Connection = DbConnection.Builder()
|
Connection = DbConnection
|
||||||
|
.Builder()
|
||||||
.WithUri(host)
|
.WithUri(host)
|
||||||
.WithModuleName(dbName)
|
.WithModuleName(dbName)
|
||||||
.WithToken(AuthToken.Token)
|
.WithToken(AuthToken.Token)
|
||||||
|
|
@ -55,9 +55,7 @@ public class Spacetime
|
||||||
Identity = identity;
|
Identity = identity;
|
||||||
AuthToken.SaveToken(authToken);
|
AuthToken.SaveToken(authToken);
|
||||||
|
|
||||||
conn.SubscriptionBuilder()
|
conn.SubscriptionBuilder().OnApplied(OnSubscriptionApplied).SubscribeToAllTables();
|
||||||
.OnApplied(OnSubscriptionApplied)
|
|
||||||
.SubscribeToAllTables();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Our `OnSubscriptionApplied` callback:
|
/// Our `OnSubscriptionApplied` callback:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue