public void RelocatePlayer(ServerGame game) { if (OtherPlayer == null) { return; } var otherPlayer = game.GetOtherPlayer(); //var controllerPlayer = game.GetControllerPlayer(); //Console.WriteLine("Position"); //Console.WriteLine(controllerPlayer.PositionX); Console.WriteLine(otherPlayer.PositionX); OtherPlayer.transform.position = new Vector3(otherPlayer.PositionX, otherPlayer.PositionY, otherPlayer.PositionZ); }
public void ShootPlayer(ServerGame game) { if (OtherPlayer == null) { return; } var otherPlayer = game.GetOtherPlayer(); if (!otherPlayer.IsShooting) { return; } var movements = OtherPlayer.GetComponentInChildren <OtherPlayerShooting>(); movements.ShootingQueue.Enqueue(true); }
public void MovePlayer(ServerGame game) { if (OtherPlayer == null) { return; } var otherPlayer = game.GetOtherPlayer(); if (otherPlayer.Movement == null) { return; } var movements = OtherPlayer.GetComponent <OtherPlayerMovement>(); movements.ServerMovements.Enqueue(otherPlayer.Movement); }