コード例 #1
0
        private void UpdatePlayer()
        {
            //Canvas.SetTop(PlayerViewingDirection, ArcheBuddyCore.me.Y + 3);
            //Canvas.SetLeft(PlayerViewingDirection, ArcheBuddyCore.me.X + 3);

            double turnAdjust = ArcheBuddyCore.me.turnAngle * 360 / 128 - 28;

            //((RotateTransform)PlayerViewingDirection.RenderTransform).Angle = turnAdjust;

            PlayerDot.Visibility = Visibility.Visible;
            PlayerViewingDirection.Visibility = Visibility.Visible;

            //update the viewmodel with updated player information
            radarWindow.PlayerAngleDegrees = turnAdjust;
            radarWindow.PlayerX            = ArcheBuddyCore.me.X;
            radarWindow.PlayerY            = ArcheBuddyCore.me.Y;
            radarWindow.NotifyPropertyChanged("");
        }