void OnEnable() { Special current = Party.GetPlayer().GetSpecial(); gameObject.GetComponentInChildren <Text>().text = current.GetName(); special = current; if (Party.GetSP() < current.GetCost() || Party.GetPlayer().status.asleep > 0 || Party.GetPlayer().status.stunned > 0) { gameObject.GetComponent <Button>().interactable = false; } else { gameObject.GetComponent <Button>().interactable = true; } }
public void SpecialSelects() { Special special = useItemMenu.GetComponent <PartyMenu>().currentSpecial; Party.UseSP(special.GetCost()); TimedMethod[] moves = special.UseSelects(useItemMenu.GetComponent <PartyMenu>().ConfirmCharacter()); foreach (TimedMethod m in moves) { methodQueue.Enqueue(m); } methodQueue.Enqueue(new TimedMethod(2, "EndTurn")); useItemMenu.GetComponent <PartyMenu>().currentSpecial = null; useItemMenu.SetActive(false); largeMenuHides.SetActive(true); }
void OnEnable() { Special current = Party.GetPlayer().GetSpecial(); label.text = current.GetName(); special = current; if (Party.GetSP() < current.GetCost() || Party.GetPlayer().status.asleep > 0 || Party.GetPlayer().status.stunned > 0) { button.interactable = false; } else { button.interactable = true; } }
public void SupportSpecial(Special special, int index) { if (special.selects) { useItemMenu.SetActive(true); specialMenu.SetActive(false); largeMenuHides.SetActive(false); useItemMenu.GetComponent <PartyMenu>().currentSpecial = special; usingSpecial = true; } else { TimedMethod[] specialMethods = special.UseSupport(index); foreach (TimedMethod m in specialMethods) { methodQueue.Enqueue(m); } menu.SetActive(false); methodQueue.Enqueue(new TimedMethod(2, "EndTurn")); Party.UseSP(special.GetCost()); specialMenu.SetActive(false); } }
public void SpecialSelects() { Special special = useItemMenu.GetComponent <PartyMenu>().currentSpecial; Party.UseSP(special.GetCost()); TimedMethod[] moves = special.UseSelects(useItemMenu.GetComponent <PartyMenu>().ConfirmCharacter()); //foreach (TimedMethod m in moves) { //methodQueue.Enqueue(m); //} //methodQueue.Enqueue(new TimedMethod(2, "EndTurn")); useItemMenu.GetComponent <PartyMenu>().currentSpecial = null; useItemMenu.SetActive(false); nextMenu.SetActive(true); if (isEvent) { eventSpace.SetActive(true); } else { dungeonMaps.SetActive(true); } //largeMenuHides.SetActive(true); }
void OnEnable() { if (Party.members[index] != null) { Special current = Party.members[index].GetSupportSpecial(); gameObject.GetComponentInChildren <Text>().text = current.GetName(); special = current; if (Party.GetSP() < current.GetCost() || !Party.members[index].GetAlive() || Party.members[index].status.stunned > 0 || Party.members[index].status.asleep > 0 || Party.members[index].status.possessed > 0) { gameObject.GetComponent <Button>().interactable = false; } else { gameObject.GetComponent <Button>().interactable = true; } } else { gameObject.GetComponent <Button>().interactable = false; gameObject.GetComponentInChildren <Text>().text = "Slot empty"; } }
void OnEnable() { if (Party.members[index] != null) { Special current = Party.members[index].GetSupportSpecial(); label.text = current.GetName(); special = current; if (Party.GetSP() < current.GetCost() || !Party.members[index].GetAlive() || Party.members[index].status.stunned > 0 || Party.members[index].status.asleep > 0 || Party.members[index].status.possessed > 0) { button.interactable = false; } else { button.interactable = true; } } else { button.interactable = false; label.text = "Slot empty"; } }