Commit c11facf8 authored by 16이상민's avatar 16이상민

Modified judge counting logic

Modified deactivate logic
parent 0868bc71
...@@ -70,6 +70,8 @@ namespace JudgeModule ...@@ -70,6 +70,8 @@ namespace JudgeModule
judgeText.SetActive(true); judgeText.SetActive(true);
judgeText.GetComponent<Text>().text = judge.Name; judgeText.GetComponent<Text>().text = judge.Name;
judgeText.GetComponent<Text>().color = judge.Color; judgeText.GetComponent<Text>().color = judge.Color;
Debug.Log("SetJudge: " + AllSceneManager.TotalJudge);
} }
} }
} }
\ No newline at end of file
...@@ -146,7 +146,8 @@ namespace JudgeModule ...@@ -146,7 +146,8 @@ namespace JudgeModule
{ {
var controllers = enables[name].ToArray(); var controllers = enables[name].ToArray();
foreach (var c in controllers) foreach (var c in controllers)
if (initialPos.x - c.EndPosition(ScrollSpeed) > Judge.BAD.TimingRange(c.Instance)) if (!c.Instance.Activated &&
initialPos.x - c.StartPosition() > Judge.BAD.TimingRange(c.Instance))
{ {
NoteJudger.SetJudge(Judge.MISS, judgetext); NoteJudger.SetJudge(Judge.MISS, judgetext);
c.Deactivate(deactives.transform); c.Deactivate(deactives.transform);
...@@ -241,7 +242,11 @@ namespace JudgeModule ...@@ -241,7 +242,11 @@ namespace JudgeModule
controller.gameObject.SetActive(true); controller.gameObject.SetActive(true);
if (note.IsLong) if (note.IsLong)
{
note.TotalCount = (int)(note.Length / MsPerBeat);
StretchLongNote(controller); StretchLongNote(controller);
}
} }
private void StretchLongNote(Controller controller) private void StretchLongNote(Controller controller)
......
...@@ -88,7 +88,6 @@ LightmapSettings: ...@@ -88,7 +88,6 @@ LightmapSettings:
m_PVRFilteringAtrousPositionSigmaDirect: 0.5 m_PVRFilteringAtrousPositionSigmaDirect: 0.5
m_PVRFilteringAtrousPositionSigmaIndirect: 2 m_PVRFilteringAtrousPositionSigmaIndirect: 2
m_PVRFilteringAtrousPositionSigmaAO: 1 m_PVRFilteringAtrousPositionSigmaAO: 1
m_ShowResolutionOverlay: 1
m_LightingDataAsset: {fileID: 0} m_LightingDataAsset: {fileID: 0}
m_UseShadowmask: 1 m_UseShadowmask: 1
--- !u!196 &4 --- !u!196 &4
...@@ -137,7 +136,7 @@ RectTransform: ...@@ -137,7 +136,7 @@ RectTransform:
m_PrefabInternal: {fileID: 0} m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 36226165} m_GameObject: {fileID: 36226165}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: -1, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: [] m_Children: []
m_Father: {fileID: 785996772} m_Father: {fileID: 785996772}
...@@ -536,7 +535,7 @@ RectTransform: ...@@ -536,7 +535,7 @@ RectTransform:
m_PrefabInternal: {fileID: 0} m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 295245169} m_GameObject: {fileID: 295245169}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: -75, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: m_Children:
- {fileID: 1152155867} - {fileID: 1152155867}
...@@ -1624,8 +1623,8 @@ RectTransform: ...@@ -1624,8 +1623,8 @@ RectTransform:
m_PrefabInternal: {fileID: 0} m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 765048384} m_GameObject: {fileID: 765048384}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 523, y: 294, z: 0}
m_LocalScale: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: m_Children:
- {fileID: 1073141667} - {fileID: 1073141667}
- {fileID: 1173591428} - {fileID: 1173591428}
...@@ -1983,7 +1982,7 @@ RectTransform: ...@@ -1983,7 +1982,7 @@ RectTransform:
m_PrefabInternal: {fileID: 0} m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1073141666} m_GameObject: {fileID: 1073141666}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 294, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: m_Children:
- {fileID: 785996772} - {fileID: 785996772}
...@@ -2149,7 +2148,7 @@ RectTransform: ...@@ -2149,7 +2148,7 @@ RectTransform:
m_PrefabInternal: {fileID: 0} m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1152155866} m_GameObject: {fileID: 1152155866}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: -90, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: [] m_Children: []
m_Father: {fileID: 295245170} m_Father: {fileID: 295245170}
...@@ -2320,7 +2319,7 @@ RectTransform: ...@@ -2320,7 +2319,7 @@ RectTransform:
m_PrefabInternal: {fileID: 0} m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1173591427} m_GameObject: {fileID: 1173591427}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: -94, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: m_Children:
- {fileID: 1665813939} - {fileID: 1665813939}
...@@ -2516,7 +2515,6 @@ Camera: ...@@ -2516,7 +2515,6 @@ Camera:
m_TargetEye: 3 m_TargetEye: 3
m_HDR: 1 m_HDR: 1
m_AllowMSAA: 1 m_AllowMSAA: 1
m_AllowDynamicResolution: 0
m_ForceIntoRT: 0 m_ForceIntoRT: 0
m_OcclusionCulling: 1 m_OcclusionCulling: 1
m_StereoConvergence: 10 m_StereoConvergence: 10
...@@ -2621,7 +2619,7 @@ RectTransform: ...@@ -2621,7 +2619,7 @@ RectTransform:
m_PrefabInternal: {fileID: 0} m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1299260532} m_GameObject: {fileID: 1299260532}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: -151, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: [] m_Children: []
m_Father: {fileID: 785996772} m_Father: {fileID: 785996772}
...@@ -2949,7 +2947,7 @@ RectTransform: ...@@ -2949,7 +2947,7 @@ RectTransform:
m_PrefabInternal: {fileID: 0} m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1463464316} m_GameObject: {fileID: 1463464316}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: -486.5, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: [] m_Children: []
m_Father: {fileID: 295245170} m_Father: {fileID: 295245170}
...@@ -3225,7 +3223,7 @@ RectTransform: ...@@ -3225,7 +3223,7 @@ RectTransform:
m_PrefabInternal: {fileID: 0} m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1669651589} m_GameObject: {fileID: 1669651589}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 488.5, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: [] m_Children: []
m_Father: {fileID: 295245170} m_Father: {fileID: 295245170}
...@@ -3260,7 +3258,7 @@ RectTransform: ...@@ -3260,7 +3258,7 @@ RectTransform:
m_PrefabInternal: {fileID: 0} m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1681188542} m_GameObject: {fileID: 1681188542}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: -101, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: [] m_Children: []
m_Father: {fileID: 785996772} m_Father: {fileID: 785996772}
...@@ -3603,7 +3601,7 @@ RectTransform: ...@@ -3603,7 +3601,7 @@ RectTransform:
m_PrefabInternal: {fileID: 0} m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1852280156} m_GameObject: {fileID: 1852280156}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: -51, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: [] m_Children: []
m_Father: {fileID: 785996772} m_Father: {fileID: 785996772}
...@@ -3837,7 +3835,7 @@ RectTransform: ...@@ -3837,7 +3835,7 @@ RectTransform:
m_PrefabInternal: {fileID: 0} m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 2001722606} m_GameObject: {fileID: 2001722606}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: -1.5, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: m_Children:
- {fileID: 791052775} - {fileID: 791052775}
...@@ -3965,9 +3963,9 @@ MeshCollider: ...@@ -3965,9 +3963,9 @@ MeshCollider:
m_Material: {fileID: 0} m_Material: {fileID: 0}
m_IsTrigger: 0 m_IsTrigger: 0
m_Enabled: 1 m_Enabled: 1
serializedVersion: 3 serializedVersion: 2
m_Convex: 0 m_Convex: 0
m_CookingOptions: 14 m_InflateMesh: 0
m_SkinWidth: 0.01 m_SkinWidth: 0.01
m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0}
--- !u!33 &2093461956 --- !u!33 &2093461956
......
...@@ -17,6 +17,18 @@ public static class AllSceneManager ...@@ -17,6 +17,18 @@ public static class AllSceneManager
{ Judge.JudgeList[3], 0 }, { Judge.JudgeList[3], 0 },
}; };
public static int TotalJudge
{
get
{
int sum = 0;
foreach (var x in Judge.JudgeList)
sum += JudgeCount[x];
return sum;
}
}
public static int Combo public static int Combo
{ {
get get
......
using System.Collections.Generic; using JudgeModule;
using System.Collections.Generic;
using UnityEngine; using UnityEngine;
using UnityEngine.UI; using UnityEngine.UI;
...@@ -12,20 +13,6 @@ public class Controller : MonoBehaviour ...@@ -12,20 +13,6 @@ public class Controller : MonoBehaviour
private readonly float minAlpha = 0.3f; private readonly float minAlpha = 0.3f;
private readonly float maxAlpha = 0.7f; private readonly float maxAlpha = 0.7f;
// Update is called once per frame
void Update()
{
if (transform.parent.gameObject.name == "Deactives")
{
foreach (Image img in GetComponentsInChildren<Image>())
{
Color tmp = img.color;
tmp.a = 0f;
img.color = tmp + new Color(0, 0, 0, minAlpha);
}
}
}
public void Deactivate(Transform deactives) public void Deactivate(Transform deactives)
{ {
Instance.Activated = false; Instance.Activated = false;
...@@ -40,6 +27,13 @@ public class Controller : MonoBehaviour ...@@ -40,6 +27,13 @@ public class Controller : MonoBehaviour
transform.SetParent(deactives); transform.SetParent(deactives);
disables.Add(this); disables.Add(this);
enables.Remove(this); enables.Remove(this);
AllSceneManager.JudgeCount[Judge.MISS] +=
(Instance.TotalCount - Instance.JudgeCount);
if (Instance.IsLong)
++AllSceneManager.JudgeCount[Judge.MISS];
Debug.Log("Deactivate: " + AllSceneManager.TotalJudge);
} }
public float EndPosition(float ScrollSpeed) public float EndPosition(float ScrollSpeed)
...@@ -47,4 +41,9 @@ public class Controller : MonoBehaviour ...@@ -47,4 +41,9 @@ public class Controller : MonoBehaviour
return transform.position.x + return transform.position.x +
(Instance.EndTiming - Instance.StartTiming) * ScrollSpeed; (Instance.EndTiming - Instance.StartTiming) * ScrollSpeed;
} }
public float StartPosition()
{
return transform.position.x;
}
} }
\ No newline at end of file
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
public Controller Component = null; public Controller Component = null;
public int JudgeCount; public int JudgeCount;
public int TotalCount;
public float StartTiming { get; private set; } public float StartTiming { get; private set; }
public float EndTiming { get; private set; } public float EndTiming { get; private set; }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment