fixed cloud pop in and terrain textures
This commit is contained in:
@@ -5,7 +5,6 @@ func save_cloud_data(data,collection_id):
|
||||
if auth.localid:
|
||||
var collection: FirestoreCollection = Firebase.Firestore.collection(collection_id)
|
||||
var document = await collection.get_doc(auth.localid)
|
||||
|
||||
if document:
|
||||
for key in data.keys():
|
||||
document.add_or_update_field(key,data[key])
|
||||
@@ -19,12 +18,9 @@ func save_cloud_data(data,collection_id):
|
||||
|
||||
func load_cloud_data(collection_id):
|
||||
var auth = Firebase.Auth.auth
|
||||
|
||||
if auth.localid:
|
||||
var collection : FirestoreCollection = Firebase.Firestore.collection(collection_id)
|
||||
|
||||
var document = await collection.get_doc(auth.localid)
|
||||
|
||||
if document:
|
||||
print(document)
|
||||
return document
|
||||
@@ -40,15 +36,11 @@ func save_leaderboard_data():
|
||||
"money" : GameGlobals.money,
|
||||
"deposited_money" : GameGlobals.deposited_money
|
||||
}
|
||||
|
||||
var leaderboard_name = get_leaderboard_name()
|
||||
|
||||
var data = {
|
||||
leaderboard_name : leaderboard_data
|
||||
}
|
||||
|
||||
var collection = "leaderboard"
|
||||
|
||||
save_cloud_data(data,collection)
|
||||
|
||||
func load_leaderboard_data():
|
||||
@@ -72,7 +64,6 @@ func save_user_data():
|
||||
var data ={
|
||||
leaderboard_name : leaderboard_data
|
||||
}
|
||||
|
||||
var collection = "user_data"
|
||||
|
||||
save_cloud_data(data,collection)
|
||||
|
||||
@@ -11,7 +11,10 @@ func spawn_clouds():
|
||||
number_of_clouds -= 1
|
||||
|
||||
var spawn_pos = random_box_pos()
|
||||
|
||||
var set_pos = self.global_position + spawn_pos
|
||||
var cloud = cloud.instantiate()
|
||||
cloud.visible = false
|
||||
add_child(cloud)
|
||||
cloud.global_position = self.global_position + spawn_pos
|
||||
cloud.global_position = set_pos
|
||||
await cloud.global_position == set_pos
|
||||
cloud.visible = true
|
||||
|
||||
Reference in New Issue
Block a user