Skip to content
Permalink
4ad74b61e8
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
34 lines (26 sloc) 612 Bytes
package main;
import java.awt.Graphics;
import java.awt.Rectangle;
import entity.EntityTypeD;
public class EnemyLaser extends GameObject implements EntityTypeD{
private Skins skin;
public EnemyLaser(double x, double y, Skins skin, Game game){
super(x,y);
this.skin = skin;
}
public void tick(){
x-=4;
}
public void render(Graphics g){
g.drawImage(skin.enemyLaser, (int)x, (int)y, null);
}
public double getX(){
return x;
}
public double getY() {
return y;
}
public Rectangle getBounds(){
return new Rectangle((int)x, (int) y, 64, 64);
}
}