Exemple #1
0
    private IEnumerator WaitForInitialisation()
    {
        yield return(WaitFor.EndOfFrame);

        Initialised = true;
        if (spriteData == null)
        {
            spriteData = new SpriteData();
        }
        if (spriteRenderer != null && SetSpriteOnStartUp && spriteData.HasSprite())
        {
            PushTexture();
        }
    }
    private IEnumerator WaitForInitialisation()
    {
        yield return(WaitFor.EndOfFrame);

        Initialised = true;
        GetImageComponent();
        if (spriteData == null)
        {
            spriteData = new SpriteData();
        }
        if (HasImageComponent() && SetSpriteOnStartUp && spriteData.HasSprite())
        {
            PushTexture();
        }
    }
    private void TryInit()
    {
        ImageComponentStatus(false);
        Initialised = true;
        GetImageComponent();
        if (spriteData == null)
        {
            spriteData = new SpriteData();
        }

        if (HasImageComponent() && SetSpriteOnStartUp && spriteData.HasSprite())
        {
            PushTexture();
        }

        ImageComponentStatus(true);
    }
Exemple #4
0
 public bool HasSprite(SpriteEnum _spriteEnum)
 {
     return(spriteData.HasSprite(_spriteEnum));
 }