Exemplo n.º 1
0
        public void Refresh()
        {
            if (noteDetails.inverted != BeatMap.Inverted)
            {
                meshRenderer.enabled = false;
                InfoDisplay display = GetComponent <InfoDisplay>();
                if (display != null)
                {
                    display.gameObject.SetActive(false);
                }
            }
            else
            {
                meshRenderer.enabled = true;
                InfoDisplay display = GetComponent <InfoDisplay>();
                if (display != null)
                {
                    display.gameObject.SetActive(true);
                }
            }

            Material newMaterial = new Material(materials[BeatSaberJSONClass.
                                                          BSNote.GetBSaberCutDirection(noteDetails.slashDirection)]);
            Color newColor = GetNoteColor(noteDetails.color);

            newMaterial.color     = newColor;
            meshRenderer.material = newMaterial;
            InfoDisplay infoDisplay = GetComponentInChildren <InfoDisplay>();

            if (infoDisplay != null)
            {
                infoDisplay.Refresh();
            }
        }
Exemplo n.º 2
0
 private void Initialize()
 {
     infoDisplay = GetComponentInChildren <InfoDisplay>();
     if (infoDisplay == null)
     {
         Debug.LogError("InfoDisplay not present");
     }
     infoDisplay.SetText(beatNumber.ToString());
     textInitalized = true;
 }
Exemplo n.º 3
0
 private void Start()
 {
     infoDisplay = GetComponentInChildren <InfoDisplay>();
 }