Buns have multiplied

Co-authored-by: r3cp3ct <45179536+r3cp3ct@users.noreply.github.com>
Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
main
unknown 3 years ago
parent df637104a2
commit 86aaee86cc
  1. BIN
      maps/world1.map
  2. BIN
      sprites/bluegirl_stand.gif
  3. BIN
      sprites/bluegirl_walk.gif
  4. BIN
      sprites/bunnygirls.zip
  5. BIN
      sprites/greengirl_stand.gif
  6. BIN
      sprites/greengirl_walk.gif
  7. BIN
      sprites/redgirl_stand.gif
  8. BIN
      sprites/redgirl_walk.gif
  9. BIN
      sprites/yellowgirl_stand.gif
  10. BIN
      sprites/yellowgirl_walk.gif
  11. 8
      src/sig/engine/Sprite.java
  12. 13
      src/sig/map/DataTile.java
  13. 80
      src/sig/objects/BunnyGirls.java
  14. 3
      src/sig/objects/Erinoah.java
  15. 27
      src/sig/objects/enemies/BlueBun.java
  16. 29
      src/sig/objects/enemies/GreenBun.java
  17. 26
      src/sig/objects/enemies/RedBun.java
  18. 29
      src/sig/objects/enemies/YellowBun.java
  19. 4
      src/sig/objects/weapons/KnifeSwing.java

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1021 B

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1004 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 988 B

@ -27,6 +27,14 @@ public class Sprite{
public static AnimatedSprite ERINA_SLIDE1 = new AnimatedSprite(new File(new File("..","sprites"),"erina_slide1.gif"),32,32);
public static AnimatedSprite ERINA_SLIDE = new AnimatedSprite(new File(new File("..","sprites"),"erina_slide.gif"),32,32);
public static AnimatedSprite KNIFE_SWING = new AnimatedSprite(new File(new File("..","sprites"),"knife-swing.gif"),32,32);
public static AnimatedSprite RED_STAND = new AnimatedSprite(new File(new File("..","sprites"),"redgirl_stand.gif"),32,32);
public static AnimatedSprite RED_WALK = new AnimatedSprite(new File(new File("..","sprites"),"redgirl_walk.gif"),32,32);
public static AnimatedSprite BLUE_STAND = new AnimatedSprite(new File(new File("..","sprites"),"bluegirl_stand.gif"),32,32);
public static AnimatedSprite BLUE_WALK = new AnimatedSprite(new File(new File("..","sprites"),"bluegirl_walk.gif"),32,32);
public static AnimatedSprite YELLOW_STAND = new AnimatedSprite(new File(new File("..","sprites"),"yellowgirl_stand.gif"),32,32);
public static AnimatedSprite YELLOW_WALK = new AnimatedSprite(new File(new File("..","sprites"),"yellowgirl_walk.gif"),32,32);
public static AnimatedSprite GREEN_STAND = new AnimatedSprite(new File(new File("..","sprites"),"greengirl_stand.gif"),32,32);
public static AnimatedSprite GREEN_WALK = new AnimatedSprite(new File(new File("..","sprites"),"greengirl_walk.gif"),32,32);

@ -3,14 +3,19 @@ package sig.map;
import sig.engine.String;
import sig.events.Event;
import sig.events.SpawnEvent;
import sig.objects.enemies.BlueBun;
import sig.objects.Erinoah;
import sig.objects.enemies.GreenBun;
import sig.objects.enemies.RedBun;
import sig.objects.enemies.YellowBun;
public enum DataTile {
NULL, //File is populated by 0s by default. This represents nothing.
BUN1(new SpawnEvent("Spawns a blue bun",Erinoah.class)),
BUN2(new SpawnEvent("Spawns a green bun",Erinoah.class)),
BUN3(new SpawnEvent("Spawns a yellow bun",Erinoah.class)),
BUN4(new SpawnEvent("Spawns a red bun",Erinoah.class));
BUN0(new SpawnEvent("Spawns an Erinoa bun",Erinoah.class)),
BUN1(new SpawnEvent("Spawns a red bun",RedBun.class)),
BUN2(new SpawnEvent("Spawns a blue bun",BlueBun.class)),
BUN3(new SpawnEvent("Spawns a yellow bun",YellowBun.class)),
BUN4(new SpawnEvent("Spawns a green bun",GreenBun.class));
String description;
Event event;

@ -0,0 +1,80 @@
package sig.objects;
import sig.engine.AnimatedSprite;
import sig.engine.Panel;
import sig.engine.Rectangle;
import sig.engine.Transform;
import sig.objects.actor.PhysicsObject;
public class BunnyGirls extends PhysicsObject{
double lastMoved = 0;
double lastJumped = 0;
boolean moveDir = false;
double moveTimer = 0;
protected BunnyGirls(AnimatedSprite spr, double animationSpd, Panel panel) {
super(spr, animationSpd, panel);
}
@Override
public void update(double updateMult) {
super.update(updateMult);
lastMoved+=updateMult;
lastJumped+=updateMult;
if (lastMoved>5) {
switch ((int)(Math.random()*3)) {
case 0:{
moveDir=true;
moveTimer=Math.random()*3;
}break;
case 1:{
moveDir=false;
moveTimer=Math.random()*3;
}break;
}
lastMoved=0;
}
if (lastJumped>3) {
if (Math.random()<=0.4&&jumpCount>0) {
y_velocity = jump_velocity;
jumpCount--;
lastJumped=2.5+Math.random()*0.5;
lastMoved=4.5+Math.random()*0.5;
} else {
lastJumped=0;
}
}
moveTimer-=updateMult;
}
@Override
public boolean rightKeyHeld() {
return moveTimer>0&&moveDir;
}
@Override
public boolean leftKeyHeld() {
return moveTimer>0&&!moveDir;
}
@Override
public Rectangle setCollisionBounds() {
return new Rectangle(10,6,12,25);
}
@Override
public boolean isFriendlyObject() {
return false;
}
@Override
public void draw(byte[] p) {
}
@Override
public Transform getSpriteTransform() {
return moveDir?Transform.HORIZONTAL:Transform.NONE;
}
}

@ -4,10 +4,7 @@ import sig.RabiClone;
import sig.engine.Rectangle;
import sig.engine.Sprite;
import sig.engine.Transform;
import sig.engine.objects.AnimatedObject;
import sig.objects.actor.PhysicsObject;
import sig.objects.actor.RenderedObject;
import sig.objects.weapons.KnifeSwing;
public class Erinoah extends PhysicsObject{

@ -0,0 +1,27 @@
package sig.objects.enemies;
import sig.RabiClone;
import sig.engine.Sprite;
import sig.objects.BunnyGirls;
import sig.objects.actor.PhysicsObject;
public class BlueBun extends BunnyGirls{
public BlueBun(double x, double y) {
super(Sprite.BLUE_STAND, 6.5, RabiClone.p);
setX(x);
setY(y);
setAccelerationLimits(100, 100);
setVelocityLimits(500, 500);
setGroundDrag(2000);
setGroundFriction(PhysicsObject.NORMAL_FRICTION);
setAirDrag(800);
setAirFriction(180);
setSlidingVelocity(164);
setSlidingAcceleration(120);
setJumpVelocity(PhysicsObject.NORMAL_JUMP_VELOCITY);
setGravity(950);
}
}

@ -0,0 +1,29 @@
package sig.objects.enemies;
import sig.RabiClone;
import sig.engine.AnimatedSprite;
import sig.engine.Panel;
import sig.engine.Sprite;
import sig.objects.BunnyGirls;
import sig.objects.actor.PhysicsObject;
public class GreenBun extends BunnyGirls{
public GreenBun(double x, double y) {
super(Sprite.GREEN_STAND, 6.5, RabiClone.p);
setX(x);
setY(y);
setAccelerationLimits(100, 100);
setVelocityLimits(500, 500);
setGroundDrag(2000);
setGroundFriction(PhysicsObject.NORMAL_FRICTION);
setAirDrag(800);
setAirFriction(180);
setSlidingVelocity(164);
setSlidingAcceleration(120);
setJumpVelocity(PhysicsObject.NORMAL_JUMP_VELOCITY);
setGravity(1550);
}
}

@ -0,0 +1,26 @@
package sig.objects.enemies;
import sig.RabiClone;
import sig.engine.Sprite;
import sig.objects.BunnyGirls;
import sig.objects.actor.PhysicsObject;
public class RedBun extends BunnyGirls{
public RedBun(double x, double y) {
super(Sprite.RED_STAND, 6.5, RabiClone.p);
setX(x);
setY(y);
setAccelerationLimits(100, 100);
setVelocityLimits(500, 500);
setGroundDrag(2000);
setGroundFriction(PhysicsObject.NORMAL_FRICTION);
setAirDrag(800);
setAirFriction(180);
setSlidingVelocity(164);
setSlidingAcceleration(120);
setJumpVelocity(PhysicsObject.NORMAL_JUMP_VELOCITY);
setGravity(750);
}
}

@ -0,0 +1,29 @@
package sig.objects.enemies;
import sig.RabiClone;
import sig.engine.AnimatedSprite;
import sig.engine.Panel;
import sig.engine.Sprite;
import sig.objects.BunnyGirls;
import sig.objects.actor.PhysicsObject;
public class YellowBun extends BunnyGirls{
public YellowBun(double x, double y) {
super(Sprite.YELLOW_STAND, 6.5, RabiClone.p);
setX(x);
setY(y);
setAccelerationLimits(100, 100);
setVelocityLimits(500, 500);
setGroundDrag(2000);
setGroundFriction(PhysicsObject.NORMAL_FRICTION);
setAirDrag(800);
setAirFriction(180);
setSlidingVelocity(164);
setSlidingAcceleration(120);
setJumpVelocity(PhysicsObject.NORMAL_JUMP_VELOCITY);
setGravity(150);
}
}

@ -40,12 +40,12 @@ public class KnifeSwing extends AttachableObject{
if(pobj.state!=State.STAGGER){
if(getSpriteTransform()==Transform.NONE){
pobj.staggerDuration=0.3;
pobj.x_velocity = -300;
pobj.x_velocity = -500;
pobj.y_velocity = -300;
pobj.state = State.STAGGER;
}else{
pobj.staggerDuration=0.3;
pobj.x_velocity = 300;
pobj.x_velocity = 500;
pobj.y_velocity = -300;
pobj.state = State.STAGGER;
}

Loading…
Cancel
Save