following along with a book and whats supposed to happen is the two variables numbers are supposed to add together when i press return/enter. but nothing is happening can someone tell me what i did wrong?
using UnityEngine;
using System.Collections;
public class LearningScript : MonoBehaviour
{
public int balls = 19;
public int number1 = 9;
public int number2 = 2;
// Use this for initialization
void Start () {
Debug.Log(2 + 9);
Debug.Log(11 + balls);
}
// Update is called once per frame
void Update () {
if(Input.GetKeyUp(KeyCode.Return))
AddTwoNumbers();
}
void AddTwoNumbers()
{
Debug.Log (number1 + number2);
}
}