public void InitialObject() { //level = "default"; if (GameObject.Find("Level") != null) { //Debug.Log("LEVEL EXIST 1111"); level = GameObject.Find("Level").tag.ToString(); //Debug.Log("LEVEL EXIST 2222"); } if (level == "Level4") { SpwanItemFrequency = 1f; boss.mute = true; //Debug.Log("LEVEL EXIST 3333"); } else if (level == "Level3") { boss.mute = false; boss.ActivateSkills(); SpwanItemFrequency = 2f; } else if (level == "Level2") { boss.mute = false; SpwanItemFrequency = 3f; } else { boss.mute = false; SpwanItemFrequency = 1.5f; } }
public void InitialObject() { //level = "default"; if (GameObject.Find("Level") != null) { //Debug.Log("LEVEL EXIST 1111"); level = GameObject.Find("Level").tag.ToString(); //Debug.Log("LEVEL EXIST 2222"); } if (level == "Level4") { SpwanItemFrequency = 10f; //Debug.Log("LEVEL EXIST 3333"); } else if (level == "Level3") { boss.ActivateSkills(); SpwanItemFrequency = 2f; } else if (level == "Level2") { SpwanItemFrequency = 3f; } else { SpwanItemFrequency = 4f; } //if (boss == null && GameObject.Find("Boss") != null) //{ // //Debug.Log("LEVEL EXIST 1111"); // boss = GameObject.Find("Boss").GetComponent<Boss>(); // //Debug.Log("LEVEL EXIST 2222"); //} //if (player == null && GameObject.Find("Player") != null) //{ // //Debug.Log("LEVEL EXIST 1111"); // player = GameObject.Find("Player").GetComponent<Player>(); // //Debug.Log("LEVEL EXIST 2222"); //} }