File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -106,9 +106,10 @@ void Draw() // main drawing
106106 D.text (0 , 0 , " Hello to " ENGINE_NAME " Engine !" );
107107 D.text (0 , -0.1 , S+ " FPS: " + Time.fps ());
108108 D.text (0 , -0.2 , S+ " Arrow keys to move dot, Esc to Exit" );
109- myObject.print (); // Display MyClass details
110- D.dot (BLUE, dot_pos, 0 .02f ); // draw moving dot
109+ myObject.print ();
110+ D.dot (BLUE, dot_pos, 0 .02f ); // draw moving dot controlled by this client
111111
112+ // draw moving dots controlled by other clients
112113 for (const auto &p : gOtherDots )
113114 if (p.first !=gMyId ) D.dot (RED, p.second , 0 .02f );
114115}
Original file line number Diff line number Diff line change @@ -72,13 +72,13 @@ bool Update()
7272/* *****************************************************************************/
7373void Draw ()
7474{
75- D.clear (BLACK); // clear screen to azure color
75+ D.clear (BLACK);
7676 D.text (0 , 0 , " Hello to " ENGINE_NAME " Engine !" );
7777 D.text (0 , -0.1 , S+ " FPS: " + Time.fps ());
7878 D.text (0 , -0.2 , S+ " Arrow keys to move dot, Esc to Exit" );
7979 D.text (0 , -0.3 , S+ " Clients: " + clientCount);
8080 D.text (0 , -0.4 , S+ " Packets: " + packetsRecv);
81- myObject.print (); // Display MyClass details
81+ myObject.print ();
8282 D.dot (BLUE, dot_pos, 0 .02f ); // draw moving dot controlled by server
8383 for (const auto &c : gClients )
8484 D.dot (RED, c.pos , 0 .02f ); // draw client dots
You can’t perform that action at this time.
0 commit comments