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

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

    public void ButtonWrite()
    {
        //データを設定
        hp = 100;
        mp = 10;
        attack = 20;
        defence = 15;
        keyword = 123456789;
        
        //書き込み
        PlayerPrefs.SetInt("HP",hp);
        PlayerPrefs.SetInt("MP",mp);
        PlayerPrefs.SetInt("ATTACK",attack);
        PlayerPrefs.SetInt("DEFENCE",defence);
        PlayerPrefs.SetInt("KEYWORD",keyword);

        Debug.Log("書き込み完了");
    }

    public void ButtonDebug()
    {
        //キーワードだけ、正常値ではない値にする
        keyword = 0;
        PlayerPrefs.SetInt("KEYWORD",keyword);
        
        Debug.Log("デバッグ完了");
    }

    public void ButtonRead()
    {

    }
}
