-
-
Save alexson/0dc52e4212c27d38e1f7d6c75b89d08a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class GameVal | |
{ | |
public static GameControl gc; | |
} | |
public class GameControl : MonoBehaviour | |
{ | |
public int score; | |
public int scorePerExplosion = 300; | |
private void Awake() | |
{ | |
GameVal.gc = this; | |
} | |
void Start() | |
{ | |
Init(); | |
} | |
public void Init() | |
{ | |
score = 0; | |
} | |
public void AddScore() | |
{ | |
score += scorePerExplosion; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment