Example #1
0
        private void Update()
        {
            float yPos = (float)(position - BeatManager.Instance.Position) * BeatManager.Instance.GameSpeed;

            this.transform.localPosition = new Vector3(0.0f, yPos, 0.0f);


            if (BeatManager.GetBarDifference(bar, 0.0f, BeatManager.Instance.Bar, BeatManager.Instance.Beat) <= 0.0f)
            {
                Destroy(this.gameObject);
            }
        }
Example #2
0
        private void Update()
        {
            notePos.x = ((float)((lineNumber % 4) * 2 + 1) / 8.0f - 0.5f) * GlobalDefines.RailWidth;
            notePos.y = (float)(position - BeatManager.Instance.Position) * BeatManager.Instance.GameSpeed;
            this.transform.localPosition = notePos;

            float correction = noteDefaultScale.y * (targetBPM / 60.0f - 1.0f) * (BeatManager.Instance.GameSpeed - 1.0f) * 0.15f;

            noteScale.y = Mathf.Clamp(noteDefaultScale.y + correction * 0.33f, 0.2f, 10.0f);
            this.transform.localScale = noteScale;

            if (BeatManager.GetBarDifference(bar, beat, BeatManager.Instance.Bar, BeatManager.Instance.Beat) <= 0.0f)
            {
                Destroy(this.gameObject);
            }
        }