Exemplo n.º 1
0
 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;
 }
Exemplo n.º 3
0
 Texture FindGuiSpriteTexture()
 {
     return((GuiSprite == null) ? null : GuiSprite.GetTextureSegment());
 }
Exemplo n.º 4
0
 public void Start()
 {
     _sprite = new GuiSprite("Test/Pic/Avatar", 91,116);
 }