private string GetTargetName(int index) { if (LTCombatEventReceiver.IsCombatInit()) { return(LTCombatEventReceiver.Instance.GetCombatant(targetTeam, index).myName); } return("already deleted"); }
/// <summary> /// 更新释放技能的目标 /// </summary> /// <returns>目标</returns> public Hotfix_LT.Combat.Combatant UpdateTargets() { if (myTargets == null || ignoreInput || !LTCombatEventReceiver.IsCombatInit() || !LTCombatEventReceiver.Instance.Ready) { return(null); } if (LTCombatHudController.Instance != null && !LTCombatHudController.Instance.CombatHudVisible()) { return(null); } if (ChatHudController.sOpen || FriendHudController.sOpen) { return(null); } if (setupDone == false) { if (LTCombatHudController.Instance.AutoMode) { targetTeam = 1 - CombatLogic.Instance.LocalPlayerTeamIndex; LTCombatHudController.Instance.CombatSkillCtrl.SetConvergeTargeting(); } return(null); } if (UICamera.currentScheme == UICamera.ControlScheme.Touch) { if (ILRDefine.UNITY_EDITOR) { EB.Debug.LogError("UICamera.currentScheme == UICamera.ControlScheme.Touch & UNITY_EDITOR"); UICamera.currentScheme = UICamera.ControlScheme.Mouse; return(null); } else { if (Input.touchCount == 0) { if (lastStatePressed) { lastStatePressed = false; if (lastStateOverUI) { return(null); } else { return(SearchTargetByClickPos(lasttouch)); } } else { return(null); } } lasttouch = TouchPos; } } else if (UICamera.currentScheme == UICamera.ControlScheme.Mouse) { if (Input.GetMouseButton(0) == false) { if (lastStatePressed) { lastStatePressed = false; if (lastStateOverUI) { return(null); } else { return(SearchTargetByClickPos(Input.mousePosition)); } } else { return(null); } } lasttouch = Input.mousePosition; } else { return(null); } if (!lastStatePressed) { lastStatePressed = true; lastStateOverUI = CurrentTouchOverUI(); } return(null); }