/// <summary> /// Konstruktor /// </summary> public Engine() { Lines = new List <Line>(); Rider = new Player(new Point(100, 500), 60, global::LineRider.Properties.Resources.player_gerade); Playtime = new TimeSpan(); GameButtons = new List <GameButton>(); Origin = new Point(); Messages = new ConcurrentQueue <UI_Message>(); Offset = new Point(0, 600); int Size = 40; Play = new GameButton(new Point((int)(800 / 2 - (2 * Size + 1.5 * 10)), 10), Size, true, global::LineRider.Properties.Resources.Button_Play_icon); Pause = new GameButton(new Point((int)(800 / 2 - (1 * Size + 0.5 * 10)), 10), Size, true, global::LineRider.Properties.Resources.Button_Pause_icon); Save = new GameButton(new Point((int)(800 / 2 + (0.5 * 10)), 10), Size, true, global::LineRider.Properties.Resources.Save_icon); Load = new GameButton(new Point((int)(800 / 2 + (1 * Size + 1.5 * 10)), 10), Size, true, global::LineRider.Properties.Resources.Open_Folder_icon); GameButtons.Add(Play); GameButtons.Add(Pause); GameButtons.Add(Save); GameButtons.Add(Load); State = EngineStates.Editor; Deadpoints = new List <PointF>(); Move = new AutoResetEvent(false); Process = new AutoResetEvent(true); MoveTimer = new System.Windows.Forms.Timer(); MoveTimer.Interval = 50; MoveTimer.Tick += MoveTimer_Tick; MoveTimer.Start(); }
/// <summary> /// Konstruktor /// </summary> public Engine() { Lines = new List<Line>(); Rider = new Player(new Point(100,500),60,global::LineRider.Properties.Resources.player_gerade); Playtime = new TimeSpan(); GameButtons = new List<GameButton>(); Origin = new Point(); Messages = new ConcurrentQueue<UI_Message>(); Offset = new Point(0, 600); int Size = 40; Play = new GameButton(new Point((int)(800 / 2 - (2 * Size + 1.5 * 10)), 10), Size, true, global::LineRider.Properties.Resources.Button_Play_icon); Pause = new GameButton(new Point((int)(800 / 2 - (1 * Size + 0.5 * 10)), 10), Size, true, global::LineRider.Properties.Resources.Button_Pause_icon); Save = new GameButton(new Point((int)(800 / 2 + (0.5 * 10)), 10), Size, true, global::LineRider.Properties.Resources.Save_icon); Load = new GameButton(new Point((int)(800 / 2 + (1 * Size + 1.5 * 10)), 10), Size, true, global::LineRider.Properties.Resources.Open_Folder_icon); GameButtons.Add(Play); GameButtons.Add(Pause); GameButtons.Add(Save); GameButtons.Add(Load); State = EngineStates.Editor; Deadpoints = new List<PointF>(); Move = new AutoResetEvent(false); Process = new AutoResetEvent(true); MoveTimer = new System.Windows.Forms.Timer(); MoveTimer.Interval = 50; MoveTimer.Tick += MoveTimer_Tick; MoveTimer.Start(); }