protected virtual void OnButtonDown(HVRButton button) { var keyPadButton = button as KeyPadButton; if (keyPadButton.Key == '<') { Entry = Entry.Substring(0, Entry.Length - 1); } else if (keyPadButton.Key == '+') { if (Code == Entry) { if (!_unlocked) { Unlocked.Invoke(); } _unlocked = true; } } else if (Index >= 0 && Index < MaxLength) { Entry += keyPadButton.Key; } if (Display) { Display.text = Entry.PadLeft(6, '*'); } }
protected void OnEnable() { SP_StartPosition = serializedObject.FindProperty("StartPosition"); SP_Threshold = serializedObject.FindProperty("Threshold"); SP_UpThreshold = serializedObject.FindProperty("UpThreshold"); Button = target as HVRButton; }