Exemplo n.º 1
0
 protected void SetTransform(Transform transform)
 {
     Position = new Vector3Dto(transform.position);
     Rotation = new Vector3Dto(transform.rotation);
     Scale    = new Vector3Dto(transform.localScale);
     Name     = transform.name;
 }
Exemplo n.º 2
0
 public SplinePointDto(Vector3 position, Vector3 leftTangent, Vector3 rightTangent, ShapeTangentMode tangentMode)
 {
     Position     = new Vector3Dto(position);
     LeftTangent  = new Vector3Dto(leftTangent);
     RightTangent = new Vector3Dto(rightTangent);
     TangentMode  = tangentMode;
 }
Exemplo n.º 3
0
 public DtoWithTransform(Transform transform)
 {
     Position = new Vector3Dto(transform.position);
     Rotation = new Vector3Dto(transform.rotation);
     Scale    = new Vector3Dto(transform.localScale);
     Name     = transform.name;
 }
Exemplo n.º 4
0
        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
            });
        }
Exemplo n.º 5
0
 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);
     });
 }