コード例 #1
0
ファイル: RunnerThirdControl.cs プロジェクト: huxii/OLU
    protected void Awake()
    {
        chest  = GameObject.Find("Chest").GetComponent <PropAutoTimedDeactivateControl>();
        mirror = GameObject.Find("Mirror1").GetComponent <MirrorControl>();

        GameObject.Find("Ceiling").transform.localPosition  += new Vector3(0, -8, 0);
        GameObject.Find("OuterLen").transform.localPosition += new Vector3(0, -8, 0);
    }
コード例 #2
0
ファイル: MouseLook.cs プロジェクト: mVonwil/Reflections
    public void ShootLine(int bounceMax)
    {
        Debug.Log("Boucning " + bounceMax.ToString() + " Rays");

        RaycastHit[] myHits = new RaycastHit[bounceMax];

        lineVectors     = new Vector3[bounceMax + 1];
        lineVectors [0] = transform.position;

        MirrorControl.BounceRays(transform.position, transform.forward, ref myHits, ref lineVectors);

        myHits = myHits;
    }
        private void UserControl_Loaded(object sender, RoutedEventArgs e)
        {
            MirrorControl Mirror = new MirrorControl();

            LinearGradientBrush brush = new LinearGradientBrush();

            brush.StartPoint = new System.Windows.Point(0, 0);
            brush.EndPoint   = new System.Windows.Point(1, 0);
            brush.GradientStops.Add(new GradientStop()
            {
                Color = Colors.Transparent, Offset = 0
            });
            brush.GradientStops.Add(new GradientStop()
            {
                Color = Colors.White, Offset = 1
            });
            Mirror.ReflectionOpacityMask = brush;

            PlaneProjection projection = new PlaneProjection();

            projection.CenterOfRotationX = 0.5;
            projection.CenterOfRotationY = 0.5;
            Mirror.ContentProjection     = projection;

            Mirror.ReflectionEffect = new BlurEffect()
            {
                Radius = 15
            };

            Mirror.Content = new Calendar();
            LayoutRoot.Children.Add(Mirror);
            Grid.SetColumn(Mirror, 0);
            Grid.SetRow(Mirror, 4);

            Binding binding;

            binding = new Binding("ContentProjection.RotationX")
            {
                Source = Mirror, Mode = BindingMode.TwoWay
            };
            sldrRotX.SetBinding(Slider.ValueProperty, binding);
            binding = new Binding("ContentProjection.RotationY")
            {
                Source = Mirror, Mode = BindingMode.TwoWay
            };
            sldrRotY.SetBinding(Slider.ValueProperty, binding);
        }
コード例 #4
0
ファイル: RunnerSecondControl.cs プロジェクト: huxii/OLU
 protected void Awake()
 {
     mirror = GameObject.Find("Mirror0").GetComponent <MirrorControl>();
 }