保存读取trigger状态
This commit is contained in:
parent
b0d1ac0edd
commit
0b6a393e81
|
@ -75,4 +75,22 @@ public class Check_JieXian : PermanentTriggerBase
|
||||||
base.CallScoreAction(true);
|
base.CallScoreAction(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ¶ÏÏßÖØÁ¬
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
/// <exception cref="System.NotImplementedException"></exception>
|
||||||
|
public override string SaveCurrentTriggerStat()
|
||||||
|
{
|
||||||
|
return isChecked.ToString();
|
||||||
|
//throw new System.NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void LoadCurrentTriggerStat(string triggerInfo)
|
||||||
|
{
|
||||||
|
if (triggerInfo != "")
|
||||||
|
isChecked = bool.Parse(triggerInfo);
|
||||||
|
//throw new System.NotImplementedException();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,6 +16,7 @@ public class DeviceTrigger : PermanentTriggerBase
|
||||||
/// 点击回调
|
/// 点击回调
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Action clickAction;
|
public Action clickAction;
|
||||||
|
|
||||||
protected override void OnMDown()
|
protected override void OnMDown()
|
||||||
{
|
{
|
||||||
base.OnMDown();
|
base.OnMDown();
|
||||||
|
@ -39,4 +40,20 @@ public class DeviceTrigger : PermanentTriggerBase
|
||||||
_highlight.SetHighlighted(false);
|
_highlight.SetHighlighted(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ²»ÐèÒª
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="triggerInfo"></param>
|
||||||
|
/// <exception cref="NotImplementedException"></exception>
|
||||||
|
public override void LoadCurrentTriggerStat(string triggerInfo)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override string SaveCurrentTriggerStat()
|
||||||
|
{
|
||||||
|
return "";
|
||||||
|
//throw new NotImplementedException();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
using DG.Tweening;
|
using DG.Tweening;
|
||||||
|
using Newtonsoft.Json;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Unity.VisualScripting.Antlr3.Runtime;
|
using Unity.VisualScripting.Antlr3.Runtime;
|
||||||
|
using UnityEditor.ShaderGraph.Serialization;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -202,4 +204,30 @@ public class Device_Cover : Device_Base
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class tmp_DC
|
||||||
|
{
|
||||||
|
public bool isOpen;
|
||||||
|
public bool isCheckOK;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ¶ÏÏßÖØÁ¬
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
/// <exception cref="System.NotImplementedException"></exception>
|
||||||
|
public override string SaveCurrentTriggerStat()
|
||||||
|
{
|
||||||
|
tmp_DC tmp = new tmp_DC();
|
||||||
|
tmp.isOpen = isOpen;
|
||||||
|
tmp.isCheckOK = isCheckOK;
|
||||||
|
string info = JsonConvert.SerializeObject(tmp);
|
||||||
|
return info;
|
||||||
|
//throw new System.NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void LoadCurrentTriggerStat(string triggerInfo)
|
||||||
|
{
|
||||||
|
//throw new System.NotImplementedException();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -101,4 +101,20 @@ public class Tool_Base : PermanentTriggerBase
|
||||||
back?.Invoke();
|
back?.Invoke();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ²»ÐèÒª
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
/// <exception cref="NotImplementedException"></exception>
|
||||||
|
public override string SaveCurrentTriggerStat()
|
||||||
|
{
|
||||||
|
return "";
|
||||||
|
//throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void LoadCurrentTriggerStat(string triggerInfo)
|
||||||
|
{
|
||||||
|
//throw new NotImplementedException();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue