public void Effect(int[] form, int[] effectPosition, bool invisible, string speed) { if (speed == "Immediate") { Charge(form, effectPosition, invisible); } if (speed == "Heavy") { heavyInterface.Recieve(form, invisible); for (int j = 0; j < form.Length; j++) { UItable.UItable[form[j] - 1].GetComponent <Outline>().OutlineWidth = 10f; } for (int i = 0; i < effectPosition.Length; i++) { int p = effectPosition[i] - 1; UItable.UItable[form[p] - 1].GetComponent <Renderer>().material.color = Color.blue; if (effectDuration[form[p] - 1] == 0) { effectDuration[form[p] - 1] = duration + 3; } } } }
public void NullEffect(int[] form, bool invisible, string speed) { if (speed == "Immediate") { Normal(form, invisible, speed); } if (speed == "Heavy") { heavyInterface.Recieve(form, invisible); for (int i = 0; i < form.Length; i++) { UItable.UItable[form[i] - 1].GetComponent <Outline>().OutlineWidth = 10f; } } }
public void Effect(int[] form, int[] effectPosition, bool invisible, string speed) { switch (speed) { case "Immediate": if (invisible == true) { for (int j = 0; j < form.Length; j++) { UItable.UItable[form[j] - 1].GetComponent <Outline>().OutlineWidth = 10f; hidden[form[j] - 1] = true; } for (int i = 0; i < effectPosition.Length; i++) { int p = effectPosition[i] - 1; UItable.UItable[form[p] - 1].GetComponent <Renderer>().material.color = Color.green; if (effectDuration[form[p] - 1] == 0 || effectDuration[form[p] - 1] == duration + 2) { effectDuration[form[p] - 1] = duration; hidden[form[p] - 1] = true; } } } else { for (int j = 0; j < form.Length; j++) { table.table[form[j] - 1].GetComponent <Outline>().OutlineWidth = 10f; UItable.UItable[form[j] - 1].GetComponent <Outline>().OutlineWidth = 10f; } for (int i = 0; i < effectPosition.Length; i++) { int p = effectPosition[i] - 1; table.table[form[p] - 1].GetComponent <Renderer>().material.color = Color.green; UItable.UItable[form[p] - 1].GetComponent <Renderer>().material.color = Color.green; if (effectDuration[form[p] - 1] == 0 || effectDuration[form[p] - 1] == duration + 2) { effectDuration[form[p] - 1] = duration; } } } break; case "Heavy": heavyInterface.Recieve(form, invisible); for (int j = 0; j < form.Length; j++) { UItable.UItable[form[j] - 1].GetComponent <Outline>().OutlineWidth = 10f; } for (int i = 0; i < effectPosition.Length; i++) { int p = effectPosition[i] - 1; UItable.UItable[form[p] - 1].GetComponent <Renderer>().material.color = Color.green; if (effectDuration[form[p] - 1] == 0) { effectDuration[form[p] - 1] = duration + 2; } } break; } }