public void Apply() { LaserPartData laserPartData = GetLaserPartFromUI(); _musicLevelSetup.musicLevel.GetBeat(_beatIndex).laser.SetLaserPart(laserPartData, _laserType); _musicLevelEditor.UpdateIndex(); }
public void Apply() { WallsData wallsData = GetWallsDataFromUI(); _musicLevelSetup.musicLevel.GetBeat(_beatIndex).walls = wallsData; _musicLevelEditor.UpdateIndex(); }
private void OnValueChanged(float value) { if (!_checkForChangedValue) { _checkForChangedValue = true; return; } int index = Mathf.RoundToInt(value); _musicLevelEditor.UpdateIndex(index); }
private void Update() { if (Input.GetKeyDown(KeyCode.C)) { LR_Beat beat = new LR_Beat { spawnLaser = true }; beat.laser.preLaser.radius = 5; beat.laser.preLaser.startColor = Color.green; beat.laser.hitLaser.radius = 5; beat.laser.hitLaser.startColor = Color.red; beat.laser.hitLaser.forceFactor = 2; beat.laser.hitLaser.forceDirection = LaserPartData.ForceDirections.backward; CreateNewLaser(beat, _currentIndex); } if (Input.GetKeyDown(KeyCode.Space) && _currentIndex >= _rhythmController.Level.BeatsBeforeLevelStarts) { if (_musicLevelEditor.enabled) { DestroyLasersAndUI(); GetComponent <RhythmController>().StartLevelAt(_currentIndex); _songController.AudioPlayer.PlayAudioAt(_rhythmController.SecondsPerBeat * 0.25f * (_currentIndex - _rhythmController.Level.BeatsBeforeLevelStarts)); _musicLevelEditor.enabled = false; } else { _musicLevelEditor.UpdateIndex(); GetComponent <RhythmController>().StopLevel(); _songController.AudioPlayer.Stop(); _musicLevelEditor.enabled = true; } } }
public virtual void Apply() { CM_Debug.Log("Beat Item UI", "Applying at " + this); musicLevelEditor.UpdateIndex(); }