public ServerPage() { DataContext = this; InitializeComponent(); LocalIP = ServerClient.GetLocalIp(); GraphicalEffects.TitleScreenBackground(background1, background2, background3, background4, background5, background11, background21, background31, background41, background51, 1); }
private void PhysicsTimerTick(object sender, EventArgs e) { PlayerMovement.PlayerMove(Background_Canvas, playerobj, true); Physics.Gravity(Background_Canvas, playerobj); CameraMovement.CameraFollow(playerobj, Scroller, 250); GraphicalEffects.IngameScreenBackground_5(background1, background2, background3, background4, background5, background11, background21, background31, background41, background51, 1, playerobj.X, MainWindows_Page.ActualWidth, Collision.CollisonDetectLeft(Background_Canvas, playerobj, false), Collision.CollisionDetectRight(Background_Canvas, playerobj, false)); }
public static void IngameScreenBackground_5(Image a, Image b, Image c, Image d, Image f, Image a1, Image b1, Image c1, Image d1, Image f1, double speed, double x, double windowWidth, bool leftCollison, bool rightCollison) { GraphicalEffects.IngameScreenBackground_1(a, a1, speed / 16, x, windowWidth, leftCollison, rightCollison); GraphicalEffects.IngameScreenBackground_1(b, b1, speed / 8, x, windowWidth, leftCollison, rightCollison); GraphicalEffects.IngameScreenBackground_1(c, c1, speed / 4, x, windowWidth, leftCollison, rightCollison); GraphicalEffects.IngameScreenBackground_1(d, d1, speed / 2, x, windowWidth, leftCollison, rightCollison); GraphicalEffects.IngameScreenBackground_1(f, f1, speed, x / 1.3, windowWidth, leftCollison, rightCollison); }
private void Button_Click(object sender, RoutedEventArgs e) { if (click_counter == 0) { GraphicalEffects.StartTransition <MainWindow>(titlescreen_canvas, Titlescreen_Page); //Titlescreen_Page.NavigationService.Navigate( new MainWindow()); click_counter++; } }
public MainWindows_Multiplayer(string _localIP, string _localPORT, string _remoteIP, string _remotePORT) { DataContext = playerobj; playerobj.GameOver += OnGameOver; //debug.DataContext = playerobj; InitializeComponent(); //debug.Show(); player2.DataContext = playerTwo; server = new ServerClient(_localIP, _localPORT, _remoteIP, _remotePORT); LevelGenerator.CreateLevelStatic(Background_Canvas, 2); GraphicalEffects.EndTransiton(Background_Canvas, mainwindow_multiplayer); var PhysicsTimer = new DispatcherTimer(); PhysicsTimer.Tick += PhysicsTimerTick; PhysicsTimer.Interval = new TimeSpan(0, 0, 0, 0, 10); task1 = new Task(PhysicsTimer.Start); var AnimationTimer = new DispatcherTimer(); AnimationTimer.Tick += AnimationTimerTick; AnimationTimer.Interval = new TimeSpan(0, 0, 0, 0, 50); task2 = new Task(AnimationTimer.Start); var CoinTimer = new DispatcherTimer(); CoinTimer.Tick += CoinTimerTick; CoinTimer.Interval = new TimeSpan(0, 0, 0, 0, 50); task3 = new Task(CoinTimer.Start); var NetworktTimer = new DispatcherTimer(); NetworktTimer.Tick += NetworktTimerTick; NetworktTimer.Interval = new TimeSpan(0, 0, 0, 0, 5); task4 = new Task(NetworktTimer.Start); task1.Start(); task2.Start(); task3.Start(); task4.Start(); }
public MainWindow() { DataContext = playerobj; debug.DataContext = playerobj; InitializeComponent(); playerobj.GameOver += OnGameOver; debug.Show(); LevelGenerator.CreateLevelStatic(Background_Canvas, 2); GraphicalEffects.EndTransiton(Background_Canvas, MainWindows_Page); var PhysicsTimer = new DispatcherTimer(); PhysicsTimer.Tick += PhysicsTimerTick; PhysicsTimer.Interval = new TimeSpan(0, 0, 0, 0, 10); task1 = new Task(PhysicsTimer.Start); var AnimationTimer = new DispatcherTimer(); AnimationTimer.Tick += AnimationTimerTick; AnimationTimer.Interval = new TimeSpan(0, 0, 0, 0, 50); task2 = new Task(AnimationTimer.Start); var CoinTimer = new DispatcherTimer(); CoinTimer.Tick += CoinTimerTick; CoinTimer.Interval = new TimeSpan(0, 0, 0, 0, 50); task3 = new Task(CoinTimer.Start); task1.Start(); task2.Start(); task3.Start(); }
private void Button_Click_1(object sender, RoutedEventArgs e) { GraphicalEffects.StartTransition <ServerPage>(titlescreen_canvas, Titlescreen_Page); }
public TitleScreen() { InitializeComponent(); GraphicalEffects.TitleScreenBackground(background1, background2, background3, background4, background5, background11, background21, background31, background41, background51, 1); }