skin
This commit is contained in:
@@ -20,6 +20,7 @@ public class playerNetwork : NetworkBehaviour
|
||||
public const float ATTACK_COOLDOWN = 0.6f;
|
||||
[HideInInspector]
|
||||
public StatManager statManager;
|
||||
public CharacterSelection charSelectionManager;
|
||||
|
||||
//public const int XPFORLEVEL = 10;
|
||||
[SyncVar(hook =nameof(OnHealthChanged))] public int health = 100;
|
||||
@@ -150,6 +151,8 @@ public class playerNetwork : NetworkBehaviour
|
||||
|
||||
public GameObject projectile;
|
||||
|
||||
public string selectedCharacterJson = CharacterSelection.selectedCharJson;
|
||||
|
||||
public void QuestFunction(QuestScriptable questData){
|
||||
currentQuest = questData;
|
||||
questText.text = questData.questTitle;
|
||||
@@ -243,6 +246,7 @@ public class playerNetwork : NetworkBehaviour
|
||||
{"xp", XP},
|
||||
{"completedQuest", completedQuests},
|
||||
{"playerStats", statManager.PlayerStats},
|
||||
{"characterJson", selectedCharacterJson},
|
||||
|
||||
};
|
||||
|
||||
@@ -297,8 +301,9 @@ public class playerNetwork : NetworkBehaviour
|
||||
inventory.inventoryManager.SetInventory(inventoryGetData);
|
||||
|
||||
completedQuests = snapshot.GetValue<List<string>>("completedQuest");
|
||||
|
||||
//stats
|
||||
statManager.loadFromCloudSave(snapshot.GetValue<Dictionary<string, int>>("playerStats"));
|
||||
|
||||
|
||||
isLoaded = true;
|
||||
}else{
|
||||
|
||||
Reference in New Issue
Block a user