-
Notifications
You must be signed in to change notification settings - Fork 0
/
Potion.java
36 lines (26 loc) · 799 Bytes
/
Potion.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package com.ks2002br.entities.itens;
import java.awt.Graphics;
import java.awt.Rectangle;
import java.util.LinkedList;
import com.ks2002br.frameworks.GameObject;
import com.ks2002br.frameworks.ObjectId;
import com.ks2002br.game.Game;
import com.ks2002br.graficos.Texturas;
public class Potion extends GameObject {
private Texturas tex = Game.getInstance();
public Potion(float x, float y, int type, ObjectId id) {
super(x, y, type, id);
}
@Override
public void tick(LinkedList<GameObject> obj) {
}
@Override
public void render(Graphics g) {
if(type == 1) g.drawImage(tex.item[2], (int) x, (int) y,null);
if(type == 2) g.drawImage(tex.item[3], (int) x, (int) y,null);
}
@Override
public Rectangle getBounds() {
return new Rectangle((int) x, (int) y, 32, 32);
}
}