public void MakeBattleCharInfo(short nBUID) { NkBattleChar charByBUID = NrTSingleton <NkBattleCharManager> .Instance.GetCharByBUID(nBUID); if (charByBUID != null) { if (charByBUID.GetBUID() <= -1) { return; } ColosseumObserverControlDlg.OBSERVER_SOLDIERINFO obSoldierInfo = this.GetObSoldierInfo(charByBUID.Ally, charByBUID.GetBUID()); if (obSoldierInfo == null) { return; } if (obSoldierInfo.m_nBUID == -1) { NrCharKindInfo charKindInfo = charByBUID.GetCharKindInfo(); if (charKindInfo == null) { return; } string textureFromBundle = string.Empty; textureFromBundle = "UI/Soldier/64/" + charKindInfo.GetPortraitFile1(0, string.Empty) + "_64"; obSoldierInfo.m_itSol.SetTextureFromBundle(textureFromBundle); obSoldierInfo.m_nBUID = charByBUID.GetBUID(); obSoldierInfo.m_dtQuestion.Visible = false; obSoldierInfo.m_fMaxHP = (float)charByBUID.GetMaxHP(false); this.UpdateHP(charByBUID.Ally, charByBUID.GetBUID(), (float)charByBUID.GetSoldierInfo().GetHP(), 0, false); this.SetEnableTurn(charByBUID.Ally, charByBUID.GetBUID(), charByBUID.GetTurnState() != eBATTLE_TURN_STATE.eBATTLE_TURN_STATE_DISABLE); } } }
public void MakeAllBattleCharInfo() { NkBattleChar[] charArray = NrTSingleton <NkBattleCharManager> .Instance.GetCharArray(); for (int i = 0; i < charArray.Length; i++) { NkBattleChar nkBattleChar = charArray[i]; if (nkBattleChar != null) { if (nkBattleChar.GetBUID() > -1) { ColosseumObserverControlDlg.OBSERVER_SOLDIERINFO obSoldierInfo = this.GetObSoldierInfo(nkBattleChar.Ally, nkBattleChar.GetBUID()); if (obSoldierInfo != null) { if (obSoldierInfo.m_nBUID == -1) { NrCharKindInfo charKindInfo = nkBattleChar.GetCharKindInfo(); if (charKindInfo != null) { string textureFromBundle = string.Empty; textureFromBundle = "UI/Soldier/64/" + charKindInfo.GetPortraitFile1(0, string.Empty) + "_64"; obSoldierInfo.m_itSol.SetTextureFromBundle(textureFromBundle); obSoldierInfo.m_nBUID = nkBattleChar.GetBUID(); obSoldierInfo.m_dtQuestion.Visible = false; obSoldierInfo.m_fMaxHP = (float)nkBattleChar.GetMaxHP(false); this.UpdateHP(nkBattleChar.Ally, nkBattleChar.GetBUID(), (float)nkBattleChar.GetSoldierInfo().GetHP(), 0, false); this.SetEnableTurn(nkBattleChar.Ally, nkBattleChar.GetBUID(), nkBattleChar.GetTurnState() != eBATTLE_TURN_STATE.eBATTLE_TURN_STATE_DISABLE); } } } } } } }
public void ChangeCharLayer(eBATTLE_ALLY eBattleAlly, short nExceptBUID, bool bShow, bool bNameCheck) { NkBattleChar[] arChar = this.m_arChar; for (int i = 0; i < arChar.Length; i++) { NkBattleChar nkBattleChar = arChar[i]; if (nkBattleChar != null && nkBattleChar.m_k3DChar != null) { if (nkBattleChar.Ally == eBattleAlly && nkBattleChar.GetBUID() != nExceptBUID) { if (!bShow) { nkBattleChar.Get3DChar().SetLayer(TsLayer.BLOCK); } else { switch (nkBattleChar.GetCharKindType()) { case eCharKindType.CKT_USER: nkBattleChar.Get3DChar().SetLayer(TsLayer.PC); break; case eCharKindType.CKT_SOLDIER: nkBattleChar.Get3DChar().SetLayer(TsLayer.NPC, TsTag.NPC_MOB.ToString()); break; case eCharKindType.CKT_MONSTER: nkBattleChar.Get3DChar().SetLayer(TsLayer.NPC, TsTag.NPC_MOB.ToString()); break; case eCharKindType.CKT_NPC: nkBattleChar.Get3DChar().SetLayer(TsLayer.NPC, TsTag.NPC_QUEST.ToString()); break; case eCharKindType.CKT_OBJECT: nkBattleChar.Get3DChar().SetLayer(TsLayer.NPC, TsTag.NPC_EXTRA.ToString()); break; default: nkBattleChar.Get3DChar().SetLayer(TsLayer.NPC, TsTag.NPC_EXTRA.ToString()); break; } } } if (nkBattleChar.Ally != eBattleAlly) { nkBattleChar.SetShowHeadUp(bShow, !bShow, true); } } } }
public int FindCharIDByBUID(short buid) { NkBattleChar[] arChar = this.m_arChar; for (int i = 0; i < arChar.Length; i++) { NkBattleChar nkBattleChar = arChar[i]; if (nkBattleChar != null) { if (nkBattleChar.GetBUID() == buid) { return(nkBattleChar.GetID()); } } } return(-1); }
public void ShowHideAlly(eBATTLE_ALLY eBattleAlly, short nExceptBUID, bool bShow, bool bNameCheck) { NkBattleChar[] arChar = this.m_arChar; for (int i = 0; i < arChar.Length; i++) { NkBattleChar nkBattleChar = arChar[i]; if (nkBattleChar != null && nkBattleChar.m_k3DChar != null) { if (nkBattleChar.Ally == eBattleAlly && nkBattleChar.GetBUID() != nExceptBUID) { nkBattleChar.SetShowHide3DModel(bShow, bShow, bNameCheck); } if (nkBattleChar.Ally != eBattleAlly) { nkBattleChar.SetShowHeadUp(bShow, !bShow, true); } } } }
public Nr3DCharBase GetCollisionChar(Nr3DCharBase kChar, Vector2 movepos) { if (kChar.GetCharController() == null) { return(null); } Vector3 vector = Vector3.zero; float num = -3.40282347E+38f; NkBattleChar nkBattleChar = null; NkBattleChar[] charArray = this.GetCharArray(); for (int i = 0; i < charArray.Length; i++) { NkBattleChar nkBattleChar2 = charArray[i]; if (nkBattleChar2 != null) { if (nkBattleChar2.GetBUID() != kChar.GetParentBattleChar().GetBUID()) { if (!(nkBattleChar2.Get3DChar().GetCharController() == null)) { vector = nkBattleChar2.Get3DChar().GetCharController().transform.position; float num2 = kChar.GetParentBattleChar().GetCharHalfBound() + nkBattleChar2.GetCharHalfBound(); float num3 = Vector2.Distance(movepos, new Vector2(vector.x, vector.z)); if (num3 <= num2 && num2 - num3 > num) { num = num2 - num3; nkBattleChar = nkBattleChar2; } } } } } if (nkBattleChar != null) { return(nkBattleChar.Get3DChar()); } return(null); }
public void SetLastAttackCamera(NkBattleChar pkTarget, bool bSet) { if (bSet) { if (pkTarget == null) { return; } if (pkTarget.Get3DChar() == null) { Debug.LogError("ERROR, SetLastAttackCamera(), pkTarget.Get3DChar() is Null"); return; } if (pkTarget.Get3DChar().GetRootGameObject() == null) { Debug.LogError("ERROR, SetLastAttackCamera(), pkTarget.Get3DChar().GetRootGameObject() is Null"); return; } GameObject gameObject = TsSceneSwitcher.Instance._GetSwitchData_RootSceneGO(TsSceneSwitcher.ESceneType.BattleScene); if (gameObject == null) { return; } Transform child = NkUtil.GetChild(gameObject.transform, "Main Camera"); if (child == null) { return; } maxCamera component = child.GetComponent <maxCamera>(); if (component == null) { return; } Transform child2 = NkUtil.GetChild(pkTarget.Get3DChar().GetRootGameObject().transform, "dmaction1"); if (child2 != null) { Transform child3 = NkUtil.GetChild(child2, "actioncam"); if (child3 != null) { Camera component2 = child3.GetComponent <Camera>(); if (component2 == null) { return; } if (component2.renderingPath != RenderingPath.Forward) { component2.renderingPath = RenderingPath.Forward; } component2.backgroundColor = new Color(0f, 0f, 0f); if (component2 != null) { component.enabled = false; Camera component3 = child.GetComponent <Camera>(); if (component3 == null) { return; } int cullingMask = component3.cullingMask; component3.CopyFrom(component2); component3.cullingMask = cullingMask; if (NrBattleCamera.m_BackupCameraData == null) { return; } NrBattleCamera.m_BackupCameraData.trParent = child.parent; child.parent = child2; NrBattleCamera.m_BackupCameraData.CameraLevel = component.m_nCameraLevel; NrBattleCamera.m_BackupCameraData.checkbackup = true; if (this.m_TargetGo != null) { this.m_veTriggerStartPos = this.m_TargetGo.transform.position; } this.SetcameraPos(pkTarget.GetCharPos()); Transform child4 = NkUtil.GetChild(gameObject.transform, "@battlemap"); if (child4 != null) { Transform child5 = NkUtil.GetChild(child4, "normal1"); if (child5 != null) { child5.gameObject.SetActive(false); this.m_SkyBoxMaterial = RenderSettings.skybox; RenderSettings.skybox = null; NrTSingleton <NkBattleCharManager> .Instance.ShowHideAlly(pkTarget.Ally, pkTarget.GetBUID(), false, true); Battle.BATTLE.GRID_MANAGER.ShowHideGrid(false); } } GameObject gameObject2 = GameObject.Find("UI Camera"); if (gameObject2 != null) { Camera componentInChildren = gameObject2.GetComponentInChildren <Camera>(); if (componentInChildren != null) { componentInChildren.enabled = false; } } Battle.BATTLE.InputControlTrigger = true; } } } } else { if (NrBattleCamera.m_BackupCameraData == null) { return; } if (NrBattleCamera.m_BackupCameraData.checkbackup && NrBattleCamera.m_BackupCameraData.trParent != null) { GameObject gameObject3 = TsSceneSwitcher.Instance._GetSwitchData_RootSceneGO(TsSceneSwitcher.ESceneType.BattleScene); if (gameObject3 == null) { return; } Transform child6 = NkUtil.GetChild(gameObject3.transform, "Main Camera"); if (child6 == null) { return; } maxCamera component4 = child6.GetComponent <maxCamera>(); if (component4 == null) { return; } if (!component4.enabled && NrBattleCamera.m_BackupCameraData.trParent != null) { child6.parent = NrBattleCamera.m_BackupCameraData.trParent; component4.enabled = true; NrBattleCamera.m_BackupCameraData.trParent = null; } component4.m_nCameraLevel = NrBattleCamera.m_BackupCameraData.CameraLevel; component4.SetLevelValue(); NrBattleCamera.m_BackupCameraData.checkbackup = false; this.SetcameraPos(this.m_veTriggerStartPos); Battle.BATTLE.InputControlTrigger = false; Transform child7 = NkUtil.GetChild(gameObject3.transform, "@battlemap"); if (child7 != null) { Transform child8 = NkUtil.GetChild(child7, "normal1"); if (child8 != null) { child8.gameObject.SetActive(true); if (this.m_SkyBoxMaterial != null) { RenderSettings.skybox = this.m_SkyBoxMaterial; this.m_SkyBoxMaterial = null; } NrTSingleton <NkBattleCharManager> .Instance.ShowHideAlly(pkTarget.Ally, pkTarget.GetBUID(), true, true); Battle.BATTLE.GRID_MANAGER.ShowHideGrid(true); } } GameObject gameObject4 = GameObject.Find("UI Camera"); if (gameObject4 != null) { Camera componentInChildren2 = gameObject4.GetComponentInChildren <Camera>(); if (componentInChildren2 != null) { componentInChildren2.enabled = true; } } } } }
public Vector2 ObstacleAvoidance(Nr3DCharBase kChar, Vector2 curPos, Vector2 dir) { if (kChar.GetCharController() == null) { return(Vector2.zero); } float num = 10f; float num2 = 3.40282347E+38f; Nr3DCharBase nr3DCharBase = null; Vector2 vector = Vector2.zero; NkBattleChar[] charArray = this.GetCharArray(); for (int i = 0; i < charArray.Length; i++) { NkBattleChar nkBattleChar = charArray[i]; if (nkBattleChar != null) { Nr3DCharBase nr3DCharBase2 = nkBattleChar.Get3DChar(); if (nkBattleChar.GetBUID() != kChar.GetParentBattleChar().GetBUID()) { if (!(nr3DCharBase2.GetCharController() == null)) { Vector2 pos = new Vector2(nr3DCharBase2.GetCharController().transform.position.x, nr3DCharBase2.GetCharController().transform.position.z); Vector2 vector2 = this.PointToLocalSpace(pos, dir, curPos); if (vector2.x >= 0f) { float num3 = kChar.GetParentBattleChar().GetCharHalfBound() + nr3DCharBase2.GetParentBattleChar().GetCharHalfBound(); if (Mathf.Abs(vector2.y) < num3) { float x = vector2.x; float y = vector2.y; float num4 = Mathf.Sqrt(num3 * num3 - y * y); float num5 = x - num4; if (num5 <= 0f) { num5 = x + num4; } if (num5 < num2) { num2 = num5; nr3DCharBase = nr3DCharBase2; vector = vector2; } } } } } } } Vector2 zero = Vector2.zero; if (nr3DCharBase != null) { float num6 = 1f + (num - vector.x) / num; zero.y = (nr3DCharBase.GetParentBattleChar().GetCharHalfBound() - vector.y) * num6; zero.x = (nr3DCharBase.GetParentBattleChar().GetCharHalfBound() - vector.x) * 0.2f; if (kChar.GetParentBattleChar().GetBUID() == 0) { Debug.Log("*** TYS : steering Force " + zero); Debug.Log("*** TYS : closestIntersectionObstacle " + nr3DCharBase.GetCharCode()); } } return(this.VectorToWorldSpace(zero, dir)); }
private void GridInputMouse() { if (this.m_Battle.CastedTarget == null) { return; } if (this.m_Battle.CastedTarget.InputControlTrigger) { return; } if (NrTSingleton <FormsManager> .Instance.IsMouseOverForm()) { return; } if (!this.m_Battle.CastedTarget.IsEnableMouseInput()) { return; } NmBattleGrid nmBattleGrid = null; bool mouseButtonUp = NkInputManager.GetMouseButtonUp(0); bool mouseButtonUp2 = NkInputManager.GetMouseButtonUp(1); if (NkRaycast.Raycast(this.mc_kBattlePickLayer)) { GameObject gameObject = NkRaycast.HIT.transform.gameObject; if (null != gameObject) { nmBattleGrid = gameObject.GetComponent <NmBattleGrid>(); if (null != nmBattleGrid) { eBATTLE_ALLY aLLY = nmBattleGrid.ALLY; short sTARTPOS_INDEX = nmBattleGrid.STARTPOS_INDEX; int iNDEX = nmBattleGrid.INDEX; short bUID = nmBattleGrid.BUID; NkBattleChar charByBUID = NrTSingleton <NkBattleCharManager> .Instance.GetCharByBUID(bUID); Vector3 pOINT = NkRaycast.POINT; BATTLESKILL_BASE bATTLESKILL_BASE = null; int num = 0; if (this.m_Battle.CastedTarget.m_iBattleSkillIndex >= 0 && this.m_Battle.CastedTarget.REQUEST_ORDER == eBATTLE_ORDER.eBATTLE_ORDER_SKILL) { NkBattleChar nkBattleChar = this.m_Battle.CastedTarget.SelectBattleSkillChar(); if (nkBattleChar == null) { return; } int skillUnique = nkBattleChar.GetSoldierInfo().SelectBattleSkillByWeapon(this.m_Battle.CastedTarget.m_iBattleSkillIndex); bATTLESKILL_BASE = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillBase(skillUnique); if (bATTLESKILL_BASE == null) { return; } this.m_Battle.CastedTarget.GRID_MANAGER.SetSelectBattleSkillGrid(); if (bATTLESKILL_BASE.m_nSkillTargetType == 1 || bATTLESKILL_BASE.m_nSkillTargetType == 2) { num = 1; } else if (bATTLESKILL_BASE.m_nSkillTargetType == 3) { num = 2; } else if (bATTLESKILL_BASE.m_nSkillTargetType == 4) { num = 3; } } if (this.m_Battle.CastedTarget.MyAlly != aLLY) { if (bATTLESKILL_BASE != null) { if ((num == 2 || num == 3) && bUID >= 0) { this.m_Battle.CastedTarget.GRID_MANAGER.ActiveBattleSkillGrid(aLLY, sTARTPOS_INDEX, iNDEX, bATTLESKILL_BASE.m_nSkillUnique); } } if (mouseButtonUp) { if (this.m_Battle.CastedTarget.IsEmotionSet) { this.m_Battle.CastedTarget.Send_GS_BATTLE_EMOTICON_REQ(bUID); } else if (this.m_Battle.CastedTarget.REQUEST_ORDER == eBATTLE_ORDER.eBATTLE_ORDER_ATTACK_LAND) { this.m_Battle.CastedTarget.Send_AttackLand_Order(pOINT); this.m_Battle.CastedTarget.REQUEST_ORDER = eBATTLE_ORDER.eBATTLE_ORDER_NONE; } else if (this.m_Battle.CastedTarget.m_iBattleSkillIndex >= 0 && this.m_Battle.CastedTarget.REQUEST_ORDER == eBATTLE_ORDER.eBATTLE_ORDER_SKILL) { if (num == 2 || num == 3) { this.m_Battle.CastedTarget.GRID_MANAGER.ActiveBattleSkillGrid(aLLY, sTARTPOS_INDEX, iNDEX, bATTLESKILL_BASE.m_nSkillUnique); this.m_Battle.CastedTarget.Send_BattleSkill_Order(this.m_Battle.CastedTarget.m_iBattleSkillIndex, this.m_Battle.CastedTarget.SelectBattleSkillChar(), charByBUID, pOINT, (short)iNDEX); this.m_Battle.CastedTarget.Init_BattleSkill_Input(false); this.m_Battle.CastedTarget.REQUEST_ORDER = eBATTLE_ORDER.eBATTLE_ORDER_NONE; } else { Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("578"), SYSTEM_MESSAGE_TYPE.IMPORTANT_MESSAGE); } } else if (this.m_Battle.CastedTarget.REQUEST_ORDER == eBATTLE_ORDER.eBATTLE_ORDER_SEARCH) { NkBattleChar currentSelectChar = this.m_Battle.CastedTarget.GetCurrentSelectChar(); if (currentSelectChar != null) { } this.m_Battle.CastedTarget.REQUEST_ORDER = eBATTLE_ORDER.eBATTLE_ORDER_NONE; } else { if (Battle.BATTLE.BattleRoomtype == eBATTLE_ROOMTYPE.eBATTLE_ROOMTYPE_PLUNDER || Battle.BATTLE.BattleRoomtype == eBATTLE_ROOMTYPE.eBATTLE_ROOMTYPE_INFINITY) { if (Battle.BATTLE.GetCheckTargetBt() && charByBUID != null && charByBUID.GetSoldierInfo().GetHP() > 0 && charByBUID.GetCharKindInfo().GetCharKind() != 916) { Battle.BATTLE.Send_GS_BATTLE_PLUNDER_AGGROADD_REQ(charByBUID.GetBUID()); Battle.BATTLE.ClickCheckTargetBt(); Battle.BATTLE.SetTargetBtDisCount(); NrTSingleton <NkEffectManager> .Instance.AddEffect("FX_ATTACK_TARGET", charByBUID); } } else { NkBattleChar currentSelectChar2 = this.m_Battle.CastedTarget.GetCurrentSelectChar(); if (currentSelectChar2 != null && charByBUID != null) { this.m_Battle.CastedTarget.GRID_MANAGER.ActiveAttack(aLLY, sTARTPOS_INDEX, iNDEX, charByBUID); if (charByBUID.GetSoldierInfo().GetHP() > 0) { currentSelectChar2.OrderAttackReq(charByBUID, (short)iNDEX, nmBattleGrid.GetCenter()); } } } this.m_Battle.CastedTarget.REQUEST_ORDER = eBATTLE_ORDER.eBATTLE_ORDER_NONE; } } } else { if (bATTLESKILL_BASE != null && (num == 1 || num == 3) && bUID >= 0) { this.m_Battle.CastedTarget.GRID_MANAGER.ActiveBattleSkillGrid(aLLY, sTARTPOS_INDEX, iNDEX, bATTLESKILL_BASE.m_nSkillUnique); } if (mouseButtonUp) { if (this.m_Battle.CastedTarget.IsEmotionSet) { this.m_Battle.CastedTarget.Send_GS_BATTLE_EMOTICON_REQ(bUID); } else if (this.m_Battle.CastedTarget.m_iBattleSkillIndex >= 0 && this.m_Battle.CastedTarget.REQUEST_ORDER == eBATTLE_ORDER.eBATTLE_ORDER_SKILL) { if (num == 1 || num == 3) { this.m_Battle.CastedTarget.GRID_MANAGER.ActiveBattleSkillGrid(aLLY, sTARTPOS_INDEX, iNDEX, bATTLESKILL_BASE.m_nSkillUnique); this.m_Battle.CastedTarget.Send_BattleSkill_Order(this.m_Battle.CastedTarget.m_iBattleSkillIndex, this.m_Battle.CastedTarget.SelectBattleSkillChar(), charByBUID, pOINT, (short)iNDEX); this.m_Battle.CastedTarget.Init_BattleSkill_Input(false); this.m_Battle.CastedTarget.REQUEST_ORDER = eBATTLE_ORDER.eBATTLE_ORDER_NONE; } } else if (this.m_Battle.CastedTarget.REQUEST_ORDER == eBATTLE_ORDER.eBATTLE_ORDER_CHANGEPOS) { NkBattleChar currentSelectChar3 = this.m_Battle.CastedTarget.GetCurrentSelectChar(); if (currentSelectChar3 != null) { int num2 = currentSelectChar3.OrderChangePosReq(sTARTPOS_INDEX, (short)iNDEX); if (num2 < 0) { if (num2 < -1) { Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("176"), SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE); } else { Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("404"), SYSTEM_MESSAGE_TYPE.IMPORTANT_MESSAGE); } } } this.m_Battle.CastedTarget.REQUEST_ORDER = eBATTLE_ORDER.eBATTLE_ORDER_NONE; } else if (charByBUID != null) { if (charByBUID.GetTurnState() == eBATTLE_TURN_STATE.eBATTLE_TURN_STATE_ENABLE) { this.m_Battle.CastedTarget.SelectCharacter(bUID); } this.m_Battle.CastedTarget.REQUEST_ORDER = eBATTLE_ORDER.eBATTLE_ORDER_NONE; } else { this.m_Battle.CastedTarget.REQUEST_ORDER = eBATTLE_ORDER.eBATTLE_ORDER_NONE; } } else if (this.m_Battle.CastedTarget.REQUEST_ORDER == eBATTLE_ORDER.eBATTLE_ORDER_CHANGEPOS) { NkBattleChar currentSelectChar4 = this.m_Battle.CastedTarget.GetCurrentSelectChar(); if (currentSelectChar4 != null) { this.m_Battle.CastedTarget.GRID_MANAGER.ActiveChangePos(nmBattleGrid.ALLY, nmBattleGrid.STARTPOS_INDEX, currentSelectChar4.GetBUID(), (short)iNDEX); } } else { this.m_Battle.CastedTarget.GRID_MANAGER.SetOver(nmBattleGrid); } } } } } if (mouseButtonUp2) { if (this.m_Battle.CastedTarget.REQUEST_ORDER == eBATTLE_ORDER.eBATTLE_ORDER_CHANGEPOS) { this.m_Battle.CastedTarget.REQUEST_ORDER = eBATTLE_ORDER.eBATTLE_ORDER_NONE; Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("402"), SYSTEM_MESSAGE_TYPE.IMPORTANT_MESSAGE); } else if (this.m_Battle.CastedTarget.REQUEST_ORDER == eBATTLE_ORDER.eBATTLE_ORDER_SKILL) { this.m_Battle.CastedTarget.REQUEST_ORDER = eBATTLE_ORDER.eBATTLE_ORDER_NONE; this.m_Battle.CastedTarget.Init_BattleSkill_Input(true); } } if (null == nmBattleGrid) { this.m_Battle.CastedTarget.GRID_MANAGER.SetOver(null); if (this.m_Battle.CastedTarget.m_iBattleSkillIndex < 0 && this.m_Battle.CastedTarget.REQUEST_ORDER != eBATTLE_ORDER.eBATTLE_ORDER_SKILL && this.m_Battle.CastedTarget.GetCurrentSelectChar() == null) { this.m_Battle.CastedTarget.GRID_MANAGER.InitAll(); } } }
public void SetMagic(NkBattleChar pkTarget, int BattleSkillUnique, bool bRival) { if (pkTarget == null) { return; } if (this.m_TargetChar != null && this.m_TargetChar.CastedTarget.GetBUID() == pkTarget.GetBUID()) { return; } BATTLESKILL_BASE battleSkillBase = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillBase(BattleSkillUnique); if (battleSkillBase != null && Battle.BATTLE.SkillDirecting != null) { this.m_bRival = false; if (this.m_goSkillDirecting != null) { UnityEngine.Object.Destroy(this.m_goSkillDirecting); this.m_goSkillDirecting = null; } if (bRival && Battle.BATTLE.SkillRivalDirecting != null) { this.m_goSkillDirecting = (GameObject)UnityEngine.Object.Instantiate(Battle.BATTLE.SkillRivalDirecting, Vector3.zero, Quaternion.identity); this.m_bRival = true; } else { this.m_goSkillDirecting = (GameObject)UnityEngine.Object.Instantiate(Battle.BATTLE.SkillDirecting, Vector3.zero, Quaternion.identity); } NkUtil.SetAllChildLayer(this.m_goSkillDirecting, GUICamera.UILayer); Vector2 screenPos = new Vector2((float)(Screen.width / 2), (float)(Screen.height / 2)); Vector3 effectUIPos = base.GetEffectUIPos(screenPos); this.m_goSkillDirecting.transform.position = effectUIPos; string costumePortraitPath = this.GetCostumePortraitPath(pkTarget.GetSoldierInfo()); if (UIDataManager.IsUse256Texture()) { this.faceImageKey = pkTarget.GetCharKindInfo().GetPortraitFile1((int)pkTarget.GetSoldierInfo().GetGrade(), costumePortraitPath) + "_256"; } else { this.faceImageKey = pkTarget.GetCharKindInfo().GetPortraitFile1((int)pkTarget.GetSoldierInfo().GetGrade(), costumePortraitPath) + "_512"; } if (null == NrTSingleton <UIImageBundleManager> .Instance.GetTexture(this.faceImageKey)) { NrTSingleton <UIImageBundleManager> .Instance.RequestCharImage(this.faceImageKey, eCharImageType.LARGE, new PostProcPerItem(this.SetBundleImage)); } this.m_bSetFace = false; Animation componentInChildren = this.m_goSkillDirecting.GetComponentInChildren <Animation>(); if (componentInChildren != null) { this.m_fEndTime = Time.time + 10f; } else { this.m_fEndTime = Time.time + 10f; } if (TsPlatform.IsMobile && TsPlatform.IsEditor) { NrTSingleton <NkClientLogic> .Instance.SetEditorShaderConvert(ref this.m_goSkillDirecting); } this.m_goSkillDirecting.SetActive(false); } }