public TweenData_Material_ColorProperty(Material inMaterial, int inProperty, Color inTarget, ColorUpdate inUpdate) { m_Material = inMaterial; m_Property = inProperty; m_Target = inTarget; m_Update = inUpdate; }
public TweenData_Material_GradientProperty(Material inMaterial, int inProperty, Gradient inTarget, ColorUpdate inUpdate) { m_Material = inMaterial; m_Property = inProperty; m_Gradient = inTarget; m_Update = inUpdate; }
/// <param name='operations'> /// Reference to the ZtherApiIntegration.API.IColors. /// </param> /// <param name='model'> /// Required. /// </param> public static string UpdateAsync(this IColors operations, ColorUpdate model) { return(Task.Factory.StartNew((object s) => { return ((IColors)s).UpdateAsyncAsync(model); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
static public void SetColor(this TextMesh inRenderer, Color inColor, ColorUpdate inUpdateMode = ColorUpdate.PreserveAlpha) { Color src = inColor; if (inUpdateMode == ColorUpdate.PreserveAlpha) { src.a = inRenderer.color.a; } inRenderer.color = src; }
/// <summary> /// Fades the TextMesh to another color over time. /// </summary> static public Tween ColorTo(this TextMesh inRenderer, Color inTarget, TweenSettings inSettings, ColorUpdate inUpdate = ColorUpdate.PreserveAlpha) { return(Tween.Create(new TweenData_TextMesh_Color(inRenderer, inTarget, inUpdate), inSettings)); }
public TweenData_TextMesh_Gradient(TextMesh inRenderer, Gradient inTarget, ColorUpdate inUpdate) { m_Renderer = inRenderer; m_Gradient = inTarget; m_Update = inUpdate; }
public TweenData_TextMesh_Color(TextMesh inRenderer, Color inTarget, ColorUpdate inUpdate) { m_Renderer = inRenderer; m_Target = inTarget; m_Update = inUpdate; }
/// <summary> /// Applies a gradient of colors to the SpriteRenderer over time. /// </summary> static public Tween Gradient(this SpriteRenderer inRenderer, Gradient inGradient, float inTime, ColorUpdate inUpdate = ColorUpdate.PreserveAlpha) { return(Tween.Create(new TweenData_SpriteRenderer_Gradient(inRenderer, inGradient, inUpdate), inTime)); }
/// <summary> /// Fades the SpriteRenderer to another color over time. /// </summary> static public Tween ColorTo(this SpriteRenderer inRenderer, Color inTarget, float inTime, ColorUpdate inUpdate = ColorUpdate.PreserveAlpha) { return(Tween.Create(new TweenData_SpriteRenderer_Color(inRenderer, inTarget, inUpdate), inTime)); }
public TweenData_Graphic_Color(Graphic inRenderer, Color inTarget, ColorUpdate inUpdate) { m_Renderer = inRenderer; m_Target = inTarget; m_Update = inUpdate; }
/// <param name='operations'> /// Reference to the ZtherApiIntegration.API.IColors. /// </param> /// <param name='model'> /// Required. /// </param> /// <param name='cancellationToken'> /// Cancellation token. /// </param> public static async Task <string> UpdateAsyncAsync(this IColors operations, ColorUpdate model, CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Microsoft.Rest.HttpOperationResponse <string> result = await operations.UpdateAsyncWithOperationResponseAsync(model, cancellationToken).ConfigureAwait(false); return(result.Body); }
public TweenData_Value_Color(Color inStart, Color inEnd, Action <Color> inSetter, ColorUpdate inUpdate) : base(inStart, inEnd, inSetter) { m_Update = inUpdate; }
public TweenData_Material_Gradient(Material inMaterial, Gradient inTarget, ColorUpdate inUpdate) { m_Material = inMaterial; m_Gradient = inTarget; m_Update = inUpdate; }
/// <summary> /// Applies a gradient of colors to the TextMesh over time. /// </summary> static public Tween Gradient(this TextMesh inRenderer, Gradient inGradient, TweenSettings inSettings, ColorUpdate inUpdate = ColorUpdate.PreserveAlpha) { return(Tween.Create(new TweenData_TextMesh_Gradient(inRenderer, inGradient, inUpdate), inSettings)); }
/// <summary> /// Fades a Material color property to another color over time /// </summary> static public Tween ColorTo(this Material inMaterial, int inPropertyID, Color inTarget, TweenSettings inSettings, ColorUpdate inUpdate = ColorUpdate.PreserveAlpha) { return(Tween.Create(new TweenData_Material_ColorProperty(inMaterial, inPropertyID, inTarget, inUpdate), inSettings)); }
/// <summary> /// Fades the Material to another color over time. /// </summary> static public Tween ColorTo(this Material inMaterial, Color inTarget, float inTime, ColorUpdate inUpdate = ColorUpdate.PreserveAlpha) { return(Tween.Create(new TweenData_Material_Color(inMaterial, inTarget, inUpdate), inTime)); }
public TweenData_Graphic_Gradient(Graphic inRenderer, Gradient inTarget, ColorUpdate inUpdate) { m_Renderer = inRenderer; m_Gradient = inTarget; m_Update = inUpdate; }
public TweenData_Material_Color(Material inMaterial, Color inTarget, ColorUpdate inUpdate) { m_Material = inMaterial; m_Target = inTarget; m_Update = inUpdate; }
public TweenData_CanvasRenderer_Color(CanvasRenderer inRenderer, Color inTarget, ColorUpdate inUpdate) { m_Renderer = inRenderer; m_Target = inTarget; m_Update = inUpdate; }
public TweenData_SpriteRenderer_Color(SpriteRenderer inRenderer, Color inTarget, ColorUpdate inUpdate) { m_Renderer = inRenderer; m_Target = inTarget; m_Update = inUpdate; }
/// <summary> /// Applies a gradient of colors to the Material over time. /// </summary> static public Tween Gradient(this Material inMaterial, Gradient inGradient, float inTime, ColorUpdate inUpdate = ColorUpdate.PreserveAlpha) { return(Tween.Create(new TweenData_Material_Gradient(inMaterial, inGradient, inUpdate), inTime)); }
/// <summary> /// Tweens from one Color to another over time. /// </summary> static public Tween Color(Color inStart, Color inEnd, Action <Color> inSetter, TweenSettings inSettings, ColorUpdate inUpdateMode = ColorUpdate.FullColor) { return(Tween.Create(new TweenData_Value_Color(inStart, inEnd, inSetter, inUpdateMode), inSettings)); }
/// <summary> /// Applies a gradient of colors to a Material color property over time. /// </summary> static public Tween Gradient(this Material inMaterial, string inProperty, Gradient inGradient, float inTime, ColorUpdate inUpdate = ColorUpdate.PreserveAlpha) { return(Tween.Create(new TweenData_Material_GradientProperty(inMaterial, Shader.PropertyToID(inProperty), inGradient, inUpdate), inTime)); }
/// <summary> /// Applies a gradient of colors to a Material color property over time. /// </summary> static public Tween Gradient(this Material inMaterial, int inPropertyID, Gradient inGradient, TweenSettings inSettings, ColorUpdate inUpdate = ColorUpdate.PreserveAlpha) { return(Tween.Create(new TweenData_Material_GradientProperty(inMaterial, inPropertyID, inGradient, inUpdate), inSettings)); }
public TweenData_SpriteRenderer_Gradient(SpriteRenderer inRenderer, Gradient inTarget, ColorUpdate inUpdate) { m_Renderer = inRenderer; m_Gradient = inTarget; m_Update = inUpdate; }
private void RunFullUpdate() { ColorUpdate?.Invoke(this, null); }
/// <param name='model'> /// Required. /// </param> /// <param name='cancellationToken'> /// Cancellation token. /// </param> public async Task <HttpOperationResponse <string> > UpdateAsyncWithOperationResponseAsync(ColorUpdate model, CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // Validate if (model == null) { throw new ArgumentNullException("model"); } // Tracing bool shouldTrace = ServiceClientTracing.IsEnabled; string invocationId = null; if (shouldTrace) { invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary <string, object> tracingParameters = new Dictionary <string, object>(); tracingParameters.Add("model", model); ServiceClientTracing.Enter(invocationId, this, "UpdateAsyncAsync", tracingParameters); } // Construct URL string url = ""; url = url + "/colors"; string baseUrl = this.Client.BaseUri.AbsoluteUri; // Trim '/' character from the end of baseUrl and beginning of url. if (baseUrl[baseUrl.Length - 1] == '/') { baseUrl = baseUrl.Substring(0, baseUrl.Length - 1); } if (url[0] == '/') { url = url.Substring(1); } url = baseUrl + "/" + url; url = url.Replace(" ", "%20"); // Create HTTP transport objects HttpRequestMessage httpRequest = new HttpRequestMessage(); httpRequest.Method = HttpMethod.Put; httpRequest.RequestUri = new Uri(url); // Set Headers // Set Credentials if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); await this.Client.Credentials.ProcessHttpRequestAsync(httpRequest, cancellationToken).ConfigureAwait(false); } // Serialize Request string requestContent = null; JToken requestDoc = model.SerializeJson(null); requestContent = requestDoc.ToString(Newtonsoft.Json.Formatting.Indented); httpRequest.Content = new StringContent(requestContent, Encoding.UTF8); httpRequest.Content.Headers.ContentType = MediaTypeHeaderValue.Parse("application/json"); // Send Request if (shouldTrace) { ServiceClientTracing.SendRequest(invocationId, httpRequest); } cancellationToken.ThrowIfCancellationRequested(); HttpResponseMessage httpResponse = await this.Client.HttpClient.SendAsync(httpRequest, cancellationToken).ConfigureAwait(false); if (shouldTrace) { ServiceClientTracing.ReceiveResponse(invocationId, httpResponse); } HttpStatusCode statusCode = httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); if (statusCode != HttpStatusCode.OK) { HttpOperationException <object> ex = new HttpOperationException <object>(); ex.Request = httpRequest; ex.Response = httpResponse; ex.Body = null; if (shouldTrace) { ServiceClientTracing.Error(invocationId, ex); } throw ex; } // Create Result HttpOperationResponse <string> result = new HttpOperationResponse <string>(); result.Request = httpRequest; result.Response = httpResponse; // Deserialize Response if (statusCode == HttpStatusCode.OK) { string resultModel = default(string); JToken responseDoc = null; if (string.IsNullOrEmpty(responseContent) == false) { responseDoc = JToken.Parse(responseContent); } if (responseDoc != null) { resultModel = responseDoc.ToString(Newtonsoft.Json.Formatting.Indented); } result.Body = resultModel; } if (shouldTrace) { ServiceClientTracing.Exit(invocationId, result); } return(result); }