Exemple #1
0
    void OnDataReceived(string data)
    {
        int health = UserAccountDataTranslator.DataToHealth(data);
        int attack = UserAccountDataTranslator.DataToAttack(data);

        int newhealth = player.health + health;
        int newattack = player.attack + attack;

        string newData = UserAccountDataTranslator.ValuesToData(newhealth, newattack);

        Debug.Log("Syncing: " + newData);



        DCF_DemoScene_ManagerScript_CSharp.instance.SendData(newData);
    }
 void OnReceivedData(string data)
 {
     HealthPower.text = "Health: " + UserAccountDataTranslator.DataToHealth(data).ToString();
     Attack.text      = "Attack: " + UserAccountDataTranslator.DataToAttack(data).ToString();
 }