DTM主题包 Stay

This commit is contained in:
SoulliesOfficial
2025-03-13 13:49:27 -04:00
parent f9f4a37a79
commit ac2259e813
39 changed files with 75469 additions and 5105 deletions

View File

@@ -115,8 +115,11 @@ namespace Ichni.RhythmGame
noteVisual.effectSubmodule.effectCollection["Miss"].ForEach(e => e.UpdateEffect(exactJudgeTime));
break;
}
noteScreenPosition = EditorManager.instance.cameraManager.gameCamera.camera.WorldToScreenPoint(noteVisual.transform.position);
if (EditorManager.instance.cameraManager.haveGameCamera)
{
noteScreenPosition = EditorManager.instance.cameraManager.gameCamera.camera.WorldToScreenPoint(noteVisual.transform.position);
}
}
}

View File

@@ -2,6 +2,7 @@ using System;
using System.Collections;
using System.Collections.Generic;
using Dreamteck.Splines;
using Ichni.Editor;
using Ichni.RhythmGame.Beatmap;
using Lean.Pool;
using Unity.VisualScripting;
@@ -14,7 +15,7 @@ namespace Ichni.RhythmGame
public static Stay GenerateElement(string elementName, Guid id, List<string> tags, bool isFirstGenerated,
GameElement parentElement, float exactJudgeTime)
{
Stay stay = Instantiate(EditorManager.instance.basePrefabs.tapNote, parentElement.transform).GetComponent<Stay>();
Stay stay = Instantiate(EditorManager.instance.basePrefabs.stayNote, parentElement.transform).GetComponent<Stay>();
stay.Initialize(elementName, id, tags, isFirstGenerated, parentElement);
stay.exactJudgeTime = exactJudgeTime;
@@ -49,6 +50,18 @@ namespace Ichni.RhythmGame
{
matchedBM = new Stay_BM(elementName, elementGuid, tags, parentElement.matchedBM as GameElement_BM, exactJudgeTime);
}
public override void SetUpInspector()
{
base.SetUpInspector();
IHaveInspection inspector = EditorManager.instance.uiManager.inspector;
var container = inspector.GenerateContainer("Generate");
var generateNoteVisualButton = inspector.GenerateButton(this, container, "Generate Note Visual", () =>
{
TemporaryObject.GenerateElement("New Note Visual", Guid.NewGuid(), new List<string>(), true, this);
});
}
}
namespace Beatmap
@@ -63,12 +76,13 @@ namespace Ichni.RhythmGame
public Stay_BM(string elementName, Guid elementGuid, List<string> tags, GameElement_BM attachedElement, float exactJudgeTime)
: base(elementName, elementGuid, tags, attachedElement, exactJudgeTime)
{
this.exactJudgeTime = exactJudgeTime;
}
public override void ExecuteBM()
{
matchedElement = Stay.GenerateElement(elementName, elementGuid, tags, false, GetElement(attachedElementGuid), exactJudgeTime);
matchedElement = Stay.GenerateElement(elementName, elementGuid, tags, false,
GetElement(attachedElementGuid), exactJudgeTime);
}
public override GameElement DuplicateBM(GameElement parent)

View File

@@ -74,8 +74,7 @@ namespace Ichni.RhythmGame
}
public Tap_BM(string elementName, Guid elementGuid, List<string> tags,
GameElement_BM attachedElement, float exactJudgeTime)
public Tap_BM(string elementName, Guid elementGuid, List<string> tags, GameElement_BM attachedElement, float exactJudgeTime)
: base(elementName, elementGuid, tags, attachedElement, exactJudgeTime)
{