protected override void UpdateContainerData(BeatmapObjectContainer con, BeatmapObject obj) { BeatmapObstacleContainer obstacle = con as BeatmapObstacleContainer; if (!obstacle.IsRotatedByNoodleExtensions) { Track track = tracksManager.GetTrackAtTime(obj._time); track.AttachContainer(con); } foreach (Material mat in obstacle.ModelMaterials) { mat.SetFloat("_CircleRadius", EditorScaleController.EditorScale * 2); if (!mat.HasProperty("_OutsideAlpha")) { continue; } if (AudioTimeSyncController.IsPlaying) { mat.SetFloat("_OutsideAlpha", 0); } else { mat.SetFloat("_OutsideAlpha", mat.GetFloat("_MainAlpha")); } } obstacleAppearanceSO.SetObstacleAppearance(obstacle); }
private void Update360Tracks() { if (!AssignTo360Tracks) { return; } TracksManager manager = objectContainerCollection.GetComponent <TracksManager>(); if (manager == null) { Debug.LogWarning("Could not find an attached TracksManager."); } else { Track track = manager.GetTrackAtTime(RoundedTime); if (track != null) { Vector3 localPos = instantiatedContainer.transform.localPosition; parentTrack = track.ObjectParentTransform; instantiatedContainer.transform.SetParent(track.ObjectParentTransform, false); instantiatedContainer.transform.localPosition = localPos; instantiatedContainer.transform.localEulerAngles = new Vector3(instantiatedContainer.transform.localEulerAngles.x, 0, instantiatedContainer.transform.localEulerAngles.z); } } }
protected override void UpdateContainerData(BeatmapObjectContainer con, BeatmapObject obj) { BeatmapNoteContainer note = con as BeatmapNoteContainer; BeatmapNote noteData = obj as BeatmapNote; note.SetBomb(noteData._type == BeatmapNote.NOTE_TYPE_BOMB); noteAppearanceSO.SetNoteAppearance(note); note.Setup(); note.transform.localEulerAngles = BeatmapNoteContainer.Directionalize(noteData); Track track = tracksManager.GetTrackAtTime(obj._time); track.AttachContainer(con); foreach (Material mat in con.ModelMaterials) { allNoteRenderers.Add(mat); mat.SetFloat("_Rotation", track.RotationValue.y); } }