using UnityEngine;
using System.Collections;
public class score : MonoBehaviour {
private int scoreValue;
public GUIText guiScore;
private Transform Obstacle;
// Use this for initialization
void Start () {
Obstacle = transform;
scoreValue = 0;
guiScore.text = "Score: 0";
}
// Update is called once per frame
void Update () {
if (Obstacle.position.x <= -19.2 ){
scoreValue += 10;
guiScore.text = "Score: " + scoreValue;
this is what i have so far, it adds the points but instead of adding 10 everytime one of the obstacles past the x coordindate it keeps on adding ( think its becuz of the “<”) so i need help in only adding 10 when it “equals” that specific coordinate