void handleHeatReaction() { if (call.getheatReaction() == "smoke") { heatReaction = Instantiate(Resources.Load("SmokeEffect") as GameObject, new Vector3(-6f, 9f, -23f), transform.rotation); } else if (call.getheatReaction() == "white explosion") { heatReaction = Instantiate(Resources.Load("WhiteExplosion") as GameObject, new Vector3(-6f, 9f, -23f), transform.rotation); } else if (call.getheatReaction() == "sparks") { heatReaction = Instantiate(Resources.Load("Flare") as GameObject, new Vector3(-6f, 9f, -23f), transform.rotation); } }
void handleHeatReaction() { if (call.getheatReaction() == "smoke") { //heatReaction = Instantiate(Resources.Load("SmokeEffect") as GameObject, new Vector3(-6f,9f,-23f),transform.rotation); Instantiate(heatReaction, new Vector3(-6f, 9f, -23f), transform.rotation); } }
// Use this for initialization public void callHeatReaction() { // LoadClassroom.getmixElementB (); call = GameObject.Find("GameObject").GetComponent <LoadClassroom>(); //heatReaction =GameObject.FindGameObjectWithTag("heatReaction"); print("Heat Reaction is : " + call.getheatReaction()); handleHeatReaction(); }