public override void HandleNoteWasMissed(NoteController noteController)
        {
            if (noteController.hide)
            {
                return;
            }
            if (noteController.noteData.time + 0.5f < _audioTimeSyncController.songTime)
            {
                return;
            }
            if (noteController.noteData.colorType == ColorType.None)
            {
                return;
            }

            Vector3    position      = noteController.noteTransform.position;
            Quaternion worldRotation = noteController.worldRotation;

            position   = noteController.inverseWorldRotation * position;
            position.x = Mathf.Sign(position.x);
            position.z = _spawnPosZ;
            position   = worldRotation * position;

            _flyingTextSpawner.SpawnText(position, noteController.worldRotation, noteController.inverseWorldRotation, Localization.Get("FLYING_TEXT_MISS"));
        }
Пример #2
0
        private void SpawnText(string text, float duration)
        {
            // Little hack to spawn text for a chosen duration in seconds:
            // Save the initial float _duration field to a variable,
            // then set it to the chosen duration, call SpawnText, and restore the
            // previously saved duration.
            float initialDuration = GetTextSpawnerDuration(textSpawner);

            SetTextSpawnerDuration(textSpawner, duration);
            textSpawner.SpawnText(new Vector3(0, 4, 0), Quaternion.identity, Quaternion.identity, text);
            SetTextSpawnerDuration(textSpawner, initialDuration);
        }
Пример #3
0
        private void SpawnText(string text, float duration)
        {
            // Little hack to spawn text for a chosen duration in seconds:
            // Save the initial float _duration field to a variable,
            // then set it to the chosen duration, call SpawnText, and restore the
            // previously saved duration.
            object initialDuration = DurationField.GetValue(textSpawner);

            DurationField.SetValue(textSpawner, duration);
            textSpawner.SpawnText(new Vector3(0, 4, 0), text);
            DurationField.SetValue(textSpawner, initialDuration);
        }
Пример #4
0
        public void SpawnText(string text, float duration)
        {
            if (!textSpawner)
            {
                return;
            }
            Vector3 position        = new Vector3(0, 10, 0);
            float   initialDuration = textSpawner.GetField <float, FlyingTextSpawner>("_duration");

            textSpawner.SetField("_duration", duration);
            textSpawner.SpawnText(position, worldRotation, inverseWorldRotation, text);
            textSpawner.SetField("_duration", initialDuration);
        }
Пример #5
0
        private void SpawnText(string text, float duration)
        {
            // Little hack to spawn text for a chosen duration in seconds:
            // Save the initial float _duration field to a variable,
            // then set it to the chosen duration, call SpawnText, and restore the
            // previously saved duration.
            //    textSpawner.InitAndPresent(text, duration, new Vector3(0, 4, 0), Color.red, 6f, true);
            float initialDuration = textSpawner.GetField <float>("_duration");

            textSpawner.SetField("_duration", duration);
            textSpawner.SpawnText(Settings.Position, text);
            textSpawner.SetField("_duration", initialDuration);
        }