public void See() { tutorial.isDone[20] = true; whichone = other.GetCurrentSnappedObject(); if (whichone.name.Contains("Orange")) { firework1.SetActive(true); } else if (whichone.name.Contains("Pink")) { firework2.SetActive(true); } else if (whichone.name.Contains("Blue")) { firework4.SetActive(true); } else if (whichone.name.Contains("Hong")) { firework3.SetActive(true); } else if (whichone.name.Contains("Lv")) { firework6.SetActive(true); } else if (whichone.name.Contains("Lan")) { firework5.SetActive(true); } }
void Update() { if (boxSnap.GetCurrentSnappedObject() != null && boxSnap.GetCurrentSnappedObject().CompareTag("WoodenBox")) { previouslySnapped = boxSnap.GetCurrentSnappedObject(); boxCounter++; invisible = GameObject.Find("InvisibleBox" + boxCounter.ToString()); invisible.GetComponent <Collider>().enabled = true; invisible.GetComponent <MeshRenderer>().enabled = true; Destroy(previouslySnapped); GetComponent <Collider>().enabled = false; if (!BoxStackingSound.isPlaying) { BoxStackingSound.Play(); } if (boxCounter < 5) { GameObject.Find("WoodenSnapZone" + boxCounter.ToString()).GetComponent <Collider>().enabled = true; } } }
public void See() { whichone = other.GetCurrentSnappedObject(); GameObject up = whichone.transform.GetChild(1).GetChild(1).gameObject; GameObject lable1 = whichone.transform.GetChild(0).GetChild(2).gameObject; GameObject lable2 = whichone.transform.GetChild(0).GetChild(3).gameObject; whichone.GetComponent <SphereCollider>().isTrigger = true; up.SetActive(false); lable1.SetActive(true); lable2.SetActive(true); }
public void See() { tutorial.isDone[32] = true; whichone = dropzone2.GetCurrentSnappedObject(); kind = whichone.transform.childCount - 1; up = whichone.transform.GetChild(0).GetChild(1).gameObject; up.SetActive(false); whichone.GetComponent <SphereCollider>().isTrigger = true; label1 = whichone.transform.GetChild(1).gameObject; label1.SetActive(true); if (kind == 2) { label2 = whichone.transform.GetChild(2).gameObject; label2.SetActive(true); } else if (kind == 3) { label2 = whichone.transform.GetChild(2).gameObject; label2.SetActive(true); label3 = whichone.transform.GetChild(3).gameObject; label3.SetActive(true); } }
public void See() { whichone = other.GetCurrentSnappedObject(); tutorial.isDone[2] = true; if (whichone.name.Contains("Orange")) { temp = Instantiate(firework1); } else if (whichone.name.Contains("Pink")) { Debug.Log("??????"); temp = Instantiate(firework2, new Vector3(0, 0, 0), Quaternion.identity); } else if (whichone.name.Contains("Blue")) { temp = Instantiate(firework3, new Vector3(-5f, 10, 0), Quaternion.identity); } else if (whichone.name.Contains("Green")) { temp = Instantiate(firework4, new Vector3(-3.714f, 10, 1.077f), Quaternion.identity); } else if (whichone.name.Contains("Hong")) { temp = Instantiate(firework5, new Vector3(-3.714f, 10, 1.077f), Quaternion.identity); } else if (whichone.name.Contains("Lv")) { temp = Instantiate(firework6, new Vector3(-3.714f, 10, 1.077f), Quaternion.identity); } else if (whichone.name.Contains("Lan")) { //var particle = temp.transform.Find("outer").GetComponent<ParticleSystem>(); //var timecolor = particle.colorOverLifetime; //timecolor.color = Color.blue; temp = Instantiate(firework7, new Vector3(0, 0, 0), Quaternion.identity); } }