void OnLocalize() { if (_sprite == null) { _sprite = GetComponent<GuiSprite> (); } if (!string.IsNullOrEmpty (_token)) { _sprite.SpriteName = Localizer.Get (_token); } }
protected override void OnInit() { if (Target == null) { Target = GetComponent<GuiSprite> (); } if (Target == null) { Destroy (this); return; } ResetNames (); _nextFrameTime = -1f; _frameTime = _filteredNames.Count > 0 ? 0.5f / (float) _filteredNames.Count : 0f; }