Permalink
Cannot retrieve contributors at this time
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?
CSE2102_group_37/src/main/EnemyLaser.java
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
34 lines (26 sloc)
612 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | |
} | |
} |