public MainWindow() { InitializeComponent(); var frameTimer = new DispatcherTimer(); frameTimer.Tick += OnFrame; frameTimer.Interval = TimeSpan.FromSeconds(1.0 / 60.0); frameTimer.Start(); _spawnPoint = new Point3D(0.0, 0.0, 0.0); _lastTick = Environment.TickCount; _pm = new ParticleSystemManager(); WorldModels.Children.Add(_pm.CreateParticleSystem(1000, Colors.Gray)); WorldModels.Children.Add(_pm.CreateParticleSystem(1000, Colors.Red)); WorldModels.Children.Add(_pm.CreateParticleSystem(1000, Colors.Silver)); WorldModels.Children.Add(_pm.CreateParticleSystem(1000, Colors.Orange)); WorldModels.Children.Add(_pm.CreateParticleSystem(1000, Colors.Yellow)); _rand = new Random(GetHashCode()); KeyDown += Window1_KeyDown; Cursor = Cursors.None; }
public MainWindow() { InitializeComponent(); var frameTimer = new DispatcherTimer(); frameTimer.Tick += OnFrame; frameTimer.Interval = TimeSpan.FromSeconds(1.0/60.0); frameTimer.Start(); _spawnPoint = new Point3D(0.0, 0.0, 0.0); _lastTick = Environment.TickCount; _pm = new ParticleSystemManager(); WorldModels.Children.Add(_pm.CreateParticleSystem(1000, Colors.Gray)); WorldModels.Children.Add(_pm.CreateParticleSystem(1000, Colors.Red)); WorldModels.Children.Add(_pm.CreateParticleSystem(1000, Colors.Silver)); WorldModels.Children.Add(_pm.CreateParticleSystem(1000, Colors.Orange)); WorldModels.Children.Add(_pm.CreateParticleSystem(1000, Colors.Yellow)); _rand = new Random(GetHashCode()); KeyDown += Window1_KeyDown; Cursor = Cursors.None; }