Attempt to using Nakama as replacement of Low-Level ENet

This commit is contained in:
2025-12-02 00:58:44 +08:00
parent b27b612989
commit ead155afed
74 changed files with 14205 additions and 23315 deletions
@@ -0,0 +1,34 @@
extends RefCounted
class_name NakamaStorageObjectId
# The collection which stores the object.
var collection : String
# The key of the object within the collection.
var key : String
# The user owner of the object.
var user_id : String
# The version hash of the object.
var version : String
func _init(p_collection, p_key, p_user_id = "", p_version = ""):
collection = p_collection
key = p_key
user_id = p_user_id
version = p_version
func as_delete():
return NakamaAPI.ApiDeleteStorageObjectId.create(NakamaAPI, {
"collection": collection,
"key": key,
"version": version
})
func as_read():
return NakamaAPI.ApiReadStorageObjectId.create(NakamaAPI, {
"collection": collection,
"key": key,
"user_id": user_id
})