// Use this for initialization void Start() { audioSource = GetComponent <AudioSource>(); gameRunning = false; mm = MobaManager.instance; GenerateSmileysPool(); ShufflePool(); FillMap(); CheckCollision(); gameRunning = true; }
void Awake() { if (instance == null) { instance = this; } else if (instance != this) { Destroy(gameObject); } //DontDestroyOnLoad(gameObject); powerLbl = GameObject.Find("PowerValue"); enemyHpLbl = GameObject.Find("EnemyHPValue"); playerHpLbl = GameObject.Find("PlayerHPValue"); powerLbl.GetComponent <Text>().text = power.ToString(); enemyHpLbl.GetComponent <Text>().text = enemyHealth.ToString(); playerHpLbl.GetComponent <Text>().text = playerHealth.ToString(); }
// Use this for initialization void Start() { moba = MobaManager.instance; //FindObjectOfType(typeof(MobaManager)) as MobaManager; InvokeRepeating("enemyAI", 0, 1); InvokeRepeating("enemyCash", 0, 1); }