First, place the method in the target class and add an act method to that class:
public void act()
{
checkTarget();
}
The method should probably be named more appropriately (something like 'checkActivation'). Also, the 'Target' class was not name very well, either (very mis-leading). It should be something like 'Gun' or 'Cannon' or 'Emitter').
Near the upper-right corner of the scenario frame, you will see a 'Share' button which will bring up a new dialog. Select the 'Publish' tab (it probably is already selected); enter the name of the project; check the 'Publish source code' checkbox; enter your username and password; and, click the 'Share' button.
I see one problem immediately. Neither barrel nor target should be sub-classes of player (they both should 'extend Actor'). Move the methods related to the angle of the barrel from the player class to the barrel class. Move the 'checkTarget' method from the player class to the target class and call it from the act method, there.