public Game(GameWindow gameWindow, float frameRate) { this.camera = new FPVCamera(new Vector3(0, 0, 0), 1f); this.EntityManager = new EntityManager(); spider = ObjLoader.ObjLoader.LoadObj(@"C:\Users\majda\source\repos\SharpEngine-Core\SharpEngine-Core\TestModels\Spider\", "spider.obj", new Vector3(-100, 0, 0), this.EntityManager); spider.PhysicBody.RigidBody = new RigidBody(10f, spider.PhysicBody); var spider2 = ObjLoader.ObjLoader.LoadObj(@"C:\Users\majda\source\repos\SharpEngine-Core\SharpEngine-Core\TestModels\Spider\", "spider.obj", new Vector3(200, 0, 0), this.EntityManager); spider2.PhysicBody.RigidBody = new RigidBody(10f, spider.PhysicBody); spider.OnCollision += (o, e) => { e.Solid.Pos += new Vector3(200, 0, 0); }; EntityManager.Add(spider); EntityManager.Add(spider2); this.GW = gameWindow; this.FrameRate = frameRate; this.KeyboardProcessor = new KeyboardProcessor(this.GW); this.MouseProcessor = new MouseProcessor(this.GW); }
public SongMatcher(MainForm main, Database.DatabaseAdapter adapter) { InitializeComponent(); tracks = null; lowGroup = medGroup = highGroup = null; lowGroupIndices = medGroupIndices = highGroupIndices = null; historyMap = null; historyQueue = new Queue <int>(); Matching = false; this.playerForm = main; this.dbAdapter = adapter; this.currTrackIndex = -1; sp = new SignalProcessor(); kp = new KeyboardProcessor(); kp.onDataReady += onKeyboardDataReady; mp = new MouseProcessor(); mp.onDataReady += onMouseDataReady; //to get raw x/y points set mean values to 0 mp.MeanValueX = 0; mp.MeanValueY = 0; mouseXRecordings = new Queue <short[]>(); mouseYRecordings = new Queue <short[]>(); keyboardRecordings = new Queue <short[]>(); mkTrackBar.ValueChanged += trackBarValuesChanged; this.hide(); MatcherVisible = false; this.TopMost = true; main.onSongComplete += onSongComplete; prevAction = ""; rnd = new Random(); actionChangedStopWatch = new Stopwatch(); }
public Grapher(MainForm main) { this.mainForm = main; InitializeComponent(); t = null; chart1.Series.Add("wave"); chart1.Series["wave"].ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.FastLine; chart1.Series["wave"].ChartArea = "ChartArea1"; kp = new KeyboardProcessor(); kp.onDataReady += onKeyboardDataReady; mp = new MouseProcessor(); mp.onDataReady += onMouseDataReady; sp = new SignalProcessor(); sp.onBPMReady += onBPMReady; mouseXYComboBox.Items.Add("X"); mouseXYComboBox.Items.Add("Y"); drawThread = null; this.hide(); GrapherVisible = false; }
private void Create(params string[] lines) { _textView = EditorUtil.CreateView(lines); _visualMode = new Mock<IVisualMode>(MockBehavior.Strict); _buffer = new Mock<IVimBuffer>(MockBehavior.Strict); _buffer.SetupGet(x => x.TextView).Returns(_textView); _mouseDevice = new Mock<IMouseDevice>(MockBehavior.Strict); _processor = new MouseProcessor(_buffer.Object, _mouseDevice.Object); }
protected override void Initialize() { Console.Out.WriteLine("=== Flight Shooter by RARvolt ==="); Console.Out.WriteLine("Initializing..."); graphics.PreferredBackBufferWidth = 800; graphics.PreferredBackBufferHeight = 600; graphics.IsFullScreen = false; graphics.ApplyChanges(); Window.Title = "Flight Shooter by RARvolt"; _clamp = new SamplerState { AddressU = TextureAddressMode.Clamp, AddressV = TextureAddressMode.Clamp }; lightDirection.Normalize(); keyboardProcessor = new KeyboardProcessor(); mouseProcessor = new MouseProcessor(); base.Initialize(); Console.Out.WriteLine("Initializing done."); }