Hi guys. I am trying to implement a skip system in the source code, I already have all the formula and physics designed, however, for it to work I need to know which variable makes the player move, because so far I have not been able to find it. Here is the code:
Â
public float velY;
public float gravity;
public int JumpHeight;
public float JumpSpeed ;
public float deltatime = Globals.System.GetTimeMs ();
public float timeTopeak;
Â
Â
void startJump ()
{
   gravity = (float) (2 * JumpHeight /    Math.Pow (timeTopeak, 2);          JumpSpeed = gravity *              timeTopeak;
}
Â
public override bool Update ()Â
{
    velY + = gravity * deltatime * "var Move Down";
if (isGround ())
{
    velY = "var Move Down";
}
if (Controls.KeyDown(control.MoveUp) && IsGround () == true)
Question
xholdz
Hi guys. I am trying to implement a skip system in the source code, I already have all the formula and physics designed, however, for it to work I need to know which variable makes the player move, because so far I have not been able to find it. Here is the code:
Â
public float velY;
public float gravity;
public int JumpHeight;
public float JumpSpeed ;
public float deltatime = Globals.System.GetTimeMs ();
public float timeTopeak;
Â
Â
void startJump ()
{
   gravity = (float) (2 * JumpHeight /    Math.Pow (timeTopeak, 2);          JumpSpeed = gravity *              timeTopeak;
}
Â
public override bool Update ()Â
{
    velY + = gravity * deltatime * "var Move Down";
if (isGround ())
{
    velY = "var Move Down";
}
if (Controls.KeyDown(control.MoveUp) && IsGround () == true)
{
   yVel = JumpSpeed * "var Move Up";
}
Â
This is it.Â
Thanks for your attention.
Link to comment
Share on other sites
1 answer to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now