Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ddf2416
commit 2ff6003
Showing
13 changed files
with
284 additions
and
4 deletions.
There are no files selected for viewing
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
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 Ammo extends GameObject { | ||
|
||
private Texturas tex = Game.getInstance(); | ||
|
||
public Ammo(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[5], (int) x, (int) y, null); | ||
if(type == 2) g.drawImage(tex.item[6], (int) x, (int) y, null); | ||
|
||
} | ||
|
||
@Override | ||
public Rectangle getBounds() { | ||
|
||
return new Rectangle((int) x, (int) y, 32, 32); | ||
} | ||
|
||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
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 Gun extends GameObject { | ||
|
||
private Texturas tex = Game.getInstance(); | ||
|
||
public Gun(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[4], (int) x, (int) y,null); | ||
|
||
} | ||
|
||
@Override | ||
public Rectangle getBounds() { | ||
|
||
return new Rectangle((int) x, (int) y, 32, 32); | ||
} | ||
|
||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
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 Key extends GameObject { | ||
|
||
private Texturas tex = Game.getInstance(); | ||
|
||
public Key(float x, float y, ObjectId id) { | ||
super(x, y, id); | ||
} | ||
|
||
@Override | ||
public void tick(LinkedList<GameObject> obj) { | ||
} | ||
|
||
@Override | ||
public void render(Graphics g) { | ||
|
||
g.drawImage(tex.item[7], (int) x, (int) y,null); | ||
|
||
} | ||
|
||
@Override | ||
public Rectangle getBounds() { | ||
|
||
return new Rectangle((int) x, (int) y, 32, 32); | ||
} | ||
|
||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
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 KeyCard extends GameObject { | ||
|
||
private Texturas tex = Game.getInstance(); | ||
|
||
public KeyCard(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[8], (int) x, (int) y, null); | ||
if(type == 2) g.drawImage(tex.item[9], (int) x, (int) y, null); | ||
|
||
} | ||
|
||
@Override | ||
public Rectangle getBounds() { | ||
|
||
return new Rectangle((int) x, (int) y, 32, 32); | ||
} | ||
|
||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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 Medkit extends GameObject { | ||
|
||
private Texturas tex = Game.getInstance(); | ||
|
||
public Medkit(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[0], (int) x, (int) y,null); | ||
if(type == 2) g.drawImage(tex.item[1], (int) x, (int) y,null); | ||
} | ||
|
||
@Override | ||
public Rectangle getBounds() { | ||
|
||
return new Rectangle((int) x, (int) y, 32, 32); | ||
} | ||
|
||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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); | ||
} | ||
|
||
} |
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
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
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
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
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