1
This commit is contained in:
@@ -83,6 +83,14 @@ namespace BITKit.SceneManagement
|
||||
|
||||
public class SceneService : MonoBehaviour,ISceneService
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
[UnityEditor.MenuItem("Tools/Scenes/Toggle Scene Service Once")]
|
||||
public static void ToggleSceneServiceOnce()
|
||||
{
|
||||
AllowInitialize = !AllowInitialize;
|
||||
Debug.Log("允许初始化场景设置为:"+AllowInitialize);
|
||||
}
|
||||
#endif
|
||||
[BITCommand]
|
||||
public static async void Map(string mapName)
|
||||
{
|
||||
|
@@ -174,7 +174,8 @@ namespace BITKit.UX
|
||||
//Debug.Log($"min:{min} max:{max} difference:{difference} max:{max}");
|
||||
|
||||
_dataContainer.Clear();
|
||||
for (var i = 0; i <= maxLength; i++)
|
||||
_dataContainer.style.justifyContent = Justify.SpaceAround;
|
||||
for (var i = 0; i <= 4; i++)
|
||||
{
|
||||
var label = _dataContainer.Create<Label>();
|
||||
|
||||
@@ -183,6 +184,9 @@ namespace BITKit.UX
|
||||
var t = (float)i / maxLength;
|
||||
var value = Mathf.Lerp(min, max, t);
|
||||
label.text = Math.Round(value, 2).ToString();
|
||||
|
||||
label.style.marginBottom = label.style.marginLeft = label.style.marginRight = label.style.marginTop = 0;
|
||||
label.style.paddingBottom = label.style.paddingLeft = label.style.paddingRight = label.style.paddingTop = 0;
|
||||
}
|
||||
MarkDirtyRepaint();
|
||||
}
|
@@ -78,6 +78,10 @@ namespace BITKit.UX
|
||||
|
||||
RootVisualElement.SetActive(false);
|
||||
|
||||
OnInitiated?.Invoke();
|
||||
|
||||
await OnInitiatedAsync.UniTaskFunc();
|
||||
|
||||
WaitUtilInitialized.TrySetResult();
|
||||
}
|
||||
}
|
||||
@@ -195,6 +199,8 @@ namespace BITKit.UX
|
||||
public event Action OnExit;
|
||||
public event Func<UniTask> OnExitAsync;
|
||||
public event Action OnExitCompleted;
|
||||
public event Action OnInitiated;
|
||||
public event Func<UniTask> OnInitiatedAsync;
|
||||
|
||||
public virtual void OnTick(float deltaTime)
|
||||
{
|
||||
|
Reference in New Issue
Block a user