private void Start() { if (text) { text.text = DecimalEncoder.encode(value, 20); } }
private void Start() { _mainCam.go.GetComponent <DecimalManager>().AddGuest(this.gameObject); value = _mainCam.go.GetComponent <DecimalManager>().GetNumber(); numberBase = _mainCam.go.GetComponent <DecimalManager>().GetBase(); _numberText.text = DecimalEncoder.encode(value, numberBase) + " (" + numberBase + ")"; }
public void UpdateUI() { if (!_selected.go) { _currentNumberInInventory.text = ""; } else { PickupBlock tempBlock = _selected.go.GetComponent <PickupBlock>(); if (tempBlock && tempBlock.value.ToString() != _currentNumberInInventory.text) { _currentNumberInInventory.text = tempBlock.value.ToString(); } } if (_currentNumber.value == 0 || _currentBase.value == 0) { _startingNumber.text = ""; } else { _startingNumber.text = "Current Conversion: " + DecimalEncoder.encode(_currentNumber.value, _currentBase.value) + " (" + _currentBase.value.ToString() + ")"; } }