public void SetJoystickEnable(bool bEnabled) { if (this.m_pkCharMove != null) { if (bEnabled) { this.m_pkCharMove.StartDragMove(); } else { this.m_pkCharMove.InitDragMove(); this.m_pkCharMove.NoChangeMove(); } } if (!bEnabled) { this.control.SetColor(new Color(1f, 1f, 1f, 0.5f)); this.control.transform.localPosition = this.oldPos; } else { this.control.SetColor(new Color(1f, 1f, 1f, 1f)); } this.backImage.Visible = bEnabled; this.bDragMoveStarted = bEnabled; NkInputManager.SetJoyStick(bEnabled); }
public override void Update() { base.Update(); if (!NrTSingleton <FormsManager> .Instance.IsShow(G_ID.ITEMTOOLTIP_DLG) && !this.m_bBoxCollider) { this.BoxColliderActive(true); } if (NrTSingleton <FormsManager> .Instance.IsShow(G_ID.ITEMTOOLTIP_DLG) && NkInputManager.GetMouseButtonDown(0)) { Ray ray = NrTSingleton <UIManager> .Instance.rayCamera.ScreenPointToRay(NkInputManager.mousePosition); RaycastHit raycastHit; if (Physics.Raycast(ray, out raycastHit) && raycastHit.collider.name.Contains("BT_SET")) { return; } NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.ITEMTOOLTIP_DLG); } if (this.m_fSliderValue != this.m_hsCount.Value) { int num = (int)(this.m_hsCount.Value * 100f / (100f / (float)this.m_nMaxItemNum)); this.m_nCurItemNum = num + 1; if (this.m_nCurItemNum >= this.m_nMaxItemNum) { this.m_nCurItemNum = this.m_nMaxItemNum; } if (this.m_nMaxItemNum <= 1) { this.m_nCurItemNum = 1; } this.m_lbCount.SetText(this.m_nCurItemNum.ToString()); } }
private void OnMouseUpAsButton() { if (NkInputManager.GetMouseButtonUp(0) && !this.m_bSelectCard) { if (SendPacket.GetInstance().IsBlockSendPacket()) { return; } NrSound.ImmedatePlay("UI_SFX", "BATTLE", "WIN-CARD-SUCCESS", true); this.m_bSelectCard = true; int iSelectIndex = 0; if ("card1" == base.gameObject.name) { iSelectIndex = 0; } if ("card2" == base.gameObject.name) { iSelectIndex = 1; } if ("card3" == base.gameObject.name) { iSelectIndex = 2; } if ("card4" == base.gameObject.name) { iSelectIndex = 3; } if (this.m_pkDlg != null) { this.m_pkDlg.ClickRewardCardButton(iSelectIndex); } } }
public void ShowInvenDlg() { if (NkInputManager.GetKeyUp(KeyCode.I) && !Scene.IsCurScene(Scene.Type.BATTLE)) { NrTSingleton <FormsManager> .Instance.ShowHide(G_ID.INVENTORY_DLG); } }
public static void ShowSolMilityDlg() { if (NkInputManager.GetKeyUp(KeyCode.Space)) { Scene.Type curScene = Scene.CurScene; if (curScene == Scene.Type.EMPTY || curScene == Scene.Type.SELECTCHAR || curScene == Scene.Type.CUTSCENE) { return; } SolMilitaryGroupDlg solMilitaryGroupDlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.SOLMILITARYGROUP_DLG) as SolMilitaryGroupDlg; if (solMilitaryGroupDlg == null || !solMilitaryGroupDlg.Visible) { NrTSingleton <FormsManager> .Instance.ShowForm(G_ID.SOLMILITARYGROUP_DLG); } else { NrTSingleton <FormsManager> .Instance.ClearShowHideForms(); } SolMilitarySelectDlg solMilitarySelectDlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.SOLMILITARYSELECT_DLG) as SolMilitarySelectDlg; if (solMilitarySelectDlg != null) { solMilitarySelectDlg.CloseByParent(82); } } }
public void HideAllUI() { if (NkInputManager.GetKeyUp(KeyCode.F10)) { NrTSingleton <FormsManager> .Instance.ShowHideAll(); } }
public void InputMouseEvent() { bool flag = false; if (TsPlatform.IsEditor) { if (NkInputManager.GetMouseButtonUp(0) || NkInputManager.GetMouseButtonUp(1)) { flag = true; G_ID g_ID = (G_ID)NrTSingleton <FormsManager> .Instance.MouseOverFormID(); if (NrTSingleton <FormsManager> .Instance.IsMouseOverForm() && g_ID == G_ID.GOOGLEPLAY_DLG) { flag = false; } } } else if (TsPlatform.IsMobile && Input.touchCount > 0 && Input.GetTouch(0).phase == TouchPhase.Ended) { flag = true; G_ID g_ID2 = (G_ID)NrTSingleton <FormsManager> .Instance.MouseOverFormID(); if (NrTSingleton <FormsManager> .Instance.IsMouseOverForm() && g_ID2 == G_ID.GOOGLEPLAY_DLG) { flag = false; } } if (flag) { this.HideMenu(flag); } }
public override void Update() { if (this.fTime > Time.realtimeSinceStartup) { return; } if (TsPlatform.IsEditor) { if (NkInputManager.GetMouseButtonUp(0) || NkInputManager.GetMouseButtonUp(1)) { G_ID g_ID = (G_ID)NrTSingleton <FormsManager> .Instance.MouseOverFormID(); if (!NrTSingleton <FormsManager> .Instance.IsMouseOverForm() || g_ID != G_ID.EMOTICON_DLG) { this.Close(); } } } else if (TsPlatform.IsMobile && Input.touchCount > 0 && Input.GetTouch(0).phase == TouchPhase.Ended) { G_ID g_ID2 = (G_ID)NrTSingleton <FormsManager> .Instance.MouseOverFormID(); if (!NrTSingleton <FormsManager> .Instance.IsMouseOverForm() || g_ID2 != G_ID.EMOTICON_DLG) { this.Close(); } } }
public bool Initialize() { this.GenerationCacheInfo(); this.m_kMainCore = new Main(); this.m_kMainCore.Initialize(); NrTSingleton <UIManager> .Instance.Initialize(); NrTSingleton <FormsManager> .Instance.Initialize(); this.m_kInputManager = new NkInputManager(); this.m_kInputManager.Initialize(); this.m_kInputManager.AddInputCommandLayer(new UICommandLayer()); this.m_kInputManager.AddInputCommandLayer(new KeyboardShotCutCommandLayer()); this.m_kInputManager.AddInputCommandLayer(this.m_charMoveCommandLayer); Holder.PushBundleGroup(NkBundleCallBack.PlayerBundleStackName); Holder.PushBundleGroup(NkBundleCallBack.NPCBundleStackName); Holder.PushBundleGroup(NkBundleCallBack.EffectBundleStackName); Holder.PushBundleGroup(NkBundleCallBack.BuildingBundleStackName); Holder.PushBundleGroup(NkBundleCallBack.UIBundleStackName); Holder.PushBundleGroup(Option.IndependentFromStageStackName); Holder.PushBundleGroup(NkBundleCallBack.BattlePreLoadingChar); Holder.PushBundleGroup(TsAudio.AssetBundleStackName); Holder.PushBundleGroup(NkBundleCallBack.AudioBundleStackName); for (int i = 0; i < 20; i++) { this.fAvgProcessTime[i] = 0f; } this.m_LabelStyle = new GUIStyle(); this.m_LabelStyle.normal.textColor = new Color(255f, 255f, 255f); this.bShowLog = false; return(true); }
public E_CHAR_SELECT_STEP Update() { if (this.m_CurrentAni != null) { this.PlayAni(); } if (this.m_PlayAniQue.Count > 0 && this.m_CurrentAni == null) { this.m_CurrentAni = this.m_PlayAniQue.Dequeue(); } if (NkInputManager.GetKeyUp(KeyCode.Escape)) { this.SkipEvent(); } if (this.m_PlayAniQue.Count == 0 && this.m_bSendEvent) { this.m_bSendEvent = false; if (this.m_PlayAniEndEvent != null) { this.m_PlayAniEndEvent(null); this.m_PlayAniEndEvent = null; } return(this.m_NextStep); } return(E_CHAR_SELECT_STEP.NONE); }
public override void Update() { if (NrTSingleton <NkCharManager> .Instance.CharacterListSetComplete) { NrCharBase @char = NrTSingleton <NkCharManager> .Instance.GetChar(NrTSingleton <NkCharManager> .Instance.SelectedCharID); if (@char != null) { NrCharUser nrCharUser = @char as NrCharUser; if (nrCharUser != null && nrCharUser.IsShaderRecovery() && NrTSingleton <NkCharManager> .Instance.SelectedCharID != 0) { this.CharacterSelect(nrCharUser, false); } } } if (this.m_CameraAniPlay == null) { return; } E_CHAR_SELECT_STEP e_CHAR_SELECT_STEP = this.m_CameraAniPlay.Update(); if (e_CHAR_SELECT_STEP != E_CHAR_SELECT_STEP.NONE) { this.m_SelectStep = e_CHAR_SELECT_STEP; } E_CHAR_SELECT_STEP selectStep = this.m_SelectStep; if (selectStep != E_CHAR_SELECT_STEP.INTRO) { if (selectStep != E_CHAR_SELECT_STEP.CREATE_SELECT) { if (this.m_CharselInput != null) { NrTSingleton <NrMainSystem> .Instance.m_kInputManager.RemoveInputCommandLayer(this.m_CharselInput); this.m_CharselInput = null; } } else if (this.m_CharselInput == null) { this.m_CharselInput = new CharSelectCommandLayer(); NrTSingleton <NrMainSystem> .Instance.m_kInputManager.AddInputCommandLayer(this.m_CharselInput); } } else if (NkInputManager.GetMouseButtonUp(0)) { if (NrTSingleton <FormsManager> .Instance.IsForm(G_ID.TOASTMSG_DLG)) { NrTSingleton <CCameraAniPlay> .Instance.SkipEvent(); } else { ToastMsgDlg toastMsgDlg = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.TOASTMSG_DLG) as ToastMsgDlg; toastMsgDlg.SetMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromPreloadText("24")); } } }
public void UpdateFreeCamera() { if (NrTSingleton <FormsManager> .Instance.IsMouseOverForm()) { return; } if (CameraController.EnableControll && NkInputManager.GetButton("Fire2")) { this.UpdateEulerAngle(NkInputManager.GetAxis("Mouse X"), NkInputManager.GetAxis("Mouse Y")); } Vector3 vector = Vector3.zero; if (CameraController.EnableControll && NrTSingleton <UIManager> .Instance.FocusObject == null) { bool flag = NkInputManager.GetKey(KeyCode.W) || NkInputManager.GetKey(KeyCode.Keypad8) || NkInputManager.GetKey(KeyCode.UpArrow); bool flag2 = NkInputManager.GetKey(KeyCode.S) || NkInputManager.GetKey(KeyCode.Keypad2) || NkInputManager.GetKey(KeyCode.DownArrow); bool flag3 = NkInputManager.GetKey(KeyCode.A) || NkInputManager.GetKey(KeyCode.Keypad4) || NkInputManager.GetKey(KeyCode.LeftArrow); bool flag4 = NkInputManager.GetKey(KeyCode.D) || NkInputManager.GetKey(KeyCode.Keypad6) || NkInputManager.GetKey(KeyCode.RightArrow); if (flag) { vector += new Vector3(0f, 0f, this.MoveSpeed); } if (flag2) { vector += new Vector3(0f, 0f, -this.MoveSpeed); } if (flag3) { vector += new Vector3(-this.MoveSpeed, 0f, 0f); } if (flag4) { vector += new Vector3(this.MoveSpeed, 0f, 0f); } } Quaternion rotation = this.QY * this.QX; Vector3 vector2 = rotation * new Vector3(0f, 0f, -this.distance); vector = this.QY * vector; this.SetMovePos(this.GetMovePos() + vector); vector2 += this.GetMovePos(); if (!this.m_bMotionBlurCamera) { Vector3 pos = vector2; pos = NrTSingleton <NrTerrain> .Instance.GetWorldHeight(pos); if (vector2.y < pos.y) { vector2.y = pos.y + 1f; } } this.SetRotation(rotation); this.SetPosision(vector2); if (Camera.main) { Camera.main.fieldOfView = this.ffovMax; } }
public void Update() { if (NkInputManager.GetKeyDown(KeyCode.LeftControl)) { this.m_bDownCtrl = true; } if (NkInputManager.GetKeyUp(KeyCode.LeftControl)) { this.m_bDownCtrl = false; } if (this.m_bDownCtrl && NkInputManager.GetKeyUp(KeyCode.LeftAlt)) { this.m_bActive = !this.m_bActive; if (this.m_bActive) { NrTSingleton <FormsManager> .Instance.HideAll(); } else { NrTSingleton <FormsManager> .Instance.ShowAll(); } } if (!this.m_bActive) { return; } if (NkInputManager.GetKeyDown(KeyCode.UpArrow)) { this.m_si16CommandLine -= 1; if (this.m_si16CommandLine <= 0) { this.m_si16CommandLine = 0; } this.m_buff = this.m_arCommand[(int)this.m_si16CommandLine]; } if (NkInputManager.GetKeyDown(KeyCode.DownArrow)) { this.m_si16CommandLine += 1; if ((int)this.m_si16CommandLine >= this.m_arCommand.Count) { this.m_si16CommandLine = (short)this.m_arCommand.Count; this.m_buff = string.Empty; } else { this.m_buff = this.m_arCommand[(int)this.m_si16CommandLine]; } } if (NkInputManager.GetKeyDown(KeyCode.Return) || NkInputManager.GetKeyDown(KeyCode.A)) { this.m_kCommandInterpreter.ParseCommand(this.m_buff); this.m_arCommand.Add(this.m_buff.Trim()); this.m_si16CommandLine = (short)this.m_arCommand.Count; this.m_buff = string.Empty; } }
public void KeyboardMove() { if (!NrTSingleton <NkClientLogic> .Instance.IsMovable()) { return; } if (!this.m_pkChar.IsMovingAnimation()) { return; } NrCharUser nrCharUser = this.m_pkChar as NrCharUser; if (nrCharUser == null || !nrCharUser.IsReady3DModel()) { return; } Nr3DCharActor nr3DCharActor = nrCharUser.Get3DChar() as Nr3DCharActor; if (nr3DCharActor == null) { return; } Transform transform = Camera.main.transform; Vector3 a = transform.TransformDirection(Vector3.forward); a.y = 0f; a = a.normalized; Vector3 a2 = new Vector3(a.z, 0f, -a.x); float axisRaw = NkInputManager.GetAxisRaw("Vertical"); float axisRaw2 = NkInputManager.GetAxisRaw("Horizontal"); Vector3 vector = axisRaw2 * a2 + axisRaw * a; Vector3 vector2 = Vector3.zero; if (vector != Vector3.zero) { float num = 0.3f; vector2 = Vector3.RotateTowards(vector2, vector, num * 0.0174532924f * Time.deltaTime, 1f); if (this.IsMovableArea(this.m_vCharPos.x + vector2.x, this.m_vCharPos.z + vector2.z) != NrCharDefine.eMoveTargetReason.MTR_SUCCESS && !this.FindMovableAreaByKey(ref vector2)) { return; } vector2 = vector2.normalized; } if (vector2 == Vector3.zero) { return; } this.ProcessIncreaseMove(); nr3DCharActor.KeyboardMove(vector2, true); this.SetCharPos(nr3DCharActor.GetRootGameObject()); this.SendCharMovePacketForKeyBoardMove(false); this.m_bArrived = false; this.m_bKeyboardMove = true; this.m_bMouseMove = false; }
public void ShowNearNpcSelectUIDlg() { if (NkInputManager.GetKeyUp(KeyCode.F)) { NearNpcSelectUI_DLG nearNpcSelectUI_DLG = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.NEARNPCSELECTUI_DLG) as NearNpcSelectUI_DLG; if (nearNpcSelectUI_DLG != null) { nearNpcSelectUI_DLG.NpcClick(null); } } }
public void ShowCommunityDlg() { if (NkInputManager.GetKeyUp(KeyCode.U)) { if (!NrTSingleton <FormsManager> .Instance.IsShow(G_ID.COMMUNITY_DLG)) { NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.COMMUNITY_DLG); } else { NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.COMMUNITY_DLG); } } }
public void ShowSystemOptionDlg() { if (NkInputManager.GetKeyUp(KeyCode.O)) { if (!NrTSingleton <FormsManager> .Instance.IsShow(G_ID.SYSTEM_OPTION)) { NrTSingleton <FormsManager> .Instance.ShowForm(G_ID.SYSTEM_OPTION); } else { NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.SYSTEM_OPTION); } } }
public override void SetComponent() { this.m_ListBox_ListBox = new ListBox[3]; this.m_ItemsCount = new int[3]; this.m_DrawTexture_Line = new DrawTexture[2]; this.m_DrawTexture_ListBG1 = (base.GetControl("DrawTexture_ListBG1") as DrawTexture); this.m_DrawTexture_Name1 = (base.GetControl("DrawTexture_Name1") as DrawTexture); this.m_ListBox_ListBox[0] = (base.GetControl("ListBox_ListBox0") as ListBox); this.m_ListBox_ListBox[0].Reserve = false; this.m_ListBox_ListBox[1] = (base.GetControl("ListBox_ListBox1") as ListBox); this.m_ListBox_ListBox[1].Reserve = false; this.m_ListBox_ListBox[2] = (base.GetControl("ListBox_ListBox2") as ListBox); this.m_ListBox_ListBox[2].Reserve = false; this.m_Label_Label4 = (base.GetControl("Label_Label4") as Label); this.m_DrawTexture_Line[0] = (base.GetControl("DrawTexture_Line1") as DrawTexture); this.m_DrawTexture_Line[1] = (base.GetControl("DrawTexture_Line2") as DrawTexture); for (int i = 0; i < 3; i++) { if (this.m_ListBox_ListBox[i].slider != null) { UnityEngine.Object.Destroy(this.m_ListBox_ListBox[i].slider.gameObject); } this.m_ListBox_ListBox[i].OffsetX = 0f; if (TsPlatform.IsMobile) { this.m_ListBox_ListBox[i].LineHeight = 80f; this.m_ListBox_ListBox[i].ColumnNum = 1; this.m_ListBox_ListBox[i].SetColumnWidth((int)this.m_ListBox_ListBox[i].GetSize().x, 0, 0, 0, 0, 32f); } else { this.m_ListBox_ListBox[i].LineHeight = 20f; this.m_ListBox_ListBox[i].ColumnNum = 1; this.m_ListBox_ListBox[i].SetColumnWidth((int)this.m_ListBox_ListBox[i].GetSize().x, 0, 0, 0, 0); } this.m_ListBox_ListBox[i].AddValueChangedDelegate(new EZValueChangedDelegate(this.ListBoxSelect)); this.m_ListBox_ListBox[i].AddLongTapDelegate(new EZValueChangedDelegate(this.ListBoxSelect)); } if (TsPlatform.IsWeb || TsPlatform.IsEditor || TsPlatform.IsAndroid) { float x = NkInputManager.mousePosition.x; float num = GUICamera.height - NkInputManager.mousePosition.y; base.SetLocation((float)((int)x), (float)((int)num)); } else { Vector3 vector = GUICamera.ScreenToGUIPoint(new Vector3(NkInputManager.GetTouch(0).position.x, GUICamera.height - NkInputManager.GetTouch(0).position.y, 1f)); base.SetLocation((float)((int)vector.x), (float)((int)vector.y)); } }
private void OnMouseUpAsButton() { if (NkInputManager.GetMouseButtonUp(0)) { NrCharBase @char = NrTSingleton <NkCharManager> .Instance.GetChar(1); if (@char != null) { @char.m_kCharMove.HideMoveMark = true; @char.PickMoveStart(base.gameObject.transform.position.x, base.gameObject.transform.position.y, base.gameObject.transform.position.z); NrTSingleton <NkClientLogic> .Instance.SetPickingEnable(false); } } }
public void ShowGuildDlg() { if (NkInputManager.GetKeyUp(KeyCode.G) && 0L < NrTSingleton <NewGuildManager> .Instance.GetGuildID()) { if (NrTSingleton <FormsManager> .Instance.GetForm(G_ID.NEWGUILD_MAIN_DLG) != null) { NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.NEWGUILD_MAIN_DLG); } else { NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.NEWGUILD_MAIN_DLG); } } }
public void ShowPostDlg() { if (NkInputManager.GetKeyUp(KeyCode.P)) { if (NrTSingleton <FormsManager> .Instance.GetForm(G_ID.POST_DLG) != null) { NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.POST_DLG); } else { NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.POST_DLG); } } }
private bool CheckNumberString() { if (!this.numberMode) { return(true); } if (NkInputManager.GetKeyDown(KeyCode.Delete) || NkInputManager.GetKeyDown(KeyCode.Backspace)) { return(true); } for (int i = 0; i < 10; i++) { if (NkInputManager.GetKeyDown(KeyCode.Alpha0 + i) || NkInputManager.GetKeyDown(KeyCode.Keypad0 + i)) { return(true); } } return(false); }
public override void Update() { if (TsPlatform.IsMobile) { if (this.m_FilePercent != null && this.m_Percent != null) { string text = string.Empty; if (this.m_FilePercent.Visible) { text = this.m_FilePercent.Text; } if (this.m_Percent.Visible) { text = text + "\nTotal : " + this.m_Percent.Text; } NrTSingleton <NrUserDeviceInfo> .Instance.SetMovieText(text); } Vector3 mousePosition = Input.mousePosition; if (NkInputManager.GetMouseButton(0) && this.m_v3TouchStart != Vector3.zero && this.m_v3TouchStart != mousePosition) { if (mousePosition != Vector3.zero && this.pRealChar != null && Mathf.Abs(this.m_v2TouchStart.x - mousePosition.x) > 5f) { this.m_fTempAngle = 360f * ((this.m_v2TouchStart.x - mousePosition.x) / (float)Screen.width); Quaternion rotation = Quaternion.Lerp(Quaternion.identity, Quaternion.AngleAxis(this.m_fAngle + this.m_fTempAngle, Vector3.up), Time.time * 0.1f); this.pRealChar.transform.rotation = rotation; } } else if (NkInputManager.GetMouseButtonUp(0)) { if (mousePosition != Vector3.zero && this.pTouchEffectPrefab != null) { this.SetTouchEffcet(new Vector2(mousePosition.x, (float)Screen.height - mousePosition.y)); this.m_v3TouchStart = Vector3.zero; } } else if (NkInputManager.GetMouseButtonDown(0) && mousePosition != Vector3.zero) { this.m_v2TouchStart = new Vector2(mousePosition.x, (float)Screen.height - mousePosition.y); this.m_v3TouchStart = mousePosition; this.m_fAngle = this.pRealChar.transform.rotation.eulerAngles.y; } } }
public override void Update() { base.Update(); if (!NrTSingleton <FormsManager> .Instance.IsShow(G_ID.ITEMTOOLTIP_DLG) && !this.m_bBoxCollider) { this.BoxColliderActive(true); } if (NrTSingleton <FormsManager> .Instance.IsShow(G_ID.ITEMTOOLTIP_DLG) && NkInputManager.GetMouseButtonDown(0)) { Ray ray = NrTSingleton <UIManager> .Instance.rayCamera.ScreenPointToRay(NkInputManager.mousePosition); RaycastHit raycastHit; if (Physics.Raycast(ray, out raycastHit) && raycastHit.collider.name.Contains("BT_SET")) { return; } NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.ITEMTOOLTIP_DLG); } }
public void ShowQuestListDlg() { if (!TsPlatform.IsEditor) { return; } if (NkInputManager.GetKeyUp(KeyCode.L)) { QuestList_DLG questList_DLG = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.QUESTLIST_DLG) as QuestList_DLG; if (questList_DLG != null) { NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.QUESTLIST_DLG); } else { NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.QUESTLIST_DLG); } } }
private void CharacterRotation() { if (this._costumeChar == null) { return; } Vector3 mousePosition = Input.mousePosition; if (NkInputManager.GetMouseButton(0) && this._v3TouchStart != Vector3.zero && this._v3TouchStart != mousePosition) { if (mousePosition != Vector3.zero && Mathf.Abs(this._v2TouchStart.x - mousePosition.x) > 5f) { this._fTempAngle = 360f * ((this._v2TouchStart.x - mousePosition.x) / (float)Screen.width); Quaternion rotation = Quaternion.Lerp(Quaternion.identity, Quaternion.AngleAxis(this._fAngle + this._fTempAngle, Vector3.up), Time.time * 0.1f); this._costumeChar.transform.rotation = rotation; } } else if (NkInputManager.GetMouseButtonUp(0) && mousePosition != Vector3.zero) { this._v3TouchStart = Vector3.zero; } }
public void UpdateMouse3() { if (NrTSingleton <FormsManager> .Instance.IsMouseOverForm()) { if (this.DragMove) { this.SetDragMove(false); } return; } if (!CameraController.EnableControll) { this.SetDragMove(false); return; } bool flag = NkInputManager.GetMouseButtonDown(0) || NkInputManager.GetMouseButtonDown(2); bool flag2 = NkInputManager.GetMouseButtonUp(0) || NkInputManager.GetMouseButtonUp(2); if (flag) { this.Mouse3DownPoint = NkInputManager.mousePosition; this.SetDragMove(true); } if (flag2) { this.SetDragMove(false); } if (this.DragMove) { Vector2 vector = NkInputManager.mousePosition - this.Mouse3DownPoint; this.Mouse3DownPoint = NkInputManager.mousePosition; Vector3 vector2 = new Vector3(-vector.x, 0f, -vector.y); vector2 *= 1E-05f * this.Mouse3Speed; this.SetMovePos(this.GetMovePos() + this.QY * vector2); } }
private void InputMouse() { if (this.m_SoldierBatch.CastedTarget.MakeUpCharInfo.m_SolID != 0L) { return; } bool flag = false; if (NkInputManager.GetMouseButton(0) || NkInputManager.GetMouseButton(2)) { flag = true; } if (NkInputManager.GetMouseButtonUp(0) || NkInputManager.GetMouseButtonUp(2)) { flag = false; } if (flag) { if (this.m_veScrollStart == Vector3.zero) { this.m_veScrollStart = NkInputManager.mousePosition; this.m_SoldierBatch.CastedTarget.CAMERA.SetScrollView(true); } else { Vector3 vector = this.m_veScrollStart - NkInputManager.mousePosition; this.m_SoldierBatch.CastedTarget.CAMERA.CameraScrollMove(vector.x, vector.y); this.m_veScrollStart = NkInputManager.mousePosition; } } if (!flag) { this.m_veScrollStart = Vector3.zero; this.m_SoldierBatch.CastedTarget.CAMERA.SetScrollView(false); } }
public override void Update() { base.Update(); if ((NkInputManager.GetMouseButtonDown(0) || NkInputManager.GetMouseButtonDown(1)) && NrTSingleton <FormsManager> .Instance.FocusFormID() == this.m_ParentWinID && TsPlatform.IsMobile) { Form form = NrTSingleton <FormsManager> .Instance.GetForm((G_ID)this.m_ParentWinID); if (form != null) { if (form is ItemTooltipDlg) { ItemTooltipDlg itemTooltipDlg = form as ItemTooltipDlg; if (itemTooltipDlg != null) { itemTooltipDlg.CloseSetItemTooltip(); } } if (form is ItemTooltipDlg_Second) { ItemTooltipDlg_Second itemTooltipDlg_Second = form as ItemTooltipDlg_Second; if (itemTooltipDlg_Second != null) { itemTooltipDlg_Second.CloseSetItemTooltip(); } } if (form is Item_Box_Select_Dlg) { Item_Box_Select_Dlg item_Box_Select_Dlg = form as Item_Box_Select_Dlg; if (item_Box_Select_Dlg != null) { item_Box_Select_Dlg.CloseSetItemTooltip(); } } } } }
public void ShowWorldMapDlg() { if (NkInputManager.GetKeyUp(KeyCode.M)) { if (Scene.CurScene == Scene.Type.BATTLE) { return; } if (!NrTSingleton <FormsManager> .Instance.IsShow(G_ID.WORLD_MAP)) { NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.WORLD_MAP); NrTSingleton <FormsManager> .Instance.Show(G_ID.WORLD_MAP); TsAudioManager.Instance.AudioContainer.RequestAudioClip("UI_SFX", "MAP", "OPEN", new PostProcPerItem(NrAudioClipDownloaded.OnEventAudioClipDownloadedImmedatePlay)); } else { NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.WORLD_MAP); TsAudioManager.Instance.AudioContainer.RequestAudioClip("UI_SFX", "MAP", "CLOSE", new PostProcPerItem(NrAudioClipDownloaded.OnEventAudioClipDownloadedImmedatePlay)); } } }