public void InitBattleUI(Transform panelParent0_9, Transform panelParent9_16, Transform panelParent0_16) { GameStartMenu = FindPanelInChildren <UI_StartMenu>(panelParent0_16); BattleTileInfo = FindPanelInChildren <UI_BattleTileInfo>(panelParent9_16); BattleActionMenu = FindPanelInChildren <UI_BattleActionMenu>(panelParent9_16); BattleMainMenu = FindPanelInChildren <UI_BattleMainMenu>(panelParent9_16); BattleSelectWeaponMenu = FindPanelInChildren <UI_BattleSelectWeaponMenu>(panelParent9_16); CharacterInfo = FindPanelInChildren <UI_CharacterInfoPanel>(panelParent9_16); TalkDialog = FindPanelInChildren <UI_TalkWithoutbg>(panelParent0_9); TalkDialogWithBG = FindPanelInChildren <UI_TalkWithBackground>(panelParent0_16); ScreenMask = FindPanelInChildren <UI_ScreenMask>(panelParent0_16); TurnIndicate = FindPanelInChildren <UI_TurnIndicate>(panelParent0_9); BattleExpGain = FindPanelInChildren <UI_ExpBarPanel>(panelParent0_9); LevelUp = FindPanelInChildren <UI_LevelUpPanel>(panelParent0_9); RecordChapter = FindPanelInChildren <UI_RecordChapterPanel>(panelParent0_16); ChapterStartPreface = FindPanelInChildren <UI_ChapterStartPreface>(panelParent0_16); WidgetYesNo = FindPanelInChildren <UI_WidgetYesNo>(panelParent0_16); GetItemOrMoney = FindPanelInChildren <UI_GetItemOrMoney>(panelParent0_9); { Left_BattleAttackInfo = FindPanelInChildren <UI_BattleAttackInfo>(panelParent0_9); Left_BattleAttackInfo.gameObject.name = "Left_BattleAttackInfo"; Right_BattleAttackInfo = GameObject.Instantiate(Left_BattleAttackInfo); Right_BattleAttackInfo.gameObject.name = "Right_BattleAttackInfo"; Right_BattleAttackInfo.gameObject.SetActive(true); var rrt = Right_BattleAttackInfo.GetComponent <RectTransform>(); rrt.SetParent(panelParent0_9, false); rrt.anchorMin = Vector2.right; rrt.anchorMax = Vector2.right; rrt.pivot = Vector2.right; rrt.anchoredPosition = Vector2.zero; Right_BattleAttackInfo.gameObject.SetActive(false); } MenuUndoAction = new Stack <UnityAction>(); }
public void ShowAttackInfo(CharacterLogic currentCharacterLogic, CharacterLogic logic) { WeaponItem equipWeapon = currentCharacterLogic.Info.Items.GetEquipWeapon(); var def = ResourceManager.GetWeaponDef(equipWeapon.ID); int afterHP = currentCharacterLogic.GetCurrentHP() - BattleLogic.GetAttackDamage(logic, currentCharacterLogic); Left_BattleAttackInfo.Show(currentCharacterLogic.GetPortrait(), def.Icon, def.CommonProperty.Name, currentCharacterLogic.GetMaxHP(), currentCharacterLogic.GetCurrentHP(), afterHP, currentCharacterLogic.GetHit(), BattleLogic.GetAttackDamage(currentCharacterLogic, logic), currentCharacterLogic.GetCritical(), BattleLogic.GetAttackCount(currentCharacterLogic, logic)); equipWeapon = logic.Info.Items.GetEquipWeapon(); def = ResourceManager.GetWeaponDef(equipWeapon.ID); afterHP = logic.GetCurrentHP() - BattleLogic.GetAttackDamage(currentCharacterLogic, logic); Right_BattleAttackInfo.Show(logic.GetPortrait(), def.Icon, def.CommonProperty.Name, logic.GetMaxHP(), logic.GetCurrentHP(), afterHP, logic.GetHit(), BattleLogic.GetAttackDamage(logic, currentCharacterLogic), logic.GetCritical(), BattleLogic.GetAttackCount(logic, currentCharacterLogic)); }
public void HideAttackInfo() { Left_BattleAttackInfo.Hide(false); Right_BattleAttackInfo.Hide(false); }