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)); }
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); } } }