public void RemoveAtomA() { if (atomA != null && atomChoices.Count > atomA.GetAtomicNumber()) { ChoiceOption choiceOption = atomChoices[atomA.GetAtomicNumber() - 1]; var atom = atomA; choiceOption.SetButtonEvent(() => { SetAtom(atom); AudioManager.Instance.PlaySound(choiceClickSound); }); choiceOption.SetColors(ChoiceOption.defaultNormalColor, ChoiceOption.defaultHoverColor, ChoiceOption.defaultPressedColor); choiceOption.SetFocus(false); } //if (atomA != null) { // atomChoices[atomA.GetAtomicNumber() - 1].SetInteractable(true); //} atomA = null; AtomInfo info = Game.Instance.gameData.GetUknownInfo(); atomAText.text = info.GetAtom().GetName(); atomAImage.sprite = info.GetImage(); splitBtn.interactable = false; infoText.text = ""; atomResultImage.sprite = info.GetImage(); atomResultText.text = info.GetAtom().GetName(); atomAAmoText.text = ""; atomAAmo.value = 0; atomABtn.interactable = false; }
public void SetAtomA(Atom atom) { if (atom != null && atomChoices.Count > atom.GetAtomicNumber()) { ChoiceOption choiceOption = atomChoices[atom.GetAtomicNumber() - 1]; choiceOption.SetButtonEvent(() => { RemoveAtomA(); AudioManager.Instance.PlaySound(choiceClickSound); }); choiceOption.SetColors(ChoiceOption.defaultPressedColor, ChoiceOption.defaultHoverColor, ChoiceOption.defaultNormalColor); choiceOption.SetFocus(false); } atomA = atom; //atomChoices[atomA.GetAtomicNumber() - 1].SetInteractable(false); AtomInfo info = Game.Instance.gameData.FindAtomInfo(atom.GetAtomicNumber()); AtomData data = Game.Instance.gameData.FindAtomData(atom.GetAtomicNumber()); atomAText.text = info.GetAtom().GetName(); atomAImage.sprite = info.GetImage(); atomAAmo.maxValue = data.GetCurrAmo(); SetAtomAAmoText(); atomABtn.interactable = true; }
public Atom GetUknown() { return(unknownInfo.GetAtom()); }