From 8d30600d78d66960a6695d09a0ffffe7dd4484f2 Mon Sep 17 00:00:00 2001 From: unknown <45179536+r3cp3ct@users.noreply.github.com> Date: Sat, 18 Jun 2022 12:20:18 +0300 Subject: [PATCH] Buns do not spawn in walls now Co-authored-by: r3cp3ct <45179536+r3cp3ct@users.noreply.github.com> Co-authored-by: sigonasr2 --- src/sig/objects/BunnyGirls.java | 4 +++- src/sig/objects/enemies/BlueBun.java | 2 +- src/sig/objects/enemies/GreenBun.java | 2 +- src/sig/objects/enemies/RedBun.java | 2 +- src/sig/objects/enemies/YellowBun.java | 2 +- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/sig/objects/BunnyGirls.java b/src/sig/objects/BunnyGirls.java index 7a02106..a6f76ca 100644 --- a/src/sig/objects/BunnyGirls.java +++ b/src/sig/objects/BunnyGirls.java @@ -8,13 +8,15 @@ import sig.objects.actor.PhysicsObject; public class BunnyGirls extends PhysicsObject{ + AnimatedSprite walkingSprite; double lastMoved = 0; double lastJumped = 0; boolean moveDir = false; double moveTimer = 0; - protected BunnyGirls(AnimatedSprite spr, double animationSpd, Panel panel) { + protected BunnyGirls(AnimatedSprite spr,AnimatedSprite walkingSpr, double animationSpd, Panel panel) { super(spr, animationSpd, panel); + this.walkingSprite=walkingSpr; } @Override diff --git a/src/sig/objects/enemies/BlueBun.java b/src/sig/objects/enemies/BlueBun.java index f6b359b..f8f4f27 100644 --- a/src/sig/objects/enemies/BlueBun.java +++ b/src/sig/objects/enemies/BlueBun.java @@ -8,7 +8,7 @@ import sig.objects.actor.PhysicsObject; public class BlueBun extends BunnyGirls{ public BlueBun(double x, double y) { - super(Sprite.BLUE_STAND, 6.5, RabiClone.p); + super(Sprite.BLUE_STAND,Sprite.BLUE_WALK, 6.5, RabiClone.p); setX(x); setY(y); setAccelerationLimits(100, 100); diff --git a/src/sig/objects/enemies/GreenBun.java b/src/sig/objects/enemies/GreenBun.java index 95da347..31d283b 100644 --- a/src/sig/objects/enemies/GreenBun.java +++ b/src/sig/objects/enemies/GreenBun.java @@ -8,7 +8,7 @@ import sig.objects.actor.PhysicsObject; public class GreenBun extends BunnyGirls{ public GreenBun(double x, double y) { - super(Sprite.GREEN_STAND, 6.5, RabiClone.p); + super(Sprite.GREEN_STAND,Sprite.GREEN_WALK, 6.5, RabiClone.p); setX(x); setY(y); setAccelerationLimits(100, 100); diff --git a/src/sig/objects/enemies/RedBun.java b/src/sig/objects/enemies/RedBun.java index e96d6a7..911a5cd 100644 --- a/src/sig/objects/enemies/RedBun.java +++ b/src/sig/objects/enemies/RedBun.java @@ -8,7 +8,7 @@ import sig.objects.actor.PhysicsObject; public class RedBun extends BunnyGirls{ public RedBun(double x, double y) { - super(Sprite.RED_STAND, 6.5, RabiClone.p); + super(Sprite.RED_STAND,Sprite.RED_WALK, 6.5, RabiClone.p); setX(x); setY(y); setAccelerationLimits(100, 100); diff --git a/src/sig/objects/enemies/YellowBun.java b/src/sig/objects/enemies/YellowBun.java index 5281ef9..0f1ae49 100644 --- a/src/sig/objects/enemies/YellowBun.java +++ b/src/sig/objects/enemies/YellowBun.java @@ -8,7 +8,7 @@ import sig.objects.actor.PhysicsObject; public class YellowBun extends BunnyGirls{ public YellowBun(double x, double y) { - super(Sprite.YELLOW_STAND, 6.5, RabiClone.p); + super(Sprite.YELLOW_STAND,Sprite.YELLOW_WALK, 6.5, RabiClone.p); setX(x); setY(y); setAccelerationLimits(100, 100);