コード例 #1
0
 public void ResetData()
 {
     PlayerData.instance.SetDefault();
     indicators.Apply();
     levelBar.Apply();
     states.CheckStatesAgain();
 }
コード例 #2
0
    public override void OnInspectorGUI()
    {
        base.OnInspectorGUI();
        LevelBarController controller = (LevelBarController)target;

        EditorGUILayout.BeginHorizontal();
        if (GUILayout.Button("Apply"))
        {
            controller.SetVariable(controller.m_experience);
            controller.Apply();
        }
        if (GUILayout.Button("Reset"))
        {
            PlayerData.instance.SetDefault();
            controller.Apply();
        }
        EditorGUILayout.EndHorizontal();
    }