Final-Bomber
0.1
Bomberman/Dynablaster remake in C# using XNA.
Main Page
Related Pages
Packages
Classes
Files
File List
All
Classes
Namespaces
Files
Functions
Variables
Enumerations
Enumerator
Properties
Events
Pages
ProgramStepProcessing.cs
Go to the documentation of this file.
1
using
System;
2
using
System.Collections.Generic;
3
using
System.Linq;
4
using
System.Text;
5
6
namespace
FBClient.Network
7
{
8
partial class
GameHandler
9
{
10
/*
11
Timer tmr_NotConnected;
12
Timer tmr_WaitUntilStart;
13
14
private void ProgramStepProccesing()
15
{
16
if (!GameServer.Instance.Connected)
17
{
18
DisplayStatusBeforeExiting("The Game Server has closed/disconnected");
19
}
20
if (GameServer.Instance.Connected)
21
{
22
ConnectedGameProcessing();
23
}
24
}
25
26
private void ConnectedGameProcessing()
27
{
28
if (isReady && !mainGame.IsLoaded)
29
{
30
isReady = false;
31
if (!lobbyScreen.IsLoaded)
32
{
33
lobbyScreen.Load();
34
lobbyScreen.Start();
35
}
36
mainGame = new MainGame();
37
mainGame.Load(GameSettings.Maps.GetMapById(GameSettings.currentMap));
38
tmr_WaitUntilStart = new Timer();
39
tmr_WaitUntilStart.Start();
40
}
41
if (tmr_WaitUntilStart.Each(5000)) //Vänta 5 sekunder innan man skickar isready, för att man ska hinna hoppa ur matchen
42
{
43
GameServer.Instance.SendIsReady();
44
tmr_WaitUntilStart.Stop();
45
}
46
}
47
48
private bool isReady = false;
49
50
private void GameServer_StartInfo() //När servern har skickat banan som ska köras
51
{
52
isReady = true;
53
}
54
55
private void GameServer_StartGame(bool gameInProgress, int playerId, float moveSpeed, int suddenDeathTime)
56
{
57
if (!mainGame.IsStarted)
58
{
59
if (lobbyScreen.IsLoaded)
60
{
61
lobbyScreen.End();
62
lobbyScreen.Unload();
63
}
64
if (!gameInProgress)
65
{
66
mainGame.me.PlayerID = playerId;
67
mainGame.me.MoveSpeed = moveSpeed;
68
mainGame.suddenDeathTime = suddenDeathTime;
69
}
70
else
71
{
72
mainGame.me.Kill();
73
mainGame.Spectator = true;
74
}
75
mainGame.Start();
76
}
77
}
78
*/
79
private
void
DisplayStatusBeforeExiting(
string
status)
80
{
81
//this.Exit();
82
/*
83
if (E2D_Engine.GetGraphicManager.IsFullScreen)
84
{
85
E2D_Engine.GetGraphicManager.IsFullScreen = false;
86
E2D_Engine.GetGraphicManager.ApplyChanges();
87
}
88
MessageBox.Show(status);
89
*/
90
}
91
}
92
}
FBClient.Network.GameHandler
Definition:
ProgramStepProcessing.cs:8
1 - Final-Bomber
Final-Bomber
Network
ProgramStepProcessing.cs
Generated on Sat Jan 11 2014 02:07:09 for Final-Bomber by
1.8.6