Right now my code to make the score go up by 1 is:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class Score : MonoBehaviour {
public Text scoreText;
public int scoreIncreasesBy = 1;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
if (Input.GetAxis("Jump") == 1)
{
scoreText.text = "Score:" + scoreIncreasesBy.ToString();
}
}
}
But the score only goes up when I first press space. It is meant to go up whenever you press space.
Please help.