public void lightDeactivate(bodyPart part) { Light[] light = new Light[] { }; if (lightDictionary.TryGetValue(part, out light)) { lightDeactivate(light); } }
public void lightUnselect(bodyPart part) { Light[] light = new Light[] { }; if (lightDictionary.TryGetValue(part, out light)) { lightUnselect(light); } }
void onExplode() { // Destroy(gameObject); gameObject.SetActive(false); var t = transform; for (int i = 0; i < parts; i++) { t.TransformPoint(0, -100, 0); bodyPart clone = Instantiate(bodyPart, t.position, Quaternion.identity) as bodyPart; clone.GetComponent <Rigidbody2D>().AddForce(Vector3.right * Random.Range(-50, 50)); clone.GetComponent <Rigidbody2D>().AddForce(Vector3.up * Random.Range(100, 400)); } gameObject.transform.position = gameObject_with_intial_postion.transform.position; gameObject.SetActive(true); // manager.restart_position_for_pikachu(); }
public void remove(bodyPart part, symptom sym) { List <symptom> tempList = new List <symptom> (); if (symptomsList.TryGetValue(part, out tempList)) { if (tempList.Contains(sym)) { symptomsList.Remove(part); tempList.Remove(sym); if (tempList.Count != 0) { symptomsList.Add(part, tempList); } } } //else should be an error refresh(); }
public void add(bodyPart part, symptom sym) { List <symptom> tempList = new List <symptom> (); if (symptomsList.TryGetValue(part, out tempList)) { if (!tempList.Contains(sym)) { symptomsList.Remove(part); tempList.Add(sym); symptomsList.Add(part, tempList); } } else { tempList = new List <symptom>() { sym }; symptomsList.Add(part, tempList); } refresh(); }
public void setPart(bodyPart part) { // Set current part to unselected // Set new part to selected lManag.lightSelect(part); lManag.lightUnselect(currentPart); // Store current selection list if part != currentPart // Load new selected Symptoms if (part != currentPart) { symptomToggles.Remove(currentPart); symptomToggles.Add(currentPart, selectedSymptoms); if (!symptomToggles.TryGetValue(part, out selectedSymptoms)) { selectedSymptoms = new List <symptom>() { }; } currentPart = part; } createList(); }
public string getName(bodyPart part) { //TODO: Check for missing translation return(bodyTranslations[(int)currentLanguage, (int)part]); }