I’ve been doing the “Roll a ball” tutorial, and i thought i had done everything as it needed to be. But it keeps nagging me about 3 errors. If anyone please can explain to me what i’ve done wrong, i’d really appreciate it.
using UnityEngine.UI;
using System.Collections;
public class PlayerController : MonoBehaviour
{
public float speed;
public Text countText;
private int count;
void start ()
{
count = 0;
SetCountText ()
}
void FixedUpdate ()
{
float moveHorizontal = Input.GetAxis ("Horizontal");
float moveVertical = Input.GetAxis ("Vertical");
Vector3 movement = new Vector3 (moveHorizontal, 0.0f, moveVertical);
rigidbody.AddForce (movement * speed * Time.deltaTime);
}
void OnTriggerEnter(Collider other)
{
if(other.gameObject.tag == "Pickup")
{
other.gameObject.SetActive(false);
count = count + 1;
SetCountText ()
}
}
void SetCountText ()
{
countText.text = "Count" + count.ToString ();
}
}