static void Main() { //Console.WriteLine("Masuk"); //int playernum = 8, players = 8, turn = 0; game = new Game1 ();//(playernum, players, turn); game.Run (); }
// constructor public Game1(GameConnection con) { graphics = new GraphicsDeviceManager(this); Content.RootDirectory = "Content"; Bullets = new List<Bullet>(); Players = new Dictionary<string, Player>(); RemoveBullets = new List<Bullet>(); GameObject = this; connection = con; }
public Bullet(Game game, Vector2 Position, Vector2 v_nol, float Sudut, Vector2 a) : base(game) { position = Position; image = AssetsManager.AssetsList["bullet"]; V0 = v_nol; sudut = Sudut; A = a; V.X = V0.X * (float) Math.Cos(Sudut); V.Y = V0.Y * (float) Math.Sin(Sudut); this.game = game as Game1; }
/// <summary> /// The main entry point for the application. /// </summary> static void Main(string[] args) { PeerUI peer = new PeerUI(); do { peer.ShowDialog(); if (peer.peer.playStatus != 0) { GameConnection gameConnection = null; peer.peer.DisconnectFromServer(); if (peer.peer.playStatus == 2) { gameConnection = new GameConnection(peer.peer.PeerID); gameConnection.PeerIDs = peer.peer.peerList; System.Diagnostics.Debug.WriteLine("Crator Peer : " + peer.peer.IPTable[peer.peer.PeerID]); List<string> ipAddress = new List<string>(); foreach (string ip in peer.peer.IPTable.Values) { ipAddress.Add(ip); } gameConnection.StartConfig(ipAddress); gameConnection.WaitConfigComplete(); } else if (peer.peer.playStatus == 1) { gameConnection = new GameConnection(peer.peer.PeerID); System.Diagnostics.Debug.WriteLine("Peer : " + peer.peer.IPTable.Count); gameConnection.WaitConfig(); } using (Game1 game = new Game1(gameConnection)) { game.IsCreator = (peer.peer.playStatus == 2); game.Run(); } gameConnection.Close(); } } while (peer.peer.playStatus != 0); }
//DButton handshakeButton; public RoomScreen(Game1 game) : base(game) { }
public CreateRoomScreen(Game1 game) : base(game) { }
public GameplayScreen(Game1 game) : base(game) { }
public Screen(Game1 game) : base(game) { this.game = game; }
public HandshakeScreen(Game1 game) : base(game) { }
public LobbyScreen(Game1 game) : base(game) { }