Question by
iHadigamer · Feb 13, 2019 at 06:11 PM ·
script.programminghighscore
I want to make a high score
and i have a problem at (score = null;)
using UnityEngine;
using UnityEngine.UI;
public class Column : MonoBehaviour
{
public float score;
public float Highscore;
private void OnTriggerEnter2D(Collider2D obj)
{
if (obj.GetComponent<Bird>() != null)
{
GameController.Instance.Score();
score = null;
}
}
private void HighScore()
{
if (Highscore < score)
{
Highscore = score;
}
}
}
Comment
Answer by xxmariofer · Feb 13, 2019 at 07:17 PM
score is a number and you cant assign a null to a number, what are you trying to achiev?
Your answer
Follow this Question
Related Questions
Hey guys I need help with scripting a 2 player car game I'm very confused on the whole process. 0 Answers
How can I make a button with three selections be random? 0 Answers
What is Coroutine, Yiel and IENumerator? 1 Answer
How to make the player die when hit the ground? 0 Answers
Map creator inside my game 0 Answers