public void selectMethod() { sfx.playSelectEquipmentButton(); actionSelect.setItem(null); actionSelect.setAttackMagic(null); battleStates.getsetMethodState = BattleStates.MethodState.SELECT; EventSystem.current.SetSelectedGameObject(gameObject); battleEventButtons.selectButton = EventSystem.current.currentSelectedGameObject; if (battleEventButtons.selectButton == EventSystem.current.currentSelectedGameObject) { buttonBar.color = selectedButtonColor; } if (battleEventButtons.getsetButtonBattleState == BattleEventButtons.ButtonBattleState.KNOWLEDGEEFFECT) { actionSelect.setAttackMagic(attack); } else if (battleEventButtons.getsetButtonBattleState == BattleEventButtons.ButtonBattleState.ITEMS) { actionSelect.setItem(item); } else { return; } }
private void onButtonStateChange(object sender, EventArgs e) { if (battleStates.getsetBattleState == BattleStates.BattleState.NONE) { return; } actionSelect.setAttackMagic(null); actionSelect.setItem(null); knowledgeEffectSelected(); itemSelected(); }