Esempio n. 1
0
 private void NetworkEventMaster_OnMovingPackage(MovingPackage package)
 {
     Debug.Log(new Vector3(package.tankX, package.tankY));
     Debug.Log(package.angle);
     networkPlayers[package.playerID].Teleportate(
         new Vector3(package.tankX, package.tankY),
         package.angle,
         new Vector3(package.mouseX, package.mouseY));
 }
Esempio n. 2
0
 void OnMoving(MovingPackage package)
 {
     foreach (var client in clients)
     {
         /* Debug.Log(package.playerID);
          * Debug.Log(package.tankX);
          * Debug.Log(package.tankY);
          * Debug.Log(package.angle);*/
         if (client.playerID != package.playerID)
         {
             networkInterface.SendTo(package, client.endPoint);
         }
     }
 }