Increase acceleration value and max speed.

Co-authored-by: r3cp3ct <45179536+r3cp3ct@users.noreply.github.com>
Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
main
sigonasr2, Sig, Sigo 3 years ago committed by GitHub
parent d296527e2f
commit 17953e0589
  1. BIN
      bin/RabiClone.jar
  2. 6
      src/sig/engine/String.java
  3. 3
      src/sig/objects/LevelRenderer.java
  4. 10
      src/sig/objects/Player.java

Binary file not shown.

@ -17,8 +17,12 @@ public class String{
this.sb=new StringBuilder(obj.toString());
updateBounds(obj.toString());
}
public String(double d) {
this.sb=new StringBuilder(Double.toString(d));
updateBounds(Double.toString(d));
}
public String append(char c) {
this.sb.append(c);
this.sb=new StringBuilder(c);
updateBounds(Character.toString(c));
return this;
}

@ -3,10 +3,12 @@ package sig.objects;
import sig.RabiClone;
import sig.engine.Alpha;
import sig.engine.AnimatedObject;
import sig.engine.Font;
import sig.engine.Object;
import sig.engine.Panel;
import sig.engine.Sprite;
import sig.engine.Transform;
import sig.engine.String;
import sig.map.Background;
import sig.map.Map;
import sig.map.Tile;
@ -40,6 +42,7 @@ public class LevelRenderer extends Object{
if (RabiClone.player!=null) {
Draw_Animated_Object(RabiClone.player,RabiClone.player.facing_direction?Transform.HORIZONTAL:Transform.NONE);
}
Draw_Text(4,4,new String(RabiClone.player.x_velocity),Font.PROFONT_12);
}
@Override

@ -32,7 +32,7 @@ public class Player extends AnimatedObject{
double y_velocity = 5;
double y_velocity_limit = 500;
double sliding_velocity = 164;
double sliding_acceleration = 60;
double sliding_acceleration = 120;
double horizontal_drag = 2000;
double horizontal_friction = NORMAL_FRICTION;
@ -159,7 +159,6 @@ public class Player extends AnimatedObject{
if (KeyHeld(Action.JUMP)&&System.currentTimeMillis()-spacebarPressed<jumpHoldTime) {
y_velocity=jump_velocity;
}
//System.out.println(state);
}
@ -440,5 +439,12 @@ public class Player extends AnimatedObject{
@Override
public void draw(byte[] p) {}
@Override
public String toString() {
return "Player [facing_direction=" + (facing_direction?"RIGHT":"LEFT") + ", groundCollision=" + groundCollision + ", jumpCount="
+ jumpCount + ", x_velocity=" + x_velocity + ", y_velocity=" + y_velocity + ", x=" + getX() + ", y=" + getY() + "]";
}
}

Loading…
Cancel
Save