Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Blog
Double Jump and Wall Jump
//Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static void Main(string[] args) { if(!onLeftWall && !onRightWall){ if (onGround) { hasJumped = false; hasDoubleJumped = false; } if (keyPressed && !hasJumped) { hasJumped = true; OnJump(); Console.WriteLine("Jump"); } if (keyPressed && !hasDoubleJumped) { if (hasJumped) { hasDoubleJumped = true; OnJump(); Console.WriteLine("DoubleJump"); } } } if (onLeftWall) { hasWallJumped = false; if (!hasWallJumped) { if (keyPressed) { hasWallJumped = true; LeftWallJump(); Console.WriteLine("LeftWallJump"); } } } if (onRightWall) { hasWallJumped = false; if (!hasWallJumped) { if (keyPressed) { hasWallJumped = true; RightWallJump(); Console.WriteLine("RightWallJump"); } } } } } }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
Easy prgm
jjj3
multiplyarr
generics one more doubt-stack overflow exception
Program
congtodien
Planet-D
Hello
Get missed element in integer collection
dfdfdff
Please log in to post a comment.