Improved inputs (A SHIT MORE DYNAMIC BETWEEN GAMES) and a whole lot cleaner code in general

This commit is contained in:
Braedon
2022-01-17 00:00:26 -05:00
parent e735f1ccaf
commit 6a05f31506
16 changed files with 405 additions and 774 deletions

View File

@ -29,6 +29,9 @@ namespace RhythmHeavenMania.Editor
{
tempoLayer.GetComponent<Image>().color = theme.properties.TempoLayerCol.Hex2RGB();
musicLayer.GetComponent<Image>().color = theme.properties.MusicLayerCol.Hex2RGB();
Tooltip.instance.AddTooltip(tempoLayer.gameObject, $"Tempo Track");
Tooltip.instance.AddTooltip(musicLayer.gameObject, $"Music Volume Track");
layer.gameObject.SetActive(false);
@ -36,7 +39,7 @@ namespace RhythmHeavenMania.Editor
{
GameObject layer = Instantiate(this.layer.gameObject, this.layer.transform.parent);
layer.SetActive(true);
layer.transform.GetChild(0).GetComponent<TMP_Text>().text = $"Layer {i + 1}";
layer.transform.GetChild(0).GetComponent<TMP_Text>().text = $"Track {i + 1}";
Color c = Color.white;
@ -57,6 +60,7 @@ namespace RhythmHeavenMania.Editor
}
layer.GetComponent<Image>().color = c;
Tooltip.instance.AddTooltip(layer, $"Track {i + 1}");
}
Destroy(layer);
}

View File

@ -130,7 +130,6 @@ namespace RhythmHeavenMania.Editor
}
if (Input.GetMouseButton(1) && !Conductor.instance.isPlaying && CheckIfMouseInTimeline())
{
RectTransformUtility.ScreenPointToLocalPointInRectangle(TimelineContent, Input.mousePosition, Editor.instance.EditorCamera, out lastMousePos);
@ -244,27 +243,33 @@ namespace RhythmHeavenMania.Editor
if (playEnabled)
{
PlayBTN.transform.GetChild(0).GetComponent<Image>().color = Color.green;
PlayBTN.enabled = true;
}
else
{
PlayBTN.transform.GetChild(0).GetComponent<Image>().color = Color.gray;
PlayBTN.enabled = false;
}
if (pauseEnabled)
{
PauseBTN.enabled = true;
PauseBTN.transform.GetChild(0).GetComponent<Image>().color = Color.blue;
}
else
{ PauseBTN.transform.GetChild(0).GetComponent<Image>().color = Color.gray;
PauseBTN.enabled = false;
}
if (stopEnabled)
{
StopBTN.enabled = true;
StopBTN.transform.GetChild(0).GetComponent<Image>().color = Color.red;
}
else
{
StopBTN.transform.GetChild(0).GetComponent<Image>().color = Color.gray;
StopBTN.enabled = false;
}
}
#endregion