예제 #1
0
    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);
    }
예제 #2
0
    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);
    }
예제 #3
0
    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);
    }