// Use this for initialization void Start(List <CombinationHandler.Button> combination, int nbrGold, Vector3 position) { Combination = combination; NbrGold = nbrGold; Position = position; Gm = Tutorial_GameManager.instance; }
void Awake() { //Check if instance already exists if (instance == null) { //if not, set instance to this instance = this; } //If instance already exists and it's not this: else if (instance != this) { //Then destroy this. This enforces our singleton pattern, meaning there can only ever be one instance of a GameManager. Destroy(gameObject); } Pause = true; Combination = GetComponent <CombinationHandler>(); WaveManager = GetComponent <Tutorial_WaveManager>(); }
void Start() { GM = Tutorial_GameManager.instance; GetComponent <RectTransform>().sizeDelta = new Vector2(Screen.width / 6, Screen.height / 4); }
private string PrintScore = null; //print score text in gamescene string void Start() { GM = Tutorial_GameManager.instance; //Camera.main.GetComponent<GameManager> ();//Get GameManeger script from main camera's GameManeger script }
private string PrintGold = null; //print life text in gamescene string Later it change image ofr sprite void Start() { GM = Tutorial_GameManager.instance; }
// Use this for initialization void Start() { GM = Tutorial_GameManager.instance; animator = transform.GetComponentInChildren <Animator>(); audioSource = GetComponent <AudioSource>(); }
void Start() { Position = GetComponent <Transform>().position; Gm = Tutorial_GameManager.instance; }
private string PrintCombo = null; //print combo text in gamescene string void Start() { GM = Tutorial_GameManager.instance;//Get GameManeger script from main camera's GameManeger script }