MainWindow.xaml.cs
(开头部分) 55KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Windows.Threading;
using GrandPrix.TrackSegments;
//using System.Windows.Media.Effects;
using GrandPrix.Circuits;
using System.Collections;
using DrWPF.Media.Imaging;
namespace GrandPrix
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
#region attributes
static double MAX_ANGLE = 30;
static double MAX_REAL_SPEED = 280;
const int TRACK_ARRAY_WIDTH = 36;
const int TRACK_ARRAY_HEIGHT = 22;
const int TRACK_VIEW_WIDTH = 5;
const int TRACK_VIEW_HEIGHT = 5;
const double TRACK_WIDTH = 200;
const double METERS_PER_TRACK_SEGMENT = 10.3;
double max_track_point_X = 0.0;
double max_track_point_Y = 0.0;
DispatcherTimer gameLoopTimer;
double friction = 0.01;
double frictionOnTrack = 0.01;
double frictionOnLightGrass = 0.85;
double frictionOnHeavyGrass = 0.85;
int[,] trackArray = new int[5, 5];
double lastTrackAngle = 0;
ITrackSegment lastSegment = null;
DateTime startTime;
DateTime currentTime;
ICircuit circuit = new Circuits.Interlagos();
Canvas cnvImage = new Canvas();
Path trackWhiteLine;
Path trackRedLine;
Path trackGrayTrackLine;
Path trackCenterLine;
Path mapWhiteLine;
Path mapBlackLine;
List<TrackLineSegment> trackLineList = new List<TrackLineSegment>();
PolyLineSegment polyLineSegment;
const double MAX_TRACK_FRICTION_RANGE = 110.0;
const double MAX_LIGHTGRASS_FRICTION_RANGE = 120.0;
后面还有 1303 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。