点击选中
This commit is contained in:
@@ -3,6 +3,7 @@ using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Ichni.RhythmGame;
|
||||
using Ichni.RhythmGame.Beatmap;
|
||||
using Lean.Pool;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Ichni.Editor
|
||||
@@ -19,11 +20,14 @@ namespace Ichni.Editor
|
||||
public bool xPlaneEnabled;
|
||||
public bool zPlaneEnabled;
|
||||
|
||||
public bool isYPlaneShowingPositionText;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
yPlaneEnabled = true;
|
||||
xPlaneEnabled = false;
|
||||
zPlaneEnabled = false;
|
||||
isYPlaneShowingPositionText = true;
|
||||
RefreshPlanes();
|
||||
}
|
||||
|
||||
@@ -38,11 +42,15 @@ namespace Ichni.Editor
|
||||
var yPlaneToggle =
|
||||
inspector.GenerateToggle(this, gridSettings, "Y Plane", nameof(yPlaneEnabled))
|
||||
.AddListenerFunction(RefreshPlanes);
|
||||
var xPlaneToggle =
|
||||
inspector.GenerateToggle(this, gridSettings, "X Plane", nameof(xPlaneEnabled))
|
||||
.AddListenerFunction(RefreshPlanes);
|
||||
var zPlaneToggle =
|
||||
inspector.GenerateToggle(this, gridSettings, "Z Plane", nameof(zPlaneEnabled))
|
||||
.AddListenerFunction(RefreshPlanes);
|
||||
var xPlaneToggle =
|
||||
inspector.GenerateToggle(this, gridSettings, "X Plane", nameof(xPlaneEnabled))
|
||||
|
||||
var yPlaneShowPositionToggle =
|
||||
inspector.GenerateToggle(this, gridSettings, "Show Y Plane Position", nameof(isYPlaneShowingPositionText))
|
||||
.AddListenerFunction(RefreshPlanes);
|
||||
}
|
||||
|
||||
@@ -51,6 +59,17 @@ namespace Ichni.Editor
|
||||
yPlaneGrid.gameObject.SetActive(yPlaneEnabled);
|
||||
xPlaneGrid.gameObject.SetActive(xPlaneEnabled);
|
||||
zPlaneGrid.gameObject.SetActive(zPlaneEnabled);
|
||||
yPlaneGrid.isShowingPositionText = isYPlaneShowingPositionText;
|
||||
|
||||
if (!yPlaneGrid.isShowingPositionText)
|
||||
{
|
||||
foreach (KeyValuePair<GameObject, Vector3> positionText in yPlaneGrid.positionTexts)
|
||||
{
|
||||
LeanPool.Despawn(positionText.Key);
|
||||
}
|
||||
|
||||
yPlaneGrid.positionTexts.Clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user