void Judge() { foreach (var sr in GetComponentsInChildren <SpriteRenderer> ()) { sr.enabled = false; } GameObject pf = Instantiate(Resources.Load <GameObject> ("EffectPerfect")); Vector3 v; switch (mData.Direction) { case 0: v = transform.position; v.y = -0.52f; pf.transform.position = v; break; case -1: case 1: v = transform.position; v.x = 2.79f * mData.Direction; pf.transform.position = v; break; } pf.transform.rotation = Quaternion.Euler(transform.rotation.eulerAngles); Vector3 pls = transform.localScale; pls.y = 1; pls.x = 1.25f * ParamCalculator.VanillaWidthToScaleX(mData.Width) * 0.5f * (mData.Direction != 0 ? 9f / 16f * 0.8f : 1f); pf.transform.localScale = pls; Judged = true; }
void INoteScaling.NoteChanged(float position, float width, int direction) { Vector3 t; t = transform.localScale; t.x = ParamCalculator.VanillaWidthToScaleX(width) * 0.5f * (direction != 0 ? 9f / 16f : 1f); transform.localScale = t; }
void INoteScaling.NoteChanged(float position, float width, int direction) { Vector3 t; t = Left.localScale; t.x = ParamCalculator.VanillaWidthToScaleX(width) * 50f / 29f - 21f / 29f; Left.localScale = t; Right.localScale = t; t = Left.localPosition; t.x = -0.445f - 0.22f * Left.localScale.x; Left.localPosition = t; t = Right.localPosition; t.x = 0.445f + 0.22f * Right.localScale.x; Right.localPosition = t; t = transform.localScale; t.x = t.y = 0.57f * (direction != 0 ? 9f / 16f * 0.8f : 1f); transform.localScale = t; }