Compare commits

...

4 Commits

Author SHA1 Message Date
Max
865b5e0c52 animationspeed of rick edited 2021-07-01 11:39:33 +02:00
Max
d28a29df45 Spider anzahl fixed 2021-07-01 11:02:17 +02:00
Max
b85a36bf14 Merge branch 'master' of https://git.ngb.schule/Tim/Zoelda 2021-07-01 11:00:34 +02:00
Max
66d36c4ea2 Rick added 2021-07-01 11:00:27 +02:00
3 changed files with 51 additions and 1 deletions

View File

@@ -0,0 +1,36 @@
package main.entities;
import main.SheetLoader;
public class Rick extends LivingEntity{
private static SheetLoader loader = new SheetLoader("/res/images/rick_sprite_sheet.png");
public Rick() {
loader.generateFigures(24, 24, new int[] {4});
width = 0.7f;
height = 0.8f;
spriteOffsetY = -0.14f;
spriteScale = 0.8f;
posX = 4f;
posY = 4f;
mirrored = true;
loader.getFigur(0).animationsGeschwindigkeitSetzen(265);
actionFigur.neuerZustand(loader.getFigur(0), "dancin");
zustandSetzen("dancin");
}
@Override
public String getDeathAnimationName() {
// TODO Auto-generated method stub
return null;
}
@Override
public String getDamageAnimationName() {
// TODO Auto-generated method stub
return null;
}
}

View File

@@ -1,7 +1,9 @@
package main.worlds; package main.worlds;
import main.entities.Coin; import main.entities.Coin;
import main.entities.Rick;
import main.entities.Snake; import main.entities.Snake;
import main.entities.Spider;
import main.maps.Map; import main.maps.Map;
public class TestWorld extends World { public class TestWorld extends World {
@@ -18,10 +20,22 @@ public class TestWorld extends World {
getCurrentMap().addAnimatedEntity(c); getCurrentMap().addAnimatedEntity(c);
} }
for (int i = 0; i < 5; i++) { for (int i = 0; i < 2; i++) {
Snake s = new Snake(); Snake s = new Snake();
s.setPosX((float) (Math.random() * 5 + 2)); s.setPosX((float) (Math.random() * 5 + 2));
getCurrentMap().addAnimatedEntity(s); getCurrentMap().addAnimatedEntity(s);
} }
for (int i = 0; i < 3; i++) {
Spider spooda = new Spider();
spooda.setPosX((float) (Math.random() * 5 + 2));
getCurrentMap().addAnimatedEntity(spooda);
}
for (int i = 0; i < 1; i++) {
Rick astley = new Rick();
astley.setPosX((float) (Math.random() * 5 + 2));
getCurrentMap().addAnimatedEntity(astley);
}
} }
} }

View File

Before

Width:  |  Height:  |  Size: 444 B

After

Width:  |  Height:  |  Size: 444 B