public bool Update() { if (this.m_EffectUnit == null) { this.m_EffectUnit = NrTSingleton <NkEffectManager> .Instance.GetEffectUnit(this.m_nEffectIndex); if (this.m_EffectUnit == null) { return(true); } this.m_EffectUnit.CastedTarget.LifeTime = float.PositiveInfinity; } if (this.m_fBulletEndTime < Time.time) { if (this.m_EffectUnit.IsAlive) { uint registNum = this.m_EffectUnit.CastedTarget.RegistNum; NrTSingleton <NkEffectManager> .Instance.DeleteEffect(registNum); } this.EndEffect(); return(false); } switch (this.m_BulletInfo.MOVE_TYPE) { case eBULLET_MOVE_TYPE.eBULLET_MOVE_TYPE_LINE: case eBULLET_MOVE_TYPE.eBULLET_MOVE_TYPE_PASS: this.UpdateLineMove(); break; case eBULLET_MOVE_TYPE.eBULLET_MOVE_TYPE_CURVE: this.UpdateCurveMove(); break; } return(true); }
public void StartCutScene() { this.fStartTime = Time.realtimeSinceStartup; maxCamera component = Camera.main.GetComponent <maxCamera>(); if (component != null) { this.m_TargetCamera = component; this.m_TargetCamera.CastedTarget.BackUpCameraInfo(); this.m_TargetCamera.CastedTarget.enabled = false; } if (this.bHide) { NrTSingleton <NkBattleCharManager> .Instance.ChangeCharLayer((eBATTLE_ALLY)this.nHideAlly, -1, false, true); } NrTSingleton <NkBattleCharManager> .Instance.AllCharNameHide(false); Battle.BATTLE.GRID_MANAGER.ShowHideGrid(false); GameObject gameObject = GameObject.Find("UI Camera"); if (gameObject != null) { Camera componentInChildren = gameObject.GetComponentInChildren <Camera>(); if (componentInChildren != null) { componentInChildren.enabled = false; } } }
public override void Close() { UnityEngine.Object.Destroy(this.m_goSkillDirecting); this.m_goSkillDirecting = null; this.m_TargetChar = null; base.Close(); }
public void Clear() { this._listCamera.Clear(); this.Duration = 0f; this.fStartTime = 0f; if (this.m_TargetCamera != null && this.m_TargetCamera.CastedTarget != null) { this.m_TargetCamera.CastedTarget.enabled = true; this.m_TargetCamera.CastedTarget.RestoreCameraInfo(); } this.m_TargetCamera = null; this.nReservationCharKind = 0; this.eReservationAni = eCharAnimationType.None; this.bLoadComplete = false; Battle.BATTLE.GRID_MANAGER.ShowHideGrid(true); GameObject gameObject = GameObject.Find("UI Camera"); if (gameObject != null) { Camera componentInChildren = gameObject.GetComponentInChildren <Camera>(); if (componentInChildren != null) { componentInChildren.enabled = true; } } if (this.bHide) { NrTSingleton <NkBattleCharManager> .Instance.ChangeCharLayer((eBATTLE_ALLY)this.nHideAlly, -1, true, true); this.bHide = false; this.nHideAlly = -1; } }
public void Set(int nIndunIDX, short nNpcCharUnique) { this.m_pkIndunInfo = NrTSingleton <NrBaseTableManager> .Instance.GetIndunInfo(nIndunIDX.ToString()); this.m_nRequestIndunIDX = nIndunIDX; this.m_nRequestNpcUnique = nNpcCharUnique; this.m_lbTitle.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromMap(this.m_pkIndunInfo.CastedTarget.szTextKey)); this.RequestIndunScenarioOpen(null); }
public void SetIndunInfo(int nIndunIDX, int nIndunUnique) { if (this.m_nIndunUnique == nIndunUnique) { return; } this.m_nIndunUnique = nIndunUnique; this.m_pkIndunInfo = NrTSingleton <NrBaseTableManager> .Instance.GetIndunInfo(nIndunIDX.ToString()); this.LoadCurrentIndunUIBackTexture(); }
public void Clear() { NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.INDUNTIME_DLG); NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.INDUN_INFO_DLG); this.m_IndunUIBackTexture = null; this.m_nIndunUnique = -1; this.m_pkIndunInfo = null; NrTSingleton <NrNpcPosManager> .Instance.ClearIndunExceptMovePos(); }
public void Set(NkBattleChar pkTarget, string strName, float fTime, int nTextIndex) { this.m_TargetChar = pkTarget; this.m_nBattleCharID = pkTarget.GetID(); this.m_lbCharName.SetText(strName); string textFromTBS = NrTSingleton <NrTextMgr> .Instance.GetTextFromTBS(nTextIndex.ToString()); this.m_lbTalk.Text = textFromTBS; float width = this.m_lbTalk.GetWidth(); float totalHeight = this.m_lbTalk.spriteText.TotalHeight; base.SetSize(base.GetSizeX(), this.m_lbTalk.GetLocationY() + totalHeight + 14f); this.m_lbTalk.Setup(width, totalHeight); this.m_lbTalk.Text = textFromTBS; this.m_fEndTime = Time.time + fTime; this.Show(); }
public void Set(NrCharBase pkTarget, string strName, float fTime, int nTextIndex) { this.m_TargetChar = pkTarget; this.m_lbCharName.SetText(strName); string textFromTBS = NrTSingleton <NrTextMgr> .Instance.GetTextFromTBS(nTextIndex.ToString()); this.m_lbTalk.Text = textFromTBS; float width = this.m_lbTalk.GetWidth(); float totalHeight = this.m_lbTalk.spriteText.TotalHeight; base.SetSize(base.GetSize().x, this.m_lbTalk.GetLocationY() + totalHeight + 14f); this.m_lbTalk.Setup(width, totalHeight); this.m_lbTalk.Text = textFromTBS; this.m_fEndTime = Time.time + fTime; NrTSingleton <ChatManager> .Instance.PushMsg(CHAT_TYPE.BATTLE, strName, NrTSingleton <NrTextMgr> .Instance.GetTextFromTBS(nTextIndex.ToString())); this.Show(); }
public void SetData(Battle_ResultDlg_Content pkDlg, int nIndex) { if (pkDlg != null) { this.m_pkDlg = pkDlg; this.m_nIndex = nIndex; Animation component = base.gameObject.GetComponent <Animation>(); if (component != null) { if (component.isPlaying) { component.Stop(); } string animation = string.Format("card{0}_off", (this.m_nIndex + 1).ToString()); component.Play(animation); } } }
public void SetBattleTutorial(int value1, int value2, NkBattleChar pkBattleChar) { base.SetShowLayer(0, false); base.SetShowLayer(1, true); this.SetTextBattle(value1.ToString()); if (value1 == 101010703) { Vector2 zero = Vector2.zero; Vector2 zero2 = Vector2.zero; if (pkBattleChar != null) { this.m_TargetChar = pkBattleChar; Vector3 pos = Vector3.zero; pos = this.m_TargetChar.CastedTarget.Get3DChar().GetRootGameObject().transform.position; pos = GUICamera.WorldToEZ(pos); zero = new Vector2(pos.x, pos.y - 150f); zero2 = new Vector2(pos.x - 20f, pos.y - 190f); } else { zero = new Vector2(GUICamera.width / 2f + this.m_Touch.width, GUICamera.height / 2f - 150f); zero2 = new Vector2(GUICamera.width / 2f, GUICamera.height / 2f - 190f); } this.Move(zero, zero2); this._BG.UsedCollider(false); } else if (value1 == 101010701) { Battle_Control_Dlg battle_Control_Dlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.BATTLE_CONTROL_DLG) as Battle_Control_Dlg; if (battle_Control_Dlg == null) { return; } Vector2 skillButtonPos = battle_Control_Dlg.GetSkillButtonPos(); Vector3 v = new Vector2(skillButtonPos.x + 60f, skillButtonPos.y - 25f); Vector2 x = new Vector2(skillButtonPos.x - this.m_HelpText.GetSize().x - 30f, skillButtonPos.y - 55f); this.Move(v, x); this._BG.UsedCollider(false); } }
public void Set(NkBattleChar pkTarget) { this.m_TargetChar = pkTarget; this.MAXHP = (float)this.m_TargetChar.CastedTarget.GetMaxHP(false); this.m_pkDrawTextureHP = (base.GetControl("DrawTexture_GauHpE") as DrawTexture); this.fHpLength = this.m_pkDrawTextureHP.GetSize().x; if ((Battle.BATTLE.BattleRoomtype == eBATTLE_ROOMTYPE.eBATTLE_ROOMTYPE_BABELTOWER || Battle.BATTLE.BattleRoomtype == eBATTLE_ROOMTYPE.eBATTLE_ROOMTYPE_BOUNTYHUNT || Battle.BATTLE.BattleRoomtype == eBATTLE_ROOMTYPE.eBATTLE_ROOMTYPE_MYTHRAID) && this.m_TargetChar.CastedTarget.Ally == Battle.BATTLE.MyAlly && !this.m_TargetChar.CastedTarget.MyChar) { this.m_pkDrawTextureHP.SetTexture("Com_T_AllyHpPr"); } for (int i = 0; i < this.MAX_BUFFICON; i++) { this.m_pkDrawTextureBuffSlot[i] = (base.GetControl("DrawTexture_BuffSlot0" + (i + 1).ToString() + "E") as DrawTexture); this.m_pkDrawTextureBuffiCon[i] = (base.GetControl("DrawTexture_BuffIcn0" + (i + 1).ToString() + "E") as DrawTexture); this.m_pkDrawTextureBuffStroke[i] = (base.GetControl("DrawTexture_Buffstroke0" + (i + 1).ToString() + "E") as DrawTexture); this.m_pkDrawTextureBuffSlot[i].Visible = false; this.m_pkDrawTextureBuffiCon[i].Visible = false; this.m_pkDrawTextureBuffStroke[i].Visible = false; } this.UpdateHP(); }
public void Set(GameObject pkTarget, long nFightPower) { if (SoldierBatch.SOLDIER_BATCH_MODE == eSOLDIER_BATCH_MODE.MODE_PVP_MAKEUP) { this.Close(); return; } if (pkTarget == null) { this.Close(); return; } if (nFightPower == 0L) { this.Close(); return; } this.m_goTarget = pkTarget; this.m_lbPower.SetText(nFightPower.ToString()); this.UpdatePosition(); this.Show(); }
public void Init(NrCharBase kChar) { this._kChar = kChar; }
public Battle_Input(Battle pkBattle) { this.m_Battle = pkBattle; }
public CharChat(NrCharBase charBase, string msg, CHAT_TYPE _ChatType) { this.m_RefChar = charBase; this.msg = msg; this.MsgType = _ChatType; }
public bool CreateBulletUnit(BULLET_INFO BulletInfo, NkBattleChar pkSourceChar, NkBattleChar pkTargetchar, float fStartTime) { if (BulletInfo == null) { return(false); } if (pkSourceChar == null) { return(false); } if (pkTargetchar == null) { return(false); } this.m_BulletInfo = BulletInfo; this.m_SourceChar = pkSourceChar; this.m_TargetChar = pkTargetchar; this.m_fStartTime = fStartTime; if (this.m_SourceChar.CastedTarget.m_bDeadReaservation) { Debug.Log("Already Dead Char Request Bullet"); } Vector3 vector = Vector3.zero; Vector3 vector2 = Vector3.zero; Vector3 vector3 = Vector3.zero; if (this.m_BulletInfo.MOVE_TYPE == eBULLET_MOVE_TYPE.eBULLET_MOVE_TYPE_PASS) { BATTLE_POS_GRID battleGrid = Battle.BATTLE.GetBattleGrid(pkSourceChar.Ally, pkSourceChar.GetStartPosIndex()); BATTLE_POS_GRID battleGrid2 = Battle.BATTLE.GetBattleGrid(pkTargetchar.Ally, pkTargetchar.GetStartPosIndex()); if (battleGrid == null) { return(false); } vector = battleGrid.GetCenterBack(); this.m_PosStart = vector; vector.y = 0f; if (battleGrid2 == null) { return(false); } vector3 = battleGrid2.GetCenterBack(); this.m_BulletPosEnd = vector3; vector3.y = 0f; vector2 = pkTargetchar.GetCenterPosition(); this.m_HitPosEnd = vector2; vector2.y = 0f; } else { vector = pkSourceChar.GetShotPosition(); this.m_PosStart = vector; vector.y = 0f; vector3 = pkTargetchar.GetCenterPosition(); this.m_BulletPosEnd = vector3; vector3.y = 0f; vector2 = pkTargetchar.GetCenterPosition(); this.m_HitPosEnd = vector2; vector2.y = 0f; } float num = Vector3.Distance(vector, vector3); float num2 = Vector3.Distance(vector, vector2); if (this.m_BulletInfo.MOVE_TYPE == eBULLET_MOVE_TYPE.eBULLET_MOVE_TYPE_LINE || this.m_BulletInfo.MOVE_TYPE == eBULLET_MOVE_TYPE.eBULLET_MOVE_TYPE_CURVE || this.m_BulletInfo.MOVE_TYPE == eBULLET_MOVE_TYPE.eBULLET_MOVE_TYPE_PASS) { if (this.m_BulletInfo.SPEED > 0f) { this.m_fBulletEndTime = fStartTime + num / this.m_BulletInfo.SPEED; this.m_fHitEndTime = fStartTime + num2 / this.m_BulletInfo.SPEED; } else { this.m_fBulletEndTime = fStartTime; this.m_fHitEndTime = fStartTime; } if (this.m_BulletInfo.MOVE_TYPE == eBULLET_MOVE_TYPE.eBULLET_MOVE_TYPE_CURVE) { this.m_BulletPosEnd = this.m_TargetChar.CastedTarget.GetCharPos(); this.m_HitPosEnd = this.m_TargetChar.CastedTarget.GetCharPos(); this.calculateInitialVelocity(); } } else if (this.m_BulletInfo.MOVE_TYPE == eBULLET_MOVE_TYPE.eBULLET_MOVE_TYPE_NONE) { this.m_fBulletEndTime = fStartTime; this.m_fHitEndTime = fStartTime; } this.m_nEffectIndex = NrTSingleton <NkEffectManager> .Instance.AddEffect(this.m_BulletInfo.EFFECT_KIND, this.m_PosStart); this.m_EffectUnit = NrTSingleton <NkEffectManager> .Instance.GetEffectUnit(this.m_nEffectIndex); if (this.m_EffectUnit != null) { this.m_EffectUnit.CastedTarget.LifeTime = float.PositiveInfinity; } return(true); }
public SoldierBatch_Input(SoldierBatch pkPlunderPrepare) { this.m_SoldierBatch = pkPlunderPrepare; }
public void Set(NkBattleChar pkTarget, int nDamage, bool bCritical, int nAngerlyPoint, int nInfoNum) { this.m_eDamageMode = NkBattleDamage.eDAMAGEMODE.eDAMAGEMODE_NORMAL; this.m_TargetChar = pkTarget; this.m_nBattleCharID = pkTarget.GetID(); this.m_bDodge = false; this.m_bSetData = true; int num = 0; if (this.m_goDamageRoot == null) { this.m_goDamageRoot = (UnityEngine.Object.Instantiate(Battle.BATTLE.DamageEffect) as GameObject); this.m_goDamageRoot.SetActive(true); this.m_goDamageRoot.transform.parent = NkBattleDamage.goDamageParent.transform; } else { this.m_goDamageRoot.SetActive(true); } if (this.m_goFxFont == null) { this.m_goFxFont = NkUtil.GetChild(this.m_goDamageRoot.transform, "fx_font").gameObject; } if (this.m_goCritical == null) { this.m_goCritical = NkUtil.GetChild(this.m_goDamageRoot.transform, "fx_critical").gameObject; } if (this.m_goCritical != null) { this.m_goCritical.SetActive(false); } if (this.m_goDamageNumber == null) { this.m_goDamageNumber = NkUtil.GetChild(this.m_goDamageRoot.transform, "damagenumber").gameObject; } if (nDamage == 0 && nAngerlyPoint == 0) { this.m_bDodge = true; } else { if (nDamage < 0) { nDamage *= -1; this.m_eDamageMode = NkBattleDamage.eDAMAGEMODE.eDAMAGEMODE_NORMAL; } else if (nAngerlyPoint > 0) { nDamage = nAngerlyPoint; this.m_eDamageMode = NkBattleDamage.eDAMAGEMODE.eDAMAGEMODE_ANGERLYPOINT; } else { this.m_eDamageMode = NkBattleDamage.eDAMAGEMODE.eDAMAGEMODE_HEAL; } char[] array = nDamage.ToString().ToCharArray(); num = array.Length; if (num > NkBattleDamage.nMaxCount) { num = NkBattleDamage.nMaxCount; } switch (nInfoNum) { case 1: this.m_eInfoMode = NkBattleDamage.eINFOMODE.eINFOMODE_SLEEP; this.m_eDamageMode = NkBattleDamage.eDAMAGEMODE.eDAMAGEMODE_STUN; break; case 2: this.m_eInfoMode = NkBattleDamage.eINFOMODE.eINFOMODE_SILENCE; this.m_eDamageMode = NkBattleDamage.eDAMAGEMODE.eDAMAGEMODE_STUN; break; case 3: this.m_eInfoMode = NkBattleDamage.eINFOMODE.eINFOMODE_STUN; this.m_eDamageMode = NkBattleDamage.eDAMAGEMODE.eDAMAGEMODE_STUN; break; case 4: this.m_eInfoMode = NkBattleDamage.eINFOMODE.eINFOMODE_BLIND; this.m_eDamageMode = NkBattleDamage.eDAMAGEMODE.eDAMAGEMODE_STUN; break; default: this.m_eInfoMode = NkBattleDamage.eINFOMODE.eINFOMODE_EMPTY; break; } if (bCritical) { this.m_eDamageMode = NkBattleDamage.eDAMAGEMODE.eDAMAGEMODE_CRITICAL; Battle.BATTLE.BattleCamera.CameraAnimationPlay("vibration01"); } this.SetUVPosition(num, nDamage, this.m_bDodge, this.m_eDamageMode); } this.fStartTime = Time.time; this.UpdatePosition(); this.PlayAnimation(num, this.m_bDodge); }