package com.ready.rain.mobs;

import java.awt.Color;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Image;
import java.awt.image.BufferStrategy;


public class Animation{
	boolean dir = false;
	int rot = 0;
	
	public void AnimateLegs(BufferStrategy bs, int x,int y){
		
		
		
		
		
		if(rot >= 70){
			dir = true;
		}
		if(rot <= -70){
			dir = false;
		}
		if(dir == false){
			rot++;
		}else{
			rot--;
		}
		Graphics2D g1 = (Graphics2D) bs.getDrawGraphics();
		
		g1.translate(x + 100/2, y);
		g1.rotate(Math.toRadians(rot));
		g1.translate(-x - 100/2, -y);
		g1.fillRect(x, y, 100, 150);
	
		g1.dispose();
		
	Graphics2D g2 = (Graphics2D) bs.getDrawGraphics();
		
		g2.translate(x + 100/2, y);
		g2.rotate(Math.toRadians(-rot));
		g2.translate(-x - 100/2, -y);
		g2.fillRect(x, y, 100, 150);
	
		g2.dispose();
	}

}
@@ -210,19 +210,22 @@
 false;%0A%09
-int
+double
  rot = 0
@@ -283,16 +283,32 @@
  x,int y
+, boolean moving
 )%7B%0A%09%09%0A%09%09
@@ -316,16 +316,36 @@
 %09%09%0A%09%09%0A%09%09
+if (moving == true)%7B
 %0A%09%09if(ro
@@ -464,16 +464,87 @@
 --;%0A%09%09%7D%0A
+%09%09%7Delse%7B%0A%09%09%09if(rot %3E= 0)rot -= 0.5;%0A%09%09%09if(rot %3C= 0)rot += 0.5;%0A%09%09%09%0A%09%09%7D%0A
 %09%09Graphi
@@ -945,8 +945,9 @@
 );%0A%09%7D%0A%0A%7D
+%0A

Update Animation.java