public int getArcX()
{
// find the "origin" x value of the meter
int originX = getX() - (maxDegree<=90?radius/2:0);
//we'll be an appropriate offset from that origin.
return (int) (originX+Math.cos(Math.toRadians(degFull))*radius);
}
/**
* getArcY gives the y value of the perimeter of the circle where the meter is currently filled to
*
* @return the y location of the filled portion of the meter
*/
public int getArcY()
{
// find the "origin" y value of the meter
int originY = getY()+getImage().getHeight()/2;
//we'll be an appropriate offset from that origin.
return (int) (originY-Math.sin(Math.toRadians(degFull))*radius);
}
how would i use these two methods as a location for something else??
public void act()
{
if(shoot=true)
{
if(isTouching(Bird.class) || this.isAtEdge())
{
removeTouching(ViralLoad.class);
ViralLoad viralload = new ViralLoad(getArcX(),getArcY());
addObject(viralload,getArcX(), getArcY());
}
}
i want to put the location into the viral load
