perf
This commit is contained in:
@@ -30,7 +30,7 @@ namespace Ichni.RhythmGame
|
||||
judgeHintImage = Object.Instantiate(GetHintImagePrefab(),
|
||||
GameManager.instance.judgeHintCanvas.transform).GetComponent<RectTransform>();
|
||||
}
|
||||
else if (judgeHintImage != null)
|
||||
else if (judgeHintImage is not null)
|
||||
{
|
||||
Object.Destroy(judgeHintImage.gameObject);
|
||||
}
|
||||
|
||||
@@ -40,9 +40,15 @@ namespace Ichni.RhythmGame
|
||||
|
||||
float distance = Vector2.Distance(inputScreenPosition, noteScreenPosition);
|
||||
|
||||
Debug.Log("Input Position: " + inputScreenPosition + ", Note Position: " + noteScreenPosition + ", Distance: " + distance);
|
||||
if (distance <= areaRadius * CurrentScreenRatio() * 0.5f)
|
||||
//Debug.Log("Input Position: " + inputScreenPosition + ", Note Position: " + noteScreenPosition + ", Distance: " + distance);
|
||||
|
||||
if (distance <= areaRadius * CurrentScreenRatio())
|
||||
{
|
||||
if (inputUnit is InputUnitSwipe swipe && note is Flick flick)
|
||||
{
|
||||
return flick.CheckSwipeDirection(swipe.swipeDirection);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user