Click here to Skip to main content
15,398,501 members
Home / Discussions / C#
   

C#

 
GeneralRe: TLS 1.3 on Windows Vista Pin
dan!sh 2-May-22 21:17
professional dan!sh 2-May-22 21:17 
QuestionClickOne Installation folder in the user pc Pin
Luis M. Rojas20-Apr-22 6:26
MemberLuis M. Rojas20-Apr-22 6:26 
AnswerRe: ClickOne Installation folder in the user pc Pin
Dave Kreskowiak20-Apr-22 6:33
mveDave Kreskowiak20-Apr-22 6:33 
GeneralRe: ClickOne Installation folder in the user pc Pin
Luis M. Rojas20-Apr-22 9:55
MemberLuis M. Rojas20-Apr-22 9:55 
GeneralRe: ClickOne Installation folder in the user pc Pin
Dave Kreskowiak20-Apr-22 9:56
mveDave Kreskowiak20-Apr-22 9:56 
QuestionNEED HELP- ERROR (71,10): error CS1513: } expected) Pin
Joana Gonçalves 202220-Apr-22 3:22
MemberJoana Gonçalves 202220-Apr-22 3:22 
AnswerRe: NEED HELP- ERROR (71,10): error CS1513: } expected) Pin
Dave Kreskowiak20-Apr-22 3:51
mveDave Kreskowiak20-Apr-22 3:51 
AnswerRe: NEED HELP- ERROR (71,10): error CS1513: } expected) Pin
Raphael Adeniji26-Apr-22 8:18
MemberRaphael Adeniji26-Apr-22 8:18 
Hi Joana,

You need one more } to close the class. Add it to the end of your class.

See Sample below:-

//==================================================================================

public class moviment1 : MonoBehaviour
{
public float Speed;
public float JumpForce;

public bool isJumping;
public bool doubleJump;

private Rigidbody2D rig;

// Start is called before the first frame update
void Start()
{
rig = GetComponent<Rigidbody2D>();
}

// Update is called once per frame
void Update()
{
Move();
Jump();
}
// MOVE

void Move()
{
Vector3 movement = new Vector3(Input.GetAxis("Horizontal"), 0.0f, 0.0f);
transform.position += movement * Time.deltaTime * Speed;
}

// JUMP
void Jump()
{
if (Input.GetButtonDown("Jump"))
{
if (!isJumping)
{

rig.AddForce(new Vector2(0.0f, JumpForce), ForceMode2D, Impulse);
doubleJump = true;
}
else
{
if (doubleJump)
{
rig.AddForce(new Vector2(0.0f, JumpForce), ForceMode2D, Impulse);
doubleJump = false;
}
}
}
}
void OnCollisionEnter2D(Collision2D collision)
{
if (collision.gameObject.layer == 8)
{
isJumping = false;
}
}
void OnCollisionExit2D(Collision2D collision)
{
if (collision.gameObject.layer == 8)
{

isJumping = true;
}

}
}
QuestionWindows.Devices.HumanInterfaceDevice Pin
Member 1556267619-Apr-22 4:29
MemberMember 1556267619-Apr-22 4:29 
AnswerRe: Windows.Devices.HumanInterfaceDevice Pin
OriginalGriff19-Apr-22 6:52
mveOriginalGriff19-Apr-22 6:52 
Rant[REPOST] Windows.Devices.HumanInterfaceDevice Pin
Richard Deeming19-Apr-22 21:24
mveRichard Deeming19-Apr-22 21:24 
QuestionC# - How to capture when a user presses the "X" in the upper right corner Pin
Richard A Knox18-Apr-22 7:19
MemberRichard A Knox18-Apr-22 7:19 
AnswerRe: C# - How to capture when a user presses the "X" in the upper right corner Pin
Victor Nijegorodov18-Apr-22 7:30
MemberVictor Nijegorodov18-Apr-22 7:30 
AnswerRe: C# - How to capture when a user presses the "X" in the upper right corner Pin
Richard MacCutchan18-Apr-22 8:16
mveRichard MacCutchan18-Apr-22 8:16 
QuestionStart the Windows form app from Window service Pin
Member 1481278615-Apr-22 21:29
MemberMember 1481278615-Apr-22 21:29 
AnswerRe: Start the Windows form app from Window service Pin
OriginalGriff15-Apr-22 21:43
mveOriginalGriff15-Apr-22 21:43 
AnswerRe: Start the Windows form app from Window service Pin
Gerry Schmitz16-Apr-22 6:03
mveGerry Schmitz16-Apr-22 6:03 
QuestionAccessing one of many possible objects passed to a function Pin
TNCaver15-Apr-22 11:24
MemberTNCaver15-Apr-22 11:24 
AnswerRe: Accessing one of many possible objects passed to a function Pin
Tony Hill15-Apr-22 21:02
mveTony Hill15-Apr-22 21:02 
GeneralRe: Accessing one of many possible objects passed to a function Pin
TNCaver17-Apr-22 11:16
MemberTNCaver17-Apr-22 11:16 
AnswerRe: Accessing one of many possible objects passed to a function Pin
Mycroft Holmes16-Apr-22 12:56
professionalMycroft Holmes16-Apr-22 12:56 
GeneralRe: Accessing one of many possible objects passed to a function Pin
TNCaver17-Apr-22 11:18
MemberTNCaver17-Apr-22 11:18 
AnswerClarification Pin
TNCaver17-Apr-22 11:14
MemberTNCaver17-Apr-22 11:14 
GeneralRe: Clarification Pin
Mycroft Holmes17-Apr-22 12:10
professionalMycroft Holmes17-Apr-22 12:10 
GeneralRe: Clarification Pin
TNCaver17-Apr-22 14:16
MemberTNCaver17-Apr-22 14:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.