// Start is called before the first frame update void Start() { // Set up initial materials foreach (GameObject segment in Segments) { SevenSegmentHelper.InitializeSegment(segment, SegmentOnMaterial, SegmentOffMaterial); } }
// Start is called before the first frame update void Start() { // Set up initial materials foreach (GameObject segment in Segments) { SevenSegmentHelper.InitializeSegment(segment, SegmentOnMaterial, SegmentOnMaterial); } // Set up events to the VR interactive button var buttonScript = gameObject.GetComponent <BaseButton>(); buttonScript.OnActivatedEvent += ButtonScript_OnActivatedEvent; buttonScript.OnDectivatedEvent += ButtonScript_OnDectivatedEvent; buttonScript.OnInteractEvent += ButtonScript_OnInteractEvent; buttonScript.OnUnInteractEvent += ButtonScript_OnUnInteractEvent; active = buttonScript.m_active; // Update display so it starts at 00:00 UpdateSegmentDisplay(0); }