void Start() { Provider.Store.Subscribe(state => { Mode.ModeEnum nextMode = Mode.ModeGet(state); if (nextMode == _mode) { return; } _mode = nextMode; _text.text = _mode.ToString(); }); }
private void Awake() { _text = GetComponent <Text>(); _text.text = _mode.ToString(); }