chore: initial commit
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
|
||||
namespace MoreMountains.Tools
|
||||
{
|
||||
[CustomEditor(typeof(MMAchievementList),true)]
|
||||
/// <summary>
|
||||
/// Custom inspector for the MMAchievementList scriptable object.
|
||||
/// </summary>
|
||||
public class MMAchievementListInspector : Editor
|
||||
{
|
||||
/// <summary>
|
||||
/// When drawing the GUI, adds a "Reset Achievements" button, that does exactly what you think it does.
|
||||
/// </summary>
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
DrawDefaultInspector ();
|
||||
MMAchievementList achievementList = (MMAchievementList)target;
|
||||
if(GUILayout.Button("Reset Achievements"))
|
||||
{
|
||||
achievementList.ResetAchievements();
|
||||
}
|
||||
EditorUtility.SetDirty (achievementList);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 70d3db55e641fa4428b605f636e0015b
|
||||
timeCreated: 1480263802
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,19 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using MoreMountains.Tools;
|
||||
using UnityEditor;
|
||||
|
||||
namespace MoreMountains.Tools
|
||||
{
|
||||
public static class MMAchievementMenu
|
||||
{
|
||||
[MenuItem("Tools/More Mountains/Reset all achievements", false,21)]
|
||||
/// <summary>
|
||||
/// Adds a menu item to enable help
|
||||
/// </summary>
|
||||
private static void EnableHelpInInspectors()
|
||||
{
|
||||
MMAchievementManager.ResetAllAchievements ();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a1d53c42aa1029048b98580478952105
|
||||
timeCreated: 1482318762
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user