Merge branch 'master' of github.com:teamteamteam/SpaceScooter
This commit is contained in:
commit
51af2be9c6
BIN
res/images/items/item5.png
Normal file
BIN
res/images/items/item5.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
BIN
res/images/items/itemCredit.png
Normal file
BIN
res/images/items/itemCredit.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 832 B |
BIN
res/images/items/itemHeal.png
Normal file
BIN
res/images/items/itemHeal.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
BIN
res/images/items/itemNuke.png
Normal file
BIN
res/images/items/itemNuke.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
BIN
res/images/items/itemShield.png
Normal file
BIN
res/images/items/itemShield.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
@ -48,16 +48,19 @@ public abstract class Item extends CollidableEntity {
|
||||
int auswahl = ItemChance.choose();
|
||||
switch (auswahl) {
|
||||
case 0:
|
||||
new TestItem1(x, y);
|
||||
new ItemNuke(x, y);
|
||||
break;
|
||||
case 1:
|
||||
new TestItem2(x, y);
|
||||
new ItemCredit(x, y);
|
||||
break;
|
||||
case 2:
|
||||
new TestItem3(x, y);
|
||||
new ItemHeal(x, y);
|
||||
break;
|
||||
case 3:
|
||||
new TestItem4(x, y);;
|
||||
new ItemShield(x, y);
|
||||
break;
|
||||
case 4:
|
||||
new TestItem1(x, y);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
18
src/de/teamteamteam/spacescooter/entity/item/ItemCredit.java
Normal file
18
src/de/teamteamteam/spacescooter/entity/item/ItemCredit.java
Normal file
@ -0,0 +1,18 @@
|
||||
package de.teamteamteam.spacescooter.entity.item;
|
||||
|
||||
import de.teamteamteam.spacescooter.entity.Player;
|
||||
|
||||
public class ItemCredit extends Item {
|
||||
|
||||
public static int chance = 2;
|
||||
|
||||
public ItemCredit(int x, int y) {
|
||||
super(x, y);
|
||||
this.setImage("images/items/itemCredit.png");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void itemCollected(Player player) {
|
||||
player.setShootDamage(player.getShootDamage()+5);
|
||||
}
|
||||
}
|
18
src/de/teamteamteam/spacescooter/entity/item/ItemHeal.java
Normal file
18
src/de/teamteamteam/spacescooter/entity/item/ItemHeal.java
Normal file
@ -0,0 +1,18 @@
|
||||
package de.teamteamteam.spacescooter.entity.item;
|
||||
|
||||
import de.teamteamteam.spacescooter.entity.Player;
|
||||
|
||||
public class ItemHeal extends Item {
|
||||
|
||||
public static int chance = 3;
|
||||
|
||||
public ItemHeal(int x, int y) {
|
||||
super(x, y);
|
||||
this.setImage("images/items/itemHeal.png");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void itemCollected(Player player) {
|
||||
player.increaseHealthPoints(15);
|
||||
}
|
||||
}
|
19
src/de/teamteamteam/spacescooter/entity/item/ItemNuke.java
Normal file
19
src/de/teamteamteam/spacescooter/entity/item/ItemNuke.java
Normal file
@ -0,0 +1,19 @@
|
||||
package de.teamteamteam.spacescooter.entity.item;
|
||||
|
||||
import de.teamteamteam.spacescooter.entity.Player;
|
||||
|
||||
public class ItemNuke extends Item {
|
||||
|
||||
public static int chance = 2;
|
||||
|
||||
public ItemNuke(int x, int y) {
|
||||
super(x, y);
|
||||
this.setImage("images/items/itemNuke.png");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void itemCollected(Player player) {
|
||||
System.out.println("Gotta Nuke 'em All!");
|
||||
}
|
||||
|
||||
}
|
18
src/de/teamteamteam/spacescooter/entity/item/ItemShield.java
Normal file
18
src/de/teamteamteam/spacescooter/entity/item/ItemShield.java
Normal file
@ -0,0 +1,18 @@
|
||||
package de.teamteamteam.spacescooter.entity.item;
|
||||
|
||||
import de.teamteamteam.spacescooter.entity.Player;
|
||||
|
||||
public class ItemShield extends Item {
|
||||
|
||||
public static int chance = 4;
|
||||
|
||||
public ItemShield(int x, int y) {
|
||||
super(x, y);
|
||||
this.setImage("images/items/itemShield.png");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void itemCollected(Player player) {
|
||||
player.setShieldPoints(player.getShieldPoints() + 5);
|
||||
}
|
||||
}
|
19
src/de/teamteamteam/spacescooter/entity/item/TestItem5.java
Normal file
19
src/de/teamteamteam/spacescooter/entity/item/TestItem5.java
Normal file
@ -0,0 +1,19 @@
|
||||
package de.teamteamteam.spacescooter.entity.item;
|
||||
|
||||
import de.teamteamteam.spacescooter.entity.Player;
|
||||
|
||||
public class TestItem5 extends Item {
|
||||
|
||||
public static int chance = 2;
|
||||
|
||||
public TestItem5(int x, int y) {
|
||||
super(x, y);
|
||||
this.setImage("images/items/item5.png");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void itemCollected(Player player) {
|
||||
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user