protected void SetTransform(Transform transform) { Position = new Vector3Dto(transform.position); Rotation = new Vector3Dto(transform.rotation); Scale = new Vector3Dto(transform.localScale); Name = transform.name; }
public SplinePointDto(Vector3 position, Vector3 leftTangent, Vector3 rightTangent, ShapeTangentMode tangentMode) { Position = new Vector3Dto(position); LeftTangent = new Vector3Dto(leftTangent); RightTangent = new Vector3Dto(rightTangent); TangentMode = tangentMode; }
public DtoWithTransform(Transform transform) { Position = new Vector3Dto(transform.position); Rotation = new Vector3Dto(transform.rotation); Scale = new Vector3Dto(transform.localScale); Name = transform.name; }
void OnColorClick(object sender, EventArgs eventArgs) { var color = ((Button)sender).BackgroundColor; var colorVector = new Vector3Dto { X = (float)color.R, Y = (float)color.G, Z = (float)color.B }; connection?.Send(new ColorChangedDto { Color = colorVector }); }
void AddBulb(Vector3Dto position) { Urho.Application.InvokeOnMain(() => app?.AddBulb(new Vector3(position.X, position.Y, position.Z))); Device.BeginInvokeOnMainThread(() => { int index = bulbsStack.Children.Count; Button button = new Button(); button.FontSize = 24; button.TextColor = Color.Black; button.BackgroundColor = new Color(0.8, 0.8, 0.8); button.Text = "Bulb " + index; button.Clicked += (s, e) => { ToggleRealDevice(index); Urho.Application.InvokeOnMain(() => app?.ToggleLight(index)); }; bulbsStack.Children.Add(button); }); }