P
Programmer13
Guest
I am a beginner at programing and making games{THIS IS MY FIRST CODE THAT I AM HAVING PROBLEM WITH}Please help--I AM USING UNITY VERSION 2018.3.0f2 personal and my visual studio version is 15.9.4
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class NewBehaviourScript : MonoBehaviour
{
public float MoveSpeed;
public float JumpHeight;
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
if (Input.GetKeyDown(KeyCode.Space));
{
Rigidbody2D.velocity = new Vector2(0, JumpHeight);
}
}
}
Continue reading...
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class NewBehaviourScript : MonoBehaviour
{
public float MoveSpeed;
public float JumpHeight;
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
if (Input.GetKeyDown(KeyCode.Space));
{
Rigidbody2D.velocity = new Vector2(0, JumpHeight);
}
}
}
Continue reading...