using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Protect2 : MonoBehaviour
{
    private int hp;
    private int mp;
    private int attack;
    private int defence;

    public void ButtonWrite()
    {
        //データを設定
        hp = 100;
        mp = 10;
        attack = 20;
        defence = 15;
        
        //書き込み
        PlayerPrefs.SetInt("HP_A",hp);
        PlayerPrefs.SetInt("MP_A",mp);
        PlayerPrefs.SetInt("ATTACK_A",attack);
        PlayerPrefs.SetInt("DEFENCE_A",defence);
        PlayerPrefs.SetInt("HP_B",hp);
        PlayerPrefs.SetInt("MP_B",mp);
        PlayerPrefs.SetInt("ATTACK_B",attack);
        PlayerPrefs.SetInt("DEFENCE_B",defence);
    }
    
    public void ButtonDebug()
    {
        //データを設定
        hp = 1;
        mp = 1;
        attack = 1;
        defence = 1;
        
        //書き込み(片方のみ)
        PlayerPrefs.SetInt("HP_A",hp);
        PlayerPrefs.SetInt("MP_A",mp);
        PlayerPrefs.SetInt("ATTACK_A",attack);
        PlayerPrefs.SetInt("DEFENCE_A",defence);
        
        Debug.Log("デバッグ完了");
    }

    public void ButtonRead()
    {
        
    }
}
