コード例 #1
0
    /// <summary>
    /// Khởi tạo cho sự kiện hoặc quảng cáo
    /// </summary>
    public Announcement(int index, string description, Scene show, string gotoUrl, string imageUrl, Type type)
    {
        this.index       = index;
        this.description = description;
        this.url         = gotoUrl;
        this.type        = type;
        this.show        = show;
        this.imageUrl    = imageUrl;

        ServerWeb.GetImageFromUrl(imageUrl, "", delegate(UnityEngine.Texture texture) { _image = texture; });
    }
コード例 #2
0
 public void LoadTexture(CallBackDownloadImage callback)
 {
     if (_image != null)
     {
         callback(_image);
     }
     else
     {
         ServerWeb.GetImageFromUrl(imageUrl, "", delegate(UnityEngine.Texture texture)
         {
             _image = texture;
             callback(_image);
         });
     }
 }