↧
Answer by mwbranna
void OnCollisionEnter2D(Collision2D coll) { if (coll.gameObject.tag == "Surface") { air = maxAir; //Is this what you are trying to do? } }
View ArticleAnswer by DFledermaus
The problem is line 23: var addair = air - 10; You're using 10 instead of maxair (which is 10, but that will cause problems if you ever decide to change maxair) but you also have them in the wrong...
View ArticleAnswer by mwbranna
void OnCollisionEnter2D(Collision2D coll) { if (coll.gameObject.tag == "Surface") { air = maxAir; //Is this what you are trying to do? } }
View ArticleAnswer by DFledermaus
The problem is line 23: var addair = air - 10; You're using 10 instead of maxair (which is 10, but that will cause problems if you ever decide to change maxair) but you also have them in the wrong...
View Article