From 687c2722f1f8564eac09e32171776655da83c33b Mon Sep 17 00:00:00 2001
From: client_linchunjie <461730578@qq.com>
Date: 星期五, 12 四月 2019 11:43:54 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master' into HazyRegion
---
Core/NetworkPackage/ServerPack/HAD_SaleActivity.meta | 9
System/CreateRole/CreateRoleProcessor.cs.meta | 4
Utility/EnumHelper.cs | 7
System/SelectRole/SelectRoleBehaviour.cs.meta | 4
System/SelectRole/SelectRoleProcessor.cs.meta | 0
System/CreateRole.meta | 9
Core/NetworkPackage/ServerPack/HAE_Truck.meta | 9
System/CreateRole/CreateRoleManager.cs.meta | 4
System/SelectRole/SelectRoleProcessor.cs | 30 +
System/CreateRole/CreateRoleBehaviour.cs.meta | 4
System/EquipStar/EquipStarModel.cs | 36 +
Core/GameEngine/Model/Config/CreateRoleConfig.cs | 12
Core/NetworkPackage/ServerPack/HB0_Event.meta | 9
System/CreateRole/CreateRoleProcessor.cs | 90 +++
UI/HUD/PopUpNum.cs | 4
Fight/GameActor/GA_Hero.cs | 19
System/Login/CreateRoleWin.cs | 253 ++++-----
Core/NetworkPackage/DTCFile/ServerPack/HAF_Merge.meta | 9
Core/ResModule/SceneLoader.cs | 24
System/EquipStar/EquipStarWin.cs | 74 +
Core/NetworkPackage/DTCFile/ServerPack/H04_Scene/DTC0406_tagNPCAppear.cs | 1
Core/NetworkPackage/DTCFile/ServerPack/HAD_SaleActivity.meta | 9
Fight/Stage/CreateRoleStage.cs | 8
System/Login/SelectRoleWin.cs | 87 +-
Fight/Actor/State/SMB/STM_BaseAttack.cs | 9
System/Launch/LaunchBackGroundWin.cs | 60 -
System/CreateRole/CreateRoleManager.cs | 93 +++
Core/GameEngine/Model/Config/CreateRoleConfig.cs.meta | 2
UI/Common/UI3DModelFactory.cs | 55 --
Core/NetworkPackage/DTCFile/ServerPack/HAE_Truck.meta | 9
/dev/null | 178 ------
System/SelectRole/SelectRoleBehaviour.cs | 92 +++
System/SelectRole.meta | 9
Core/NetworkPackage/DTCFile/ServerPack/HB0_Event.meta | 9
System/CreateRole/CreateRoleBehaviour.cs | 199 +++++++
System/RidingPet/ContainerRidingPet.cs | 11
Core/ResModule/InstanceResourcesLoader.cs | 1
System/CreateRole/CreateRoleTimeLine.cs | 113 ++++
Fight/Stage/SelectRoleStage.cs | 3
System/CreateRole/CreateRoleTimeLine.cs.meta | 4
Core/NetworkPackage/ServerPack/HAF_Merge.meta | 9
Lua/Gen/CreateRoleConfigWrap.cs | 8
System/DailyQuest/DailyQuestWin.cs | 4
43 files changed, 1,051 insertions(+), 532 deletions(-)
diff --git a/Core/GameEngine/Model/Config/CreateRoleConfig.cs b/Core/GameEngine/Model/Config/CreateRoleConfig.cs
index ba539b7..d5a87f1 100644
--- a/Core/GameEngine/Model/Config/CreateRoleConfig.cs
+++ b/Core/GameEngine/Model/Config/CreateRoleConfig.cs
@@ -1,6 +1,6 @@
锘�//--------------------------------------------------------
// [Author]: Fish
-// [ Date ]: Thursday, February 14, 2019
+// [ Date ]: Thursday, April 11, 2019
//--------------------------------------------------------
using System.Collections.Generic;
@@ -17,7 +17,9 @@
public readonly string selectIcon;
public readonly string unselectIcon;
public readonly int skillid;
- public readonly string desc;
+ public readonly string description;
+ public readonly string jobName;
+ public readonly string jobSign;
public CreateRoleConfig()
{
@@ -37,7 +39,11 @@
int.TryParse(tables[3],out skillid);
- desc = tables[4];
+ description = tables[4];
+
+ jobName = tables[5];
+
+ jobSign = tables[6];
}
catch (Exception ex)
{
diff --git a/Core/GameEngine/Model/Config/CreateRoleConfig.cs.meta b/Core/GameEngine/Model/Config/CreateRoleConfig.cs.meta
index 852e6c8..c32dd2c 100644
--- a/Core/GameEngine/Model/Config/CreateRoleConfig.cs.meta
+++ b/Core/GameEngine/Model/Config/CreateRoleConfig.cs.meta
@@ -1,6 +1,6 @@
fileFormatVersion: 2
guid: 0a16c879bf3b127479edd80ebc3b6b35
-timeCreated: 1550121231
+timeCreated: 1554980817
licenseType: Pro
MonoImporter:
serializedVersion: 2
diff --git a/Core/NetworkPackage/DTCFile/ServerPack/H04_Scene/DTC0406_tagNPCAppear.cs b/Core/NetworkPackage/DTCFile/ServerPack/H04_Scene/DTC0406_tagNPCAppear.cs
index 112e111..2d25323 100644
--- a/Core/NetworkPackage/DTCFile/ServerPack/H04_Scene/DTC0406_tagNPCAppear.cs
+++ b/Core/NetworkPackage/DTCFile/ServerPack/H04_Scene/DTC0406_tagNPCAppear.cs
@@ -67,6 +67,7 @@
break;
case E_NpcType.Fight:
case E_NpcType.FMBoss:
+ case E_NpcType.MonsterTime:
if (_npcConfig.Country == 1)
{
diff --git a/Core/NetworkPackage/DTCFile/ServerPack/HAD_SaleActivity.meta b/Core/NetworkPackage/DTCFile/ServerPack/HAD_SaleActivity.meta
new file mode 100644
index 0000000..56e5988
--- /dev/null
+++ b/Core/NetworkPackage/DTCFile/ServerPack/HAD_SaleActivity.meta
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: 3e05761d690b75440a6be79207d0fb01
+folderAsset: yes
+timeCreated: 1547643019
+licenseType: Pro
+DefaultImporter:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Core/NetworkPackage/DTCFile/ServerPack/HAE_Truck.meta b/Core/NetworkPackage/DTCFile/ServerPack/HAE_Truck.meta
new file mode 100644
index 0000000..1044caa
--- /dev/null
+++ b/Core/NetworkPackage/DTCFile/ServerPack/HAE_Truck.meta
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: 1d70ccd06161e0443b7a802ad94292f8
+folderAsset: yes
+timeCreated: 1547643019
+licenseType: Pro
+DefaultImporter:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Core/NetworkPackage/DTCFile/ServerPack/HAF_Merge.meta b/Core/NetworkPackage/DTCFile/ServerPack/HAF_Merge.meta
new file mode 100644
index 0000000..314efd1
--- /dev/null
+++ b/Core/NetworkPackage/DTCFile/ServerPack/HAF_Merge.meta
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: 71e878ac60c49ad4f964dd2dbc725739
+folderAsset: yes
+timeCreated: 1547643019
+licenseType: Pro
+DefaultImporter:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Core/NetworkPackage/DTCFile/ServerPack/HB0_Event.meta b/Core/NetworkPackage/DTCFile/ServerPack/HB0_Event.meta
new file mode 100644
index 0000000..6ed37c0
--- /dev/null
+++ b/Core/NetworkPackage/DTCFile/ServerPack/HB0_Event.meta
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: eed34091b0568664b9fb42f0634496c1
+folderAsset: yes
+timeCreated: 1547643019
+licenseType: Pro
+DefaultImporter:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Core/NetworkPackage/ServerPack/HAD_SaleActivity.meta b/Core/NetworkPackage/ServerPack/HAD_SaleActivity.meta
new file mode 100644
index 0000000..418ee88
--- /dev/null
+++ b/Core/NetworkPackage/ServerPack/HAD_SaleActivity.meta
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: 32ceb8b7faf99f84a8b73ce53c5e3e4d
+folderAsset: yes
+timeCreated: 1547643019
+licenseType: Pro
+DefaultImporter:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Core/NetworkPackage/ServerPack/HAE_Truck.meta b/Core/NetworkPackage/ServerPack/HAE_Truck.meta
new file mode 100644
index 0000000..ea614a3
--- /dev/null
+++ b/Core/NetworkPackage/ServerPack/HAE_Truck.meta
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: 77f69c2b862d1704299a32d0d8eeb71e
+folderAsset: yes
+timeCreated: 1547643019
+licenseType: Pro
+DefaultImporter:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Core/NetworkPackage/ServerPack/HAF_Merge.meta b/Core/NetworkPackage/ServerPack/HAF_Merge.meta
new file mode 100644
index 0000000..86e4eea
--- /dev/null
+++ b/Core/NetworkPackage/ServerPack/HAF_Merge.meta
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: fa14960fa44b0d1439bab471a764e34f
+folderAsset: yes
+timeCreated: 1547643019
+licenseType: Pro
+DefaultImporter:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Core/NetworkPackage/ServerPack/HB0_Event.meta b/Core/NetworkPackage/ServerPack/HB0_Event.meta
new file mode 100644
index 0000000..95487fc
--- /dev/null
+++ b/Core/NetworkPackage/ServerPack/HB0_Event.meta
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: d914565b65f8e8145988734c4d915834
+folderAsset: yes
+timeCreated: 1547643019
+licenseType: Pro
+DefaultImporter:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Core/ResModule/InstanceResourcesLoader.cs b/Core/ResModule/InstanceResourcesLoader.cs
index ab66bad..657d8f3 100644
--- a/Core/ResModule/InstanceResourcesLoader.cs
+++ b/Core/ResModule/InstanceResourcesLoader.cs
@@ -193,7 +193,6 @@
return null;
}
-
public static void LoadCreateRole(int job, Action<bool, UnityEngine.Object> _callBack)
{
string _name = "Zs";
diff --git a/Core/ResModule/SceneLoader.cs b/Core/ResModule/SceneLoader.cs
index 18f7be9..07201a0 100644
--- a/Core/ResModule/SceneLoader.cs
+++ b/Core/ResModule/SceneLoader.cs
@@ -5,6 +5,30 @@
public class SceneLoader
{
+ public static GameObject LoadCreateRole(string name)
+ {
+ GameObject prefab = null;
+ if (AssetSource.sceneFromEditor)
+ {
+#if UNITY_EDITOR
+ var path = StringUtility.Contact(ResourcesPath.ResourcesOutAssetPath, "Scene/CreateRole/", name, ".prefab");
+ prefab = UnityEditor.AssetDatabase.LoadAssetAtPath<GameObject>(path);
+#endif
+ }
+ else
+ {
+ var assetInfo = new AssetInfo("maps/createrole", name);
+ prefab = AssetBundleUtility.Instance.Sync_LoadAsset(assetInfo) as GameObject;
+ }
+
+ if (prefab == null)
+ {
+ DebugEx.LogErrorFormat("SceneLoader.LoadCreateRole() => 鍔犺浇涓嶅埌璧勬簮: {0}.", name);
+ }
+
+ return prefab;
+ }
+
public static Texture2D LoadTexture(string folder, string name)
{
Texture2D texture2D = null;
diff --git a/Fight/Actor/AI/AI_BossDSX.cs b/Fight/Actor/AI/AI_BossDSX.cs
deleted file mode 100644
index 502b8d1..0000000
--- a/Fight/Actor/AI/AI_BossDSX.cs
+++ /dev/null
@@ -1,427 +0,0 @@
-锘縰sing UnityEngine;
-
-using Snxxz.UI;
-using System.Collections.Generic;
-using System;
-
-public class AI_BossDSX : SampleAI
-{
- private float m_FirstSkill_HpPer;
- private float m_SplitSkill_HpPer;
- private float m_Fabao_HpPer;
- private float m_Finished_HpPer;
-
- private float m_TimeCount;
-
- private static byte m_Step;
- public static byte GetStep()
- {
- return m_Step;
- }
-
- private byte m_SubStep;
-
- private UIEffect m_UIEffect;
-
- private SkillContainer m_SkillContainer;
- private SkillContainer skillContainer
- {
- get { return m_SkillContainer ?? (m_SkillContainer = GameObject.FindObjectOfType<SkillContainer>()); }
- }
-
- public AI_BossDSX(GA_NpcClientFightBoss owner, Vector3 bornPosition)
- : base(owner, bornPosition)
- {
- m_Step = 0;
- m_SubStep = 0;
-
- m_CanCastSkill = false;
-
- FuncConfigConfig _funcConfig = FuncConfigConfig.Get("PreFight_Skill1_HpPer");
- m_FirstSkill_HpPer = float.Parse(_funcConfig.Numerical1) * Constants.F_DELTA;
-
- _funcConfig = FuncConfigConfig.Get("PreFight_Skill3_HpPer");
- m_SplitSkill_HpPer = float.Parse(_funcConfig.Numerical1) * Constants.F_DELTA;
-
- _funcConfig = FuncConfigConfig.Get("PreFight_Fabao_HpPer");
- m_Fabao_HpPer = float.Parse(_funcConfig.Numerical1) * Constants.F_DELTA;
-
- _funcConfig = FuncConfigConfig.Get("PreFight_Finish_HpPer");
- m_Finished_HpPer = float.Parse(_funcConfig.Numerical1) * Constants.F_DELTA;
-
- m_BaseAtkSkillID = 10027;
- }
-
- protected override void OnUpdate()
- {
- if (PreFightMission.Instance.updateAI == false)
- {
- return;
- }
-
- base.OnUpdate();
-
- if (GA_Hero.s_MapSwitching)
- {
- return;
- }
-
- switch (m_Step)
- {
- case 0:// 绛夊緟閲婃斁鍐查攱鎶�鑳�
-
- if (m_Owner.ActorInfo.Hp * 1f / m_Owner.ActorInfo.MaxHp < m_FirstSkill_HpPer)
- {
- m_Owner.ActorInfo.Hp = (uint)(m_Owner.ActorInfo.MaxHp * m_FirstSkill_HpPer);
-
- m_Owner.CastSkill(10028);
-
- m_TimeCount = 0;
-
- m_Step = 11;
-
- return;
- }
-
- break;
- case 11:
-
- return;
-
- case 1:// 绛夊緟鍐查攱鎶�鑳介噴鏀剧粨鏉�
-
- if (m_Owner.ActorInfo.Hp * 1f / m_Owner.ActorInfo.MaxHp < m_FirstSkill_HpPer)
- {
- m_Owner.ActorInfo.Hp = (uint)(m_Owner.ActorInfo.MaxHp * m_FirstSkill_HpPer);
- }
-
- if (m_Owner.IsIdle() || m_Owner.IsHurt() || m_Owner.IsRun())
- {
- m_Step = 4;
- PreFightMission.Instance.faBaoSkillShow = true;
- }
-
- return;
-
- case 4:// 鍑嗗琛ㄦ紨鍒嗚韩
-
- if (m_Owner.ActorInfo.Hp * 1f / m_Owner.ActorInfo.MaxHp < m_SplitSkill_HpPer)
- {
- m_Owner.ActorInfo.Hp = (uint)(m_Owner.ActorInfo.MaxHp * m_SplitSkill_HpPer);
- }
-
- switch (m_SubStep)
- {
- case 0:// 璧板埌鍑虹敓鐐�
-
- float _distSqrt = MathUtility.DistanceSqrtXZ(m_Owner.Pos, BornPos);
- if (_distSqrt > 0.5f)
- {
- m_Owner.MoveToPosition(BornPos);
- }
- else
- {
- m_SubStep = 0;
- m_Step = 41;
- m_TimeCount = 0;
- PlayerDatas.Instance.hero.Behaviour.StopKillUntilDieAI();
-
- DialogConfig _config = DialogConfig.Get(1005);
-
- StoryHintModel _model = ModelCenter.Instance.GetModel<StoryHintModel>();
- _model.icon = _config.icon;
- _model.name = _config.name;
- _model.content = _config.content;
- _model.duration = 3;
- _model.onClosed = null;
-
- WindowCenter.Instance.Open<StoryHintWin>();
-
- PreFightMission.Instance.updateAI = false;
-
- m_Owner.Forward = MathUtility.ForwardXZ(PlayerDatas.Instance.hero.Pos, m_Owner.Pos);
- }
-
- return;
- }
-
- break;
- case 41:
- case 42:
- case 43:
-
- return;
-
- case 5:// 绛夊緟瑙﹀彂娉曞疂
-
- if (m_Owner.ActorInfo.Hp * 1f / m_Owner.ActorInfo.MaxHp < m_Fabao_HpPer)
- {
- m_Owner.ActorInfo.Hp = (uint)(m_Owner.ActorInfo.MaxHp * m_Fabao_HpPer);
-
- GA_Hero.s_MapSwitching = true;
-
- GuideDialogueModel _model = ModelCenter.Instance.GetModel<GuideDialogueModel>();
- _model.dialogID = 1004;
- _model.onClose = () =>
- {
- // 寮�鍚伄缃╁拰閬僵鎽勫儚鏈�
- CameraController.Instance.Mask.SetActive(true);
- CameraController.Instance.MaskCamera.gameObject.SetActive(true);
- CameraController.Instance.MaskCamera.enabled = true;
- PlayerDatas.Instance.hero.ReleaseShadow();
-
- PreFightMission.Instance.Step_FabaoEffect();
-
- SoundPlayer.Instance.PlayBackGroundMusicOneShot(48);
- };
-
- WindowCenter.Instance.Open<GuideDialogueWin>();
-
- if (PlayerDatas.Instance.hero.State == E_ActorState.AutoRun)
- {
- PlayerDatas.Instance.hero.StopPathFind();
- }
-
- PlayerDatas.Instance.hero.StopRush();
- PlayerDatas.Instance.hero.IdleImmediate();
-
- List<GActor> _actorList = GAMgr.Instance.GetGroupList(E_ActorGroup.Enemy);
- if (_actorList != null)
- {
- for (int i = 0; i < _actorList.Count; ++i)
- {
- if (_actorList[i].State == E_ActorState.AutoRun)
- {
- _actorList[i].StopPathFind();
- }
-
- if (!_actorList[i].IsIdle())
- {
- _actorList[i].IdleImmediate();
- }
- }
- }
-
- m_Step = 6;
-
- return;
- }
-
- break;
-
- case 6:// 绛夊緟娉曞疂閫昏緫缁撴潫
-
- if (m_Owner.ActorInfo.Hp * 1f / m_Owner.ActorInfo.MaxHp < m_Fabao_HpPer)
- {
- m_Owner.ActorInfo.Hp = (uint)(m_Owner.ActorInfo.MaxHp * m_Fabao_HpPer);
- }
-
- if (WindowCenter.Instance.Get<TreasureNewGotWin>() == null
- || WindowCenter.Instance.Get<TreasureNewGotWin>().isActiveAndEnabled == false)
- {
- m_Step = 7;
- }
-
- return;
-
- case 7:// 绛夊緟浠诲姟缁撴潫
-
- if (m_Owner.ActorInfo.Hp * 1f / m_Owner.ActorInfo.MaxHp <= m_Finished_HpPer)
- {
- m_Owner.ActorInfo.Hp = (uint)(m_Owner.ActorInfo.MaxHp * m_Finished_HpPer);
-
- GA_Hero.s_MapSwitching = true;
- m_Owner.IdleImmediate();
-
- SelectionManager.Release(SelectionManager.E_Type.Red);
- SelectionManager.Request(SelectionManager.E_Type.Green, m_Owner);
-
- PreFightMission.Instance.Step_StartScale();
-
- m_Step = 8;
- }
-
- break;
- case 8:// boss缂╁皬
- return;
- }
-
- if (m_Owner.SkillMgr.DoingPrepareSkill)
- {
- return;
- }
-
- if (m_Owner.SkillMgr.CurCastSkill != null
- && m_Owner.SkillMgr.CurCastSkill.SkillCompelete == false)
- {
- return;
- }
-
- if (m_Owner.NextAction == 300)
- {
- return;
- }
-
- switch (m_AIStatus)
- {
- case E_AIStatus.Attack:
-
- BaseAttack();
-
- break;
-
- case E_AIStatus.Patrol:
-
- Patrol();
-
- break;
- case E_AIStatus.MoveToTarget:
-
- MoveToTarget();
-
- break;
- case E_AIStatus.MoveToBornPos:
-
- MoveToBornPosMin();
-
- break;
- }
- }
-
- private void BossFinishedSkillShow()
- {
- PreFightMission.Instance.OnFinishedBossSkillShow -= BossFinishedSkillShow;
- Skill _skill = m_Owner.SkillMgr.Get(10026);
- _skill.cd = 0;
- m_Owner.CastSkill(10026);
- m_Step = 43;
- m_TimeCount = 0;
-
- GA_Hero.s_MapSwitching = false;
- }
-
- private void OnCastSkill(int id)
- {
- HeroBehaviour.OnUserClickSkill -= OnCastSkill;
-
- if (id == 190)
- {
- Time.timeScale = 1;
- GA_Hero.s_MapSwitching = false;
- if (PreFightMission.Instance.m_HuaShouEffect)
- {
- EffectMgr.Instance.RecyleUIEffect(1050, PreFightMission.Instance.m_HuaShouEffect.gameObject);
- PreFightMission.Instance.m_HuaShouEffect = null;
- }
-
- if (m_UIEffect)
- {
- EffectMgr.Instance.RecyleUIEffect(m_UIEffect.effect, m_UIEffect.gameObject);
- m_UIEffect = null;
- }
-
- Transform _temp1 = WindowCenter.Instance.uiRoot.baseCanvas.Find("MainInterfaceWin/JoyStick");
- _temp1.gameObject.SetActive(true);
-
- WindowCenter.Instance.Close<NewGuideWin>();
- }
- }
-
- protected override void OutOfSleepUpdate()
- {
- base.OutOfSleepUpdate();
-
- if (m_Step == 11)
- {
- m_TimeCount += Time.deltaTime;
- if (m_TimeCount > 0.75f)
- {
- PlayerDatas.Instance.hero.Behaviour.StopKillUntilDieAI();
- skillContainer.blinkSkill.GetComponent<SkillButton>().enabled = false;
- skillContainer.blinkSkill.transform.localScale = Vector3.one;
-
- Transform _temp = skillContainer.blinkSkill.transform.Find("Img_BackGround");
- m_UIEffect = EffectMgr.Instance.PlayUIEffect(1095, 4500, _temp, false);
-
- _temp = WindowCenter.Instance.uiRoot.baseCanvas.Find("MainInterfaceWin/JoyStick");
- _temp.gameObject.SetActive(false);
-
-
-
- m_Step = 12;
- m_TimeCount = 0;
- }
- }
- else if (m_Step == 12)
- {
- m_TimeCount += Time.deltaTime;
- if (m_TimeCount > 0.4f)
- {
- Time.timeScale = 0;
- skillContainer.blinkSkill.GetComponent<SkillButton>().enabled = true;
- GA_Hero.s_MapSwitching = true;
- NewGuideModel _model = ModelCenter.Instance.GetModel<NewGuideModel>();
- _model.showMask = true;
- _model.content = "鐐瑰嚮<color=#00FF00>缈绘粴</color>鎸夐挳\r\n韬查伩<color=#00FF00>棰勮</color>鎶�鑳�";
- _model.componentPath = "BaseCanvas/MainInterfaceWin/SkillButtonTip/Pivot/CastSkillTip/Skill_Panel/Skill_Group1/Btn_BlinkSkill/Img_BackGround";
- _model.size = new Vector2(62, 62);
- _model.direction = 2;
- _model.pressedClose = false;
- _model.clickClosed = true;
- _model.onClose = () =>
- {
- Time.timeScale = 1;
- GA_Hero.s_MapSwitching = false;
- if (PreFightMission.Instance.m_HuaShouEffect)
- {
- EffectMgr.Instance.RecyleUIEffect(1050, PreFightMission.Instance.m_HuaShouEffect.gameObject);
- PreFightMission.Instance.m_HuaShouEffect = null;
- }
-
- PlayerDatas.Instance.hero.CastSkill(190);
-
- if (m_UIEffect)
- {
- EffectMgr.Instance.RecyleUIEffect(m_UIEffect.effect, m_UIEffect.gameObject);
- m_UIEffect = null;
- }
-
- Transform _temp1 = WindowCenter.Instance.uiRoot.baseCanvas.Find("MainInterfaceWin/JoyStick");
- _temp1.gameObject.SetActive(true);
- };
-
- WindowCenter.Instance.Open<NewGuideWin>();
-
- HeroBehaviour.OnUserClickSkill += OnCastSkill;
-
- Transform _temp = skillContainer.blinkSkill.transform.Find("Img_BackGround");
- PreFightMission.Instance.m_HuaShouEffect = EffectMgr.Instance.PlayUIEffect(1050, 4500, _temp, true);
-
- m_Step = 1;
- }
- }
- else if (m_Step == 41)
- {
- m_TimeCount += Time.deltaTime;
- if (m_TimeCount > 1f)
- {
- PreFightMission.Instance.Step_Boss_SkillShow();
- PreFightMission.Instance.OnFinishedBossSkillShow += BossFinishedSkillShow;
-
- GA_Hero.s_MapSwitching = true;
-
- m_Step = 42;
- }
- }
- else if (m_Step == 43)
- {
- m_TimeCount += Time.deltaTime;
- if (m_TimeCount > 1.2f)
- {
- PreFightMission.Instance.updateAI = true;
- m_Step = 5;
- PreFightMission.Instance.faBaoSkillShow = false;
- }
- }
- }
-}
diff --git a/Fight/Actor/State/SMB/STM_BaseAttack.cs b/Fight/Actor/State/SMB/STM_BaseAttack.cs
index fc627f3..038c056 100644
--- a/Fight/Actor/State/SMB/STM_BaseAttack.cs
+++ b/Fight/Actor/State/SMB/STM_BaseAttack.cs
@@ -125,6 +125,8 @@
if (owner.ServerInstID == PlayerDatas.Instance.PlayerId)
{
+ GA_Hero.CallOnStateEnter(animator.GetCurrentAnimatorClipInfo(0).Length);
+
if (owner.State == E_ActorState.AutoRun)
{
owner.StopPathFind();
@@ -153,6 +155,8 @@
{
HeadUpSkillName.Popup(cacheSkillID, owner.Root.position, CameraController.Instance.CameraObject);
}
+
+
}
if (_player is GA_Player)
@@ -247,6 +251,11 @@
if (owner.ActorType == GameObjType.gotPlayer)
{
+ if (owner is GA_Hero)
+ {
+ GA_Hero.CallOnStateEnd();
+ }
+
GActorPlayerBase _player = owner as GActorPlayerBase;
if (_player != null)
{
diff --git a/Fight/GameActor/GA_Hero.cs b/Fight/GameActor/GA_Hero.cs
index f899523..f6bca13 100644
--- a/Fight/GameActor/GA_Hero.cs
+++ b/Fight/GameActor/GA_Hero.cs
@@ -22,6 +22,25 @@
// }
//}
+ public static event UnityAction<float> OnStateEnter;
+ public static event UnityAction OnStateEnd;
+
+ public static void CallOnStateEnter(float length)
+ {
+ if (OnStateEnter != null)
+ {
+ OnStateEnter(length);
+ }
+ }
+
+ public static void CallOnStateEnd()
+ {
+ if (OnStateEnd != null)
+ {
+ OnStateEnd();
+ }
+ }
+
/// <summary>
/// 褰撳垏鎹㈤攣瀹氱洰鏍囩殑鏃跺��, 涓虹┖鐨勬椂鍊檌d=0
/// </summary>
diff --git a/Fight/Stage/CreateRoleStage.cs b/Fight/Stage/CreateRoleStage.cs
index 7179c9e..cb0a5f8 100644
--- a/Fight/Stage/CreateRoleStage.cs
+++ b/Fight/Stage/CreateRoleStage.cs
@@ -31,7 +31,8 @@
protected override void OnStageLoadFinish()
{
base.OnStageLoadFinish();
- WindowCenter.Instance.Open<CreateRoleWin>(true);
+
+ CreateRoleManager.Instance.StarShow();
WindowCenter.Instance.Close<LaunchBackGroundWin>();
}
@@ -39,11 +40,8 @@
{
base.UnInitialize();
+ CreateRoleManager.Instance.Dispose();
WindowCenter.Instance.Close<CreateRoleWin>();
-
-#if !UNITY_EDITOR
- AssetBundleUtility.Instance.UnloadAssetBundle("mob/createrole", true, true);
-#endif
}
}
diff --git a/Fight/Stage/SelectRoleStage.cs b/Fight/Stage/SelectRoleStage.cs
index 6c5f705..96a298f 100644
--- a/Fight/Stage/SelectRoleStage.cs
+++ b/Fight/Stage/SelectRoleStage.cs
@@ -24,9 +24,6 @@
{
InGameDownLoad.Instance.TryDownLoad(InGameDownLoad.Dominant.None);
}
-
- //灞忚斀鑱屼笟鐗规晥棰勫厛鍔犺浇閫伙紝浠ュ噺灏戜笉蹇呰鐨勫唴瀛樻崯鑰楀拰鑾峰緱鏇村揩鐨勫満鏅垏鎹㈤�熷害锛岃祫婧愬帇缂╀娇鐢↙Z4鎵嶈銆�
- // AssetPreLoad.Instance.PreLoadJobEffect(PlayerDatas.Instance.loginInfo.Job);
}
public override void UnInitialize()
diff --git a/Lua/Gen/CreateRoleConfigWrap.cs b/Lua/Gen/CreateRoleConfigWrap.cs
index 0b26696..fd26f33 100644
--- a/Lua/Gen/CreateRoleConfigWrap.cs
+++ b/Lua/Gen/CreateRoleConfigWrap.cs
@@ -336,14 +336,6 @@
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _g_get_desc(RealStatePtr L)
{
- try {
- ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
-
- CreateRoleConfig gen_to_be_invoked = (CreateRoleConfig)translator.FastGetCSObj(L, 1);
- LuaAPI.lua_pushstring(L, gen_to_be_invoked.desc);
- } catch(System.Exception gen_e) {
- return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
- }
return 1;
}
diff --git a/System/CreateRole.meta b/System/CreateRole.meta
new file mode 100644
index 0000000..90c1057
--- /dev/null
+++ b/System/CreateRole.meta
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: acd47e44c9a384044aef0466db699e20
+folderAsset: yes
+timeCreated: 1554861231
+licenseType: Pro
+DefaultImporter:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/System/CreateRole/CreateRoleBehaviour.cs b/System/CreateRole/CreateRoleBehaviour.cs
new file mode 100644
index 0000000..6aee7d8
--- /dev/null
+++ b/System/CreateRole/CreateRoleBehaviour.cs
@@ -0,0 +1,199 @@
+锘縰sing System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+using Snxxz.UI;
+
+public class CreateRoleBehaviour : MonoBehaviour
+{
+ [SerializeField] int m_Job;
+ [SerializeField] float m_Scale = 1;
+ [SerializeField] EnterPictureType m_EnterPictureType;
+
+ [SerializeField] ShowAnimation m_EnterShowAnimation;
+ [SerializeField] ShowAnimation m_RoutimeShowAnimation;
+
+ [SerializeField] Effect[] m_PersistentEffect;
+ [SerializeField] Effect[] m_EnterShowEffect;
+ [SerializeField] Effect[] m_RoutimeShowEffect;
+
+ [SerializeField] CreateRoleHeroPlatform m_Platform;
+ [SerializeField] ActorShadowCaster m_Shadow;
+
+ CreateRoleTimeLine showTimeLine = new CreateRoleTimeLine();
+
+ public State state { get; private set; }
+
+ List<SFXController> sfxControllers = new List<SFXController>();
+
+ public void DoEnterShow()
+ {
+ CreateRoleManager.Instance.LoadModel(m_Job, (bool ok, UnityEngine.Object @object) =>
+ {
+ if (ok)
+ {
+ var model = @object as GameObject;
+ model.transform.SetParentEx(m_Platform.transform, Vector3.zero, Quaternion.identity, Vector3.one * m_Scale);
+ m_Shadow.Cast(model.transform);
+ model.SetActive(true);
+
+ ReleaseEffects();
+
+ state = State.EnterShow;
+ showTimeLine.ClearNode();
+
+ foreach (var effect in m_PersistentEffect)
+ {
+ showTimeLine.AddNone(effect.delay, () =>
+ {
+ PlayEffect(model.transform, effect);
+ });
+ }
+
+ foreach (var effect in m_EnterShowEffect)
+ {
+ showTimeLine.AddNone(effect.delay, () =>
+ {
+ PlayEffect(model.transform, effect);
+ });
+ }
+
+ showTimeLine.AddNone(m_EnterShowAnimation.delay, () =>
+ {
+ var animator = model.GetComponent<Animator>();
+ animator.Play(m_EnterShowAnimation.animation);
+ });
+
+ showTimeLine.AddNone(5f, () =>
+ {
+ WindowCenter.Instance.Open<CreateRoleWin>();
+ });
+
+ showTimeLine.OnComplete(() => { state = State.Idle; });
+ showTimeLine.Begin();
+ }
+ });
+ }
+
+ public void DoRoutineShow()
+ {
+ CreateRoleManager.Instance.LoadModel(m_Job, (bool ok, UnityEngine.Object @object) =>
+ {
+ if (ok)
+ {
+ var model = @object as GameObject;
+ model.transform.SetParentEx(m_Platform.transform, Vector3.zero, Quaternion.identity, Vector3.one * m_Scale);
+
+ switch (m_EnterPictureType)
+ {
+ case EnterPictureType.OutIn:
+ model.SetActive(false);
+ break;
+ case EnterPictureType.Stand:
+ model.SetActive(true);
+ m_Shadow.Cast(model.transform);
+ break;
+ }
+
+ ReleaseEffects();
+ state = State.RoutimeShow;
+
+ showTimeLine.ClearNode();
+ showTimeLine.AddNone(m_RoutimeShowAnimation.delay, () =>
+ {
+ if (m_EnterPictureType == EnterPictureType.OutIn)
+ {
+ model.SetActive(true);
+ m_Shadow.Cast(model.transform);
+ }
+
+ var animator = model.GetComponent<Animator>();
+ animator.Play(m_RoutimeShowAnimation.animation);
+ });
+
+ foreach (var effect in m_PersistentEffect)
+ {
+ showTimeLine.AddNone(effect.delay, () =>
+ {
+ PlayEffect(model.transform, effect);
+ });
+ }
+
+ foreach (var effect in m_RoutimeShowEffect)
+ {
+ showTimeLine.AddNone(effect.delay, () =>
+ {
+ PlayEffect(model.transform, effect);
+ });
+ }
+
+ showTimeLine.AddNone(2f, () =>
+ {
+ WindowCenter.Instance.Open<CreateRoleWin>();
+ });
+
+ showTimeLine.OnComplete(() => { state = State.Idle; });
+ showTimeLine.Begin();
+ }
+ });
+ }
+
+ public void Dispose()
+ {
+ showTimeLine.Dispose();
+ ReleaseEffects();
+ }
+
+ private void PlayEffect(Transform model, Effect effect)
+ {
+ var config = EffectConfig.Get(effect.id);
+ Transform parent = null;
+ if (!string.IsNullOrEmpty(config.nodeName))
+ {
+ parent = model.transform.GetChildTransformDeeply(config.nodeName);
+ }
+ else
+ {
+ parent = model.transform;
+ }
+
+ sfxControllers.Add(SFXPlayUtility.Instance.Play(effect.id, parent));
+ }
+
+ public void ReleaseEffects()
+ {
+ for (var i = sfxControllers.Count - 1; i >= 0; i--)
+ {
+ SFXPlayUtility.Instance.Release(sfxControllers[i]);
+ }
+
+ sfxControllers.Clear();
+ }
+
+ [System.Serializable]
+ public struct ShowAnimation
+ {
+ public string animation;
+ public float delay;
+ }
+
+ [System.Serializable]
+ public struct Effect
+ {
+ public int id;
+ public float delay;
+ }
+
+ public enum EnterPictureType
+ {
+ Stand,
+ OutIn,
+ }
+
+ public enum State
+ {
+ Idle,
+ EnterShow,
+ RoutimeShow,
+ }
+
+}
diff --git a/Fight/Actor/AI/AI_BossDSX.cs.meta b/System/CreateRole/CreateRoleBehaviour.cs.meta
similarity index 75%
copy from Fight/Actor/AI/AI_BossDSX.cs.meta
copy to System/CreateRole/CreateRoleBehaviour.cs.meta
index 232ab26..a4aa474 100644
--- a/Fight/Actor/AI/AI_BossDSX.cs.meta
+++ b/System/CreateRole/CreateRoleBehaviour.cs.meta
@@ -1,6 +1,6 @@
fileFormatVersion: 2
-guid: 265e7ff764601cf44991055e126d0d33
-timeCreated: 1514970107
+guid: 94bce01d1e0ec5749aab4069a3c81613
+timeCreated: 1554861327
licenseType: Pro
MonoImporter:
serializedVersion: 2
diff --git a/System/CreateRole/CreateRoleManager.cs b/System/CreateRole/CreateRoleManager.cs
new file mode 100644
index 0000000..bff66af
--- /dev/null
+++ b/System/CreateRole/CreateRoleManager.cs
@@ -0,0 +1,93 @@
+锘縰sing System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+using System;
+
+public class CreateRoleManager : Singleton<CreateRoleManager>
+{
+ CreateRoleProcessor m_Processor;
+ CreateRoleProcessor processor {
+ get {
+ return m_Processor ?? (m_Processor = GameObject.FindObjectOfType<CreateRoleProcessor>());
+ }
+ }
+
+ Dictionary<int, GameObject> jobModels = new Dictionary<int, GameObject>();
+
+ public readonly LogicInt selectedJob = new LogicInt();
+
+ public void StarShow()
+ {
+ selectedJob.value = 1;
+ processor.LoadNecessaryResources();
+ processor.DoEnterShow();
+ }
+
+ public void View(int job)
+ {
+ selectedJob.value = job;
+ switch (job)
+ {
+ case 1:
+ processor.SwitchToWarrior();
+ break;
+ case 2:
+ processor.SwitchToMagic();
+ break;
+ }
+ }
+
+ public void Dispose()
+ {
+ m_Processor.Dispose();
+ m_Processor = null;
+
+ jobModels.Clear();
+ if (!AssetSource.mobFromEditor)
+ {
+ AssetBundleUtility.Instance.UnloadAssetBundle("mob/createrole", true, false);
+ }
+ }
+
+ public void LoadModel(int job, Action<bool, UnityEngine.Object> _callBack)
+ {
+ if (jobModels.ContainsKey(job))
+ {
+ if (_callBack != null)
+ {
+ _callBack(true, jobModels[job]);
+ }
+
+ return;
+ }
+
+ Action<bool, UnityEngine.Object> assetCallBack = (bool _ok, UnityEngine.Object _asset) =>
+ {
+ GameObject instance = null;
+ if (_ok)
+ {
+ instance = GameObject.Instantiate(_asset) as GameObject;
+ if (instance != null)
+ {
+ jobModels[job] = instance;
+ }
+ }
+
+ if (_callBack != null)
+ {
+ _callBack(_ok && instance != null, instance);
+ }
+ };
+
+ InstanceResourcesLoader.LoadCreateRole(job, assetCallBack);
+ }
+
+ public void ReleaseModel(int job)
+ {
+ if (jobModels.ContainsKey(job))
+ {
+ jobModels[job].gameObject.SetActive(false);
+ }
+ }
+
+}
diff --git a/Fight/Actor/AI/AI_BossDSX.cs.meta b/System/CreateRole/CreateRoleManager.cs.meta
similarity index 75%
rename from Fight/Actor/AI/AI_BossDSX.cs.meta
rename to System/CreateRole/CreateRoleManager.cs.meta
index 232ab26..733646c 100644
--- a/Fight/Actor/AI/AI_BossDSX.cs.meta
+++ b/System/CreateRole/CreateRoleManager.cs.meta
@@ -1,6 +1,6 @@
fileFormatVersion: 2
-guid: 265e7ff764601cf44991055e126d0d33
-timeCreated: 1514970107
+guid: 0c3b8f02b7ef2f74aa676f88444c8e6b
+timeCreated: 1554861276
licenseType: Pro
MonoImporter:
serializedVersion: 2
diff --git a/System/CreateRole/CreateRoleProcessor.cs b/System/CreateRole/CreateRoleProcessor.cs
new file mode 100644
index 0000000..33ddc23
--- /dev/null
+++ b/System/CreateRole/CreateRoleProcessor.cs
@@ -0,0 +1,90 @@
+锘縰sing System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+using Snxxz.UI;
+
+public class CreateRoleProcessor : MonoBehaviour
+{
+ [SerializeField] CreateRoleBehaviour m_Warrior;
+ [SerializeField] CreateRoleBehaviour m_Magic;
+
+ [SerializeField] CameraParams m_CameraParams;
+
+ Animator cameraAnimator;
+ Camera createRoleCamera;
+
+ public void LoadNecessaryResources()
+ {
+ if (cameraAnimator == null || createRoleCamera == null)
+ {
+ var prefab = SceneLoader.LoadCreateRole(m_CameraParams.prefabName);
+ var instance = GameObject.Instantiate(prefab);
+ cameraAnimator = instance.GetComponent<Animator>();
+ createRoleCamera = instance.GetComponentInChildren<Camera>(true);
+ }
+ }
+
+ public void DoEnterShow()
+ {
+ WindowCenter.Instance.Close<CreateRoleWin>();
+ cameraAnimator.Play(m_CameraParams.enterShow);
+ m_Warrior.gameObject.SetActive(true);
+ m_Warrior.DoEnterShow();
+ }
+
+ public void SwitchToWarrior()
+ {
+ WindowCenter.Instance.Close<CreateRoleWin>();
+ cameraAnimator.Play(m_CameraParams.magicToWarrior);
+ m_Magic.ReleaseEffects();
+ m_Warrior.ReleaseEffects();
+
+ StopCoroutine("Co_SwitchToWarrior");
+ StartCoroutine("Co_SwitchToWarrior");
+ }
+
+ public void SwitchToMagic()
+ {
+ WindowCenter.Instance.Close<CreateRoleWin>();
+ cameraAnimator.Play(m_CameraParams.warriorToMagic);
+ m_Magic.ReleaseEffects();
+ m_Warrior.ReleaseEffects();
+
+ StopCoroutine("Co_SwitchToMagic");
+ StartCoroutine("Co_SwitchToMagic");
+ }
+
+ IEnumerator Co_SwitchToWarrior()
+ {
+ m_Warrior.gameObject.SetActive(true);
+ yield return WaitingForSecondConst.WaitMS1000;
+
+ m_Magic.gameObject.SetActive(false);
+ m_Warrior.DoRoutineShow();
+ }
+
+ IEnumerator Co_SwitchToMagic()
+ {
+ yield return WaitingForSecondConst.WaitMS1000;
+ m_Warrior.gameObject.SetActive(false);
+ m_Magic.gameObject.SetActive(true);
+ m_Magic.DoRoutineShow();
+ }
+
+ public void Dispose()
+ {
+ m_Warrior.Dispose();
+ m_Magic.Dispose();
+ }
+
+ [System.Serializable]
+ public struct CameraParams
+ {
+ public string prefabName;
+ public string enterShow;
+ public string warriorToMagic;
+ public string magicToWarrior;
+ }
+
+
+}
diff --git a/Fight/Actor/AI/AI_BossDSX.cs.meta b/System/CreateRole/CreateRoleProcessor.cs.meta
similarity index 75%
copy from Fight/Actor/AI/AI_BossDSX.cs.meta
copy to System/CreateRole/CreateRoleProcessor.cs.meta
index 232ab26..1425b09 100644
--- a/Fight/Actor/AI/AI_BossDSX.cs.meta
+++ b/System/CreateRole/CreateRoleProcessor.cs.meta
@@ -1,6 +1,6 @@
fileFormatVersion: 2
-guid: 265e7ff764601cf44991055e126d0d33
-timeCreated: 1514970107
+guid: 2ae1317e6fb06ee449130819c45f90c5
+timeCreated: 1554864340
licenseType: Pro
MonoImporter:
serializedVersion: 2
diff --git a/System/CreateRole/CreateRoleTimeLine.cs b/System/CreateRole/CreateRoleTimeLine.cs
new file mode 100644
index 0000000..8d67a5f
--- /dev/null
+++ b/System/CreateRole/CreateRoleTimeLine.cs
@@ -0,0 +1,113 @@
+锘縰sing System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+using System;
+
+public class CreateRoleTimeLine
+{
+ public bool busying { get; private set; }
+
+ Action onComplete;
+ List<Node> nodes = new List<Node>();
+ LogicUpdate update;
+
+ public CreateRoleTimeLine()
+ {
+ update = new LogicUpdate();
+ update.Start(OnUpdate);
+ }
+
+ public void AddNone(float time, Action task)
+ {
+ nodes.Add(new Node()
+ {
+ time = Time.time + time,
+ task = task
+ });
+ }
+
+ public void Begin()
+ {
+ busying = true;
+ }
+
+ public void Stop()
+ {
+ Reset();
+ busying = false;
+ }
+
+ public void OnComplete(Action onComplete)
+ {
+ this.onComplete = onComplete;
+ }
+
+ public void ClearNode()
+ {
+ nodes.Clear();
+ }
+
+ public void Dispose()
+ {
+ ClearNode();
+ if (update != null)
+ {
+ update.Destroy();
+ }
+ }
+
+ private void Reset()
+ {
+ foreach (var node in nodes)
+ {
+ node.executed = false;
+ }
+ }
+
+ private void OnUpdate()
+ {
+ var allExecuted = true;
+ foreach (var node in nodes)
+ {
+ if (!node.executed)
+ {
+ if (Time.time >= node.time)
+ {
+ node.Execute();
+ }
+ }
+ else
+ {
+ allExecuted = false;
+ }
+ }
+
+ if (allExecuted)
+ {
+ if (this.onComplete != null)
+ {
+ this.onComplete();
+ }
+
+ busying = false;
+ }
+ }
+
+ public class Node
+ {
+ public bool executed;
+ public float time;
+ public Action task;
+
+ public void Execute()
+ {
+ executed = true;
+ if (task != null)
+ {
+ task();
+ }
+ }
+ }
+
+
+}
diff --git a/Fight/Actor/AI/AI_BossDSX.cs.meta b/System/CreateRole/CreateRoleTimeLine.cs.meta
similarity index 75%
copy from Fight/Actor/AI/AI_BossDSX.cs.meta
copy to System/CreateRole/CreateRoleTimeLine.cs.meta
index 232ab26..e13eaa5 100644
--- a/Fight/Actor/AI/AI_BossDSX.cs.meta
+++ b/System/CreateRole/CreateRoleTimeLine.cs.meta
@@ -1,6 +1,6 @@
fileFormatVersion: 2
-guid: 265e7ff764601cf44991055e126d0d33
-timeCreated: 1514970107
+guid: 6faa6c8425ab0bc4ea46a56636ebef92
+timeCreated: 1554954545
licenseType: Pro
MonoImporter:
serializedVersion: 2
diff --git a/System/DailyQuest/DailyQuestWin.cs b/System/DailyQuest/DailyQuestWin.cs
index 7b1ca7b..799a79b 100644
--- a/System/DailyQuest/DailyQuestWin.cs
+++ b/System/DailyQuest/DailyQuestWin.cs
@@ -319,6 +319,10 @@
case DailyQuestType.AllianceBoss:
GotoAllianceBoss(_id, 0);
break;
+ case DailyQuestType.RidingPetActivity:
+ WindowCenter.Instance.Close<DailyQuestWin>();
+ WindowCenter.Instance.Open<LootPreciousFrameWin>(false, 1);
+ break;
case DailyQuestType.HazyRegion:
WindowCenter.Instance.Close<DailyQuestWin>();
WindowCenter.Instance.Open<CrossServerWin>(false, 2);
diff --git a/System/EquipStar/EquipStarModel.cs b/System/EquipStar/EquipStarModel.cs
index f978e21..a3b0b6b 100644
--- a/System/EquipStar/EquipStarModel.cs
+++ b/System/EquipStar/EquipStarModel.cs
@@ -22,6 +22,8 @@
{5,new LogicString () },
};
+ public readonly LogicList<Star> stars = new LogicList<Star>();
+
public readonly LogicInt specialMaterial = new LogicInt();
public readonly LogicInt starResultEffect = new LogicInt();
@@ -52,6 +54,7 @@
public void UpdateStarLevels(HA3B1_tagMCEquipPartStarInfo info)
{
+ var selectedEquipOldStar = GetEquipStarLevel(new Int2(selectedLevel.value, selectedPlace.value));
for (var i = 0; i < info.InfoList.Length; i++)
{
var equipPosition = EquipSet.ServerPlaceToClientPlace(info.InfoList[i].EquipPackIndex);
@@ -62,8 +65,12 @@
}
}
- equipStarLevel.value = GetEquipStarLevel(new Int2(selectedLevel.value, selectedPlace.value));
+ var starLevel = GetEquipStarLevel(new Int2(selectedLevel.value, selectedPlace.value));
+ equipStarLevel.value = starLevel;
selectedPlace.dirty = true;
+
+ var maxStarLevel = GetMaxStarLevel(selectedLevel.value);
+ UpdateSelelctedEquipStars(selectedEquipOldStar, starLevel, maxStarLevel);
foreach (var candidate in candidatePlaces.Values)
{
@@ -174,6 +181,8 @@
{
item.value = string.Empty;
}
+
+ stars.Clear();
}
public void SelectLevel(int level)
@@ -212,9 +221,12 @@
candidate.selected.value = candidate.equipPosition == equipPosition;
}
- equipStarLevel.value = GetEquipStarLevel(equipPosition);
- equipMaxStarLevel.value = GetMaxStarLevel(equipPosition.x);
+ var starLevel = GetEquipStarLevel(equipPosition);
+ var maxStarLevel = GetMaxStarLevel(equipPosition.x);
+ equipStarLevel.value = starLevel;
+ equipMaxStarLevel.value = maxStarLevel;
+ UpdateSelelctedEquipStars(starLevel, starLevel, maxStarLevel);
AutoAddMaterials(equipPosition);
CalculateStarUpgradeProbability(equipPosition);
}
@@ -558,6 +570,19 @@
return materials.ContainsKey(index) ? materials[index] : null;
}
+ private void UpdateSelelctedEquipStars(int oldStarLevel, int newStarLevel, int maxStarLevel)
+ {
+ stars.Clear();
+ for (var i = 1; i <= maxStarLevel; i++)
+ {
+ stars.Add(new Star()
+ {
+ actived = i <= newStarLevel,
+ newGet = i <= newStarLevel && i > oldStarLevel,
+ });
+ }
+ }
+
private void ParseConfig()
{
var configs = EquipStarConfig.GetValues();
@@ -570,6 +595,11 @@
}
}
+ public struct Star
+ {
+ public bool actived;
+ public bool newGet;
+ }
}
}
diff --git a/System/EquipStar/EquipStarWin.cs b/System/EquipStar/EquipStarWin.cs
index 385b79a..e6dec43 100644
--- a/System/EquipStar/EquipStarWin.cs
+++ b/System/EquipStar/EquipStarWin.cs
@@ -15,7 +15,7 @@
public class EquipStarWin : Window
{
[SerializeField] RectTransform m_LevelContainer;
- [SerializeField] ImageCouple[] m_Stars;
+ [SerializeField] Star[] m_Stars;
[SerializeField] ItemCell m_TargetEquip;
[SerializeField] Text m_EquipStar;
[SerializeField] Materials m_Materials;
@@ -56,7 +56,6 @@
}
DisplayBaseInfo();
- DisplayDynamicInfo(true);
}
protected override void OnAfterOpen()
@@ -71,6 +70,12 @@
protected override void OnAfterClose()
{
model.ResetOperateParams();
+ }
+
+ protected override void OnActived()
+ {
+ base.OnActived();
+ DisplayDynamicInfo(true);
}
protected override void LateUpdate()
@@ -143,9 +148,13 @@
var equipPosition = new Int2(model.selectedLevel.value, model.selectedPlace.value);
var starLevel = model.equipStarLevel.Fetch();
var maxStar = model.equipMaxStarLevel.Fetch();
- DisplayStars(equipPosition, starLevel, maxStar);
DisplayPropertyPreview(equipPosition, starLevel, EquipStarModel.GetMaxStarLevel(equipPosition.x));
DisplayStarUpgradeButton(equipPosition, starLevel);
+ }
+
+ if (force || model.stars.dirty)
+ {
+ DisplayStars(model.stars.Fetch());
}
if (force || model.starUpgradeProbability.dirty)
@@ -167,29 +176,10 @@
}
}
- private void DisplayStars(Int2 equipPosition, int currentStar, int maxStar)
+ private void DisplayStars(List<EquipStarModel.Star> stars)
{
- if (equipPosition.y == 0)
- {
- foreach (var behaviour in m_Stars)
- {
- behaviour.Hide();
- }
- }
- else
- {
- for (var i = 0; i < m_Stars.Length; i++)
- {
- if (i < maxStar)
- {
- m_Stars[i].Display(i < currentStar);
- }
- else
- {
- m_Stars[i].Hide();
- }
- }
- }
+ StopCoroutine("Co_DisplayStars");
+ StartCoroutine("Co_DisplayStars", stars);
}
private void DisplayMaterialSlots(Int2 equipPosition, int currentStarLevel)
@@ -427,6 +417,32 @@
m_EffectFailed.Play();
}
+ IEnumerator Co_DisplayStars(List<EquipStarModel.Star> stars)
+ {
+ var hasNewStar = stars.FindIndex(x => { return x.newGet; }) != -1;
+ if (hasNewStar)
+ {
+ yield return WaitingForSecondConst.WaitMS2000;
+ }
+
+ for (var i = 0; i < m_Stars.Length; i++)
+ {
+ if (i < stars.Count)
+ {
+ var star = stars[i];
+ m_Stars[i].Display(star.actived);
+ if (star.newGet)
+ {
+ m_Stars[i].PlayEffect();
+ }
+ }
+ else
+ {
+ m_Stars[i].Hide();
+ }
+ }
+ }
+
private void ViewEquipTip()
{
var level = model.selectedLevel.value;
@@ -440,11 +456,12 @@
}
[System.Serializable]
- public class ImageCouple
+ public class Star
{
public RectTransform container;
public Image imageBase;
public Image imageStar;
+ public UIEffect newStarEffect;
public void Display(bool active)
{
@@ -456,6 +473,11 @@
{
container.gameObject.SetActive(false);
}
+
+ public void PlayEffect()
+ {
+ newStarEffect.Play();
+ }
}
[System.Serializable]
diff --git a/System/Launch/LaunchBackGroundWin.cs b/System/Launch/LaunchBackGroundWin.cs
index bafb2b3..a47f080 100644
--- a/System/Launch/LaunchBackGroundWin.cs
+++ b/System/Launch/LaunchBackGroundWin.cs
@@ -17,16 +17,11 @@
{
[SerializeField] RectTransform m_StaticBackGround;
[SerializeField] Image m_BackGroundImage;
- [SerializeField] RectTransform m_DynamicBackGround;
- [SerializeField] SkeletonGraphic m_SkeletonGraphic;
+ [SerializeField] UIAlphaTween m_AlphaTween;
- GameObject loginEffect;
-
- bool useStaticBackGround = false;
#region Built-in
protected override void BindController()
{
- loginEffect = this.transform.Find("Pivot/Effect_DengLu").gameObject;
}
protected override void AddListeners()
@@ -36,41 +31,18 @@
protected override void OnPreOpen()
{
var sprite = BuiltInLoader.LoadSprite("LoginBackGround");
- useStaticBackGround = sprite != null;
-
- if (useStaticBackGround)
- {
- m_BackGroundImage.overrideSprite = sprite;
- m_StaticBackGround.gameObject.SetActive(true);
- m_DynamicBackGround.gameObject.SetActive(false);
- }
- else
- {
- m_StaticBackGround.gameObject.SetActive(false);
- m_DynamicBackGround.gameObject.SetActive(true);
- }
-
- if (loginEffect != null)
- {
- loginEffect.gameObject.SetActive(false);
- }
+ m_BackGroundImage.overrideSprite = sprite;
+ m_StaticBackGround.gameObject.SetActive(true);
this.transform.SetAsFirstSibling();
}
protected override void OnAfterOpen()
{
- StageLoad.Instance.onStageLoadFinish += ShowLoginEffect;
- if (StageLoad.Instance.currentStage is LoginStage)
- {
- ShowLoginEffect();
- }
}
protected override void OnPreClose()
{
- StageLoad.Instance.onStageLoadFinish -= ShowLoginEffect;
- Resources.UnloadAsset(m_SkeletonGraphic.material);
}
protected override void OnAfterClose()
@@ -80,33 +52,15 @@
protected override void OnActived()
{
base.OnActived();
-
- if (!useStaticBackGround)
- {
- if (m_SkeletonGraphic != null)
- {
- m_SkeletonGraphic.AnimationState.SetEmptyAnimations(0);
- }
- }
}
- #endregion
- void ShowLoginEffect()
+ private void Start()
{
- if (!useStaticBackGround)
- {
- if (loginEffect != null)
- {
- loginEffect.gameObject.SetActive(true);
- }
-
- if (m_SkeletonGraphic != null)
- {
- m_SkeletonGraphic.AnimationState.SetAnimation(0, "animation2", true);
- }
- }
+ m_AlphaTween.Play();
}
+ #endregion
+
}
}
diff --git a/System/Login/CreateRoleHeroShow.cs b/System/Login/CreateRoleHeroShow.cs
deleted file mode 100644
index 2efc14a..0000000
--- a/System/Login/CreateRoleHeroShow.cs
+++ /dev/null
@@ -1,178 +0,0 @@
-锘縰sing System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-using Snxxz.UI;
-
-public class CreateRoleHeroShow : MonoBehaviour
-{
- [SerializeField] Camera m_CreateRoleCamera;
- [SerializeField] CreateRoleHeroPlatform m_HeroPlatform;
- [SerializeField] ActorShadowCaster m_Shadow;
- [SerializeField] Animation m_CameraAnimation;
-
- int m_CurrentShowJob = 0;
- SFXController m_CreateRoleEffect;
-
- UI3DShowHero playerModel = new UI3DShowHero();
-
- public void CreateRoleShow(int _job)
- {
- UI3DModelFactory.ReleaseCreateRole(_job);
- m_CurrentShowJob = _job;
- UI3DModelFactory.LoadCreateRole(_job, OnLoadCreateRoleCallBack);
- }
-
- private void OnLoadCreateRoleCallBack(bool _ok, Object _object)
- {
- if (!_ok)
- {
- return;
- }
-
- var instance = _object as GameObject;
- if (instance == null)
- {
- return;
- }
-
- var parent = instance.transform.GetChildTransformDeeply(GAStaticDefine.WeaponBindBoneName);
-
- m_HeroPlatform.transform.localEulerAngles = new Vector3(0, 180, 0);
-
- instance.transform.SetParentEx(m_HeroPlatform.transform, Vector3.zero, Quaternion.identity, Vector3.one);
- instance.SetActive(true);
-
- m_Shadow.Cast(instance.transform);
-
- var animator = instance.GetComponent<Animator>();
- if (animator != null)
- {
- animator.Play("Appear", 0, 0f);
- m_HeroPlatform.ForbidSeconds(4);
- }
-
- if (m_CreateRoleEffect != null)
- {
- SFXPlayUtility.Instance.Release(m_CreateRoleEffect);
- m_CreateRoleEffect = null;
- }
-
- switch (m_CurrentShowJob)
- {
- case 1:
- m_CreateRoleEffect = SFXPlayUtility.Instance.Play(10006, instance.transform);
- SoundPlayer.Instance.PlayUIAudio(95);
- SoundPlayer.Instance.PlayNpcAudio(689);
- break;
- case 2:
- m_CreateRoleEffect = SFXPlayUtility.Instance.Play(10005, instance.transform);
- SoundPlayer.Instance.PlayUIAudio(96);
- SoundPlayer.Instance.PlayNpcAudio(690);
- break;
- case 3:
- break;
- }
- }
-
- public void SelectRoleShow()
- {
- Dispose();
-
- var fashionClothes = 0;
- var fashionWeapon = 0;
- var fashionSecondary = 0;
- var clothesItemId = 0;
- var weaponItemId = 0;
- var wingsItemId = 0;
- var secondaryItemId = 0;
- var suitLevel = 0;
- var equipInfos = PlayerDatas.Instance.loginInfo.EquipInfo;
-
- for (int i = 0; i < equipInfos.Length; i++)
- {
- var equipInfo = equipInfos[i];
- var itemConfig = ItemConfig.Get((int)equipInfo.ItemID);
- switch ((RoleEquipType)itemConfig.EquipPlace)
- {
- case RoleEquipType.FashionClothes:
- fashionClothes = (int)equipInfo.ItemID;
- break;
- case RoleEquipType.FashionWeapon:
- fashionWeapon = (int)equipInfo.ItemID;
- break;
- case RoleEquipType.FashionWeapon2:
- fashionSecondary = (int)equipInfo.ItemID;
- break;
- case RoleEquipType.Weapon:
- weaponItemId = (int)equipInfo.ItemID;
- break;
- case RoleEquipType.Clothes:
- clothesItemId = (int)equipInfo.ItemID;
- break;
- case RoleEquipType.Wing:
- wingsItemId = (int)equipInfo.ItemID;
- break;
- case RoleEquipType.Weapon2:
- secondaryItemId = (int)equipInfo.ItemID;
- break;
- }
- }
-
- var data = new UI3DPlayerExhibitionData()
- {
- job = PlayerDatas.Instance.loginInfo.Job,
- fashionClothesId = fashionClothes,
- clothesId = clothesItemId,
- suitLevel = suitLevel,
- fashionWeaponId = fashionWeapon,
- weaponId = weaponItemId,
- wingsId = wingsItemId,
- fashionSecondaryId = fashionSecondary,
- secondaryId = secondaryItemId,
- };
-
- var model = playerModel.Show(data, m_HeroPlatform.transform);
- playerModel.StandUp();
- m_Shadow.Cast(model.transform);
- }
-
- public void Dispose()
- {
- playerModel.Dispose();
- UI3DModelFactory.ReleaseCreateRole(m_CurrentShowJob);
- if (m_CreateRoleEffect != null)
- {
- SFXPlayUtility.Instance.Release(m_CreateRoleEffect);
- m_CreateRoleEffect = null;
- }
-
- }
-
- private void OnEnable()
- {
- var aspect = Screen.width / (float)Screen.height;
- if (aspect < 1.6)
- {
- m_CreateRoleCamera.fieldOfView = 43;
- }
- else
- {
- m_CreateRoleCamera.fieldOfView = 35;
- }
- }
-
- private void OnDestroy()
- {
- StopAllCoroutines();
- UI3DModelFactory.ClearCreateRole();
- }
-
- [System.Serializable]
- public struct CreateRoleAnimation
- {
- public int job;
- public float delay;
- public string animation;
- }
-
-}
diff --git a/System/Login/CreateRoleWin.cs b/System/Login/CreateRoleWin.cs
index 2d7216f..f63293c 100644
--- a/System/Login/CreateRoleWin.cs
+++ b/System/Login/CreateRoleWin.cs
@@ -3,38 +3,36 @@
// [ Date ]: Saturday, September 02, 2017
//--------------------------------------------------------
-using System;
using System.Collections;
-using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
-
-using System.Text;
-using System.Text.RegularExpressions;
+using UnityEngine.Events;
namespace Snxxz.UI
{
public class CreateRoleWin : Window
{
- [SerializeField] Button qhBtn;
- [SerializeField] Image qhImg;
- [SerializeField] Button dsBtn;
- [SerializeField] Image dsImg;
- [SerializeField] Button jsBtn;
- [SerializeField] Image jsImg;
- [SerializeField] Button createBtn;
- [SerializeField] Button randomBtn;
- [SerializeField] Button backBtn;
- [SerializeField] InputField userNameInput;
- [SerializeField] Image m_DescImg;
- private int userJob = 0;
- CreateRoleHeroShow m_CreateRoleShow;
+ [SerializeField] SelectRoleButton m_JobSelect1;
+ [SerializeField] SelectRoleButton m_JobSelect2;
- LoginModel m_Model;
- LoginModel model { get { return m_Model ?? (m_Model = ModelCenter.Instance.GetModel<LoginModel>()); } }
+ [SerializeField] Button m_Create;
+ [SerializeField] Button m_RandomName;
+ [SerializeField] Button m_Back;
+
+ [SerializeField] InputField m_NameInput;
+
+ [SerializeField] Image m_Description;
+ [SerializeField] Image m_JobName;
+ [SerializeField] Image m_JobSign;
+
+ [SerializeField] PositionTween m_LeftPostionTween;
+ [SerializeField] PositionTween m_RightPositionTween;
+
+ LoginModel model { get { return ModelCenter.Instance.GetModel<LoginModel>(); } }
string m_MarkName = string.Empty;
+
#region Built-in
protected override void BindController()
{
@@ -42,17 +40,16 @@
protected override void AddListeners()
{
- qhBtn.onClick.AddListener(QhBtn);
- dsBtn.onClick.AddListener(DsBtn);
- jsBtn.onClick.AddListener(JsBtn);
+ m_JobSelect1.SetListener(SelectJob1);
+ m_JobSelect2.SetListener(SelectJob2);
- createBtn.onClick.AddListener(CreateBtn);
- randomBtn.onClick.AddListener(() =>
+ m_Back.SetListener(BackBtn);
+ m_Create.SetListener(CreateRole);
+ m_RandomName.SetListener(() =>
{
- ChangeUserName(true);
+ var job = CreateRoleManager.Instance.selectedJob.value;
+ ChangeUserName(job, true);
});
- backBtn.onClick.AddListener(BackBtn);
-
}
private void BackBtn()
@@ -62,25 +59,13 @@
protected override void OnPreOpen()
{
- DTC0309_tagPlayerLoginInfo.RoleChange += RoleChage;
+ DTC0309_tagPlayerLoginInfo.RoleChange += OnCreateRoleSuccess;
model.onCreateRole = true;
}
protected override void OnAfterOpen()
{
- userJob = 1;
- int _rand = UnityEngine.Random.Range(0, 100);
- for (int i = 0; i < GeneralDefine.RandomJobs.Count; i++)
- {
- var _value = GeneralDefine.RandomJobs[i];
- if (_value != 0 && _rand < _value)
- {
- userJob = i + 1;
- break;
- }
- }
- ChangeUserName(true);
- RoleShow(0.2f);
+
}
protected override void OnPreClose()
@@ -89,105 +74,95 @@
protected override void OnAfterClose()
{
- DTC0309_tagPlayerLoginInfo.RoleChange -= RoleChage;
+ DTC0309_tagPlayerLoginInfo.RoleChange -= OnCreateRoleSuccess;
model.onCreateRole = false;
- RemoveRoleModel();
}
+
+ protected override void OnActived()
+ {
+ base.OnActived();
+ m_LeftPostionTween.Play();
+ m_RightPositionTween.Play();
+
+ ChangeUserName(CreateRoleManager.Instance.selectedJob.value, true);
+ DisplayDynamicInfo(true);
+ }
+
+ protected override void LateUpdate()
+ {
+ base.LateUpdate();
+ DisplayDynamicInfo(false);
+ }
+
#endregion
- private void JsBtn()
+ private void DisplayDynamicInfo(bool force)
{
- if (userJob == 3)
+ if (force || CreateRoleManager.Instance.selectedJob.dirty)
{
- ChangeUserName(true);
+ var job = CreateRoleManager.Instance.selectedJob.Fetch();
+
+ m_JobSelect1.SetSelected(job == 1);
+ m_JobSelect2.SetSelected(job == 2);
+
+ var config = CreateRoleConfig.Get(job);
+ m_Description.SetSprite(config.description);
+ m_JobName.SetSprite(config.jobName);
+ m_JobSign.SetSprite(config.jobSign);
+ }
+ }
+
+ private void SelectJob1()
+ {
+ if (CreateRoleManager.Instance.selectedJob.value == 1)
+ {
+ ChangeUserName(1, true);
return;
}
- userJob = 3;
- ChangeUserName(false);
- RoleShow(0f);
+
+ ChangeUserName(1, false);
+ CreateRoleManager.Instance.View(1);
}
- private void DsBtn()
+ private void SelectJob2()
{
- if (userJob == 2)
+ if (CreateRoleManager.Instance.selectedJob.value == 2)
{
- ChangeUserName(true);
+ ChangeUserName(2, true);
return;
}
- userJob = 2;
- ChangeUserName(false);
- RoleShow(0f);
+
+ ChangeUserName(2, false);
+ CreateRoleManager.Instance.View(2);
}
- private void QhBtn()
+ private void ChangeUserName(int job, bool force = true)
{
- if (userJob == 1)
- {
- ChangeUserName(true);
- return;
- }
- userJob = 1;
- ChangeUserName(false);
- RoleShow(0f);
- }
-
- public void UpdateInfo()
- {
- CreateRoleConfig qhCfg = CreateRoleConfig.Get(1);
- CreateRoleConfig dsCfg = CreateRoleConfig.Get(2);
- CreateRoleConfig jsCfg = CreateRoleConfig.Get(3);
- CreateRoleConfig sltCfg = null;
- switch (userJob)
- {
- case 1:
- sltCfg = qhCfg;
- break;
- case 2:
- sltCfg = dsCfg;
- break;
- case 3:
- sltCfg = jsCfg;
- break;
- }
- qhBtn.image.SetSprite(userJob == 1 ? sltCfg.selectIcon : sltCfg.unselectIcon);
- dsBtn.image.SetSprite(userJob == 2 ? sltCfg.selectIcon : sltCfg.unselectIcon);
- jsBtn.image.SetSprite(userJob == 3 ? sltCfg.selectIcon : sltCfg.unselectIcon);
- qhImg.SetSprite(userJob == 1 ? "CreateRole_Job1_Select" : "CreateRole_Job1_UnSelect");
- dsImg.SetSprite(userJob == 2 ? "CreateRole_Job2_Select" : "CreateRole_Job2_UnSelect");
- jsImg.SetSprite(userJob == 3 ? "CreateRole_Job3_Select" : "CreateRole_Job3_UnSelect");
- m_DescImg.SetSprite(sltCfg.desc);
- }
-
- private void ChangeUserName(bool _force = true)
- {
- if (!_force && !m_MarkName.Equals(userNameInput.text))
+ if (!force && !m_MarkName.Equals(m_NameInput.text))
{
return;
}
- var _name = RandomNameConfig.GetFirstName(userJob) + RandomNameConfig.GetSecondName(userJob);
- m_MarkName = _name;
- ChangeUserName(_name);
+
+ var name = RandomNameConfig.GetFirstName(job) + RandomNameConfig.GetSecondName(job);
+ m_MarkName = name;
+ m_NameInput.text = name;
}
- private void ChangeUserName(string _name)
- {
- userNameInput.text = _name;
- }
-
- private void CreateBtn()
+ private void CreateRole()
{
if (GameNetSystem.Instance.netState == GameNetSystem.NetState.Connected)
{
return;
}
- if (userNameInput.text.Equals(string.Empty))
+ if (m_NameInput.text.Equals(string.Empty))
{
ServerTipDetails.DisplayNormalTip(Language.Get("CreateRole_NameNull"));
return;
}
+
int error = 0;
- if (!UIHelper.SatisfyNameLength(userNameInput.text, out error))
+ if (!UIHelper.SatisfyNameLength(m_NameInput.text, out error))
{
switch (error)
{
@@ -200,22 +175,24 @@
}
return;
}
- if (DirtyWordConfig.IsDirtWord(userNameInput.text) || UIHelper.HasSpecialCharac(userNameInput.text)
- || DirtyNameConfig.IsDirtName(userNameInput.text))
+
+ if (DirtyWordConfig.IsDirtWord(m_NameInput.text) || UIHelper.HasSpecialCharac(m_NameInput.text)
+ || DirtyNameConfig.IsDirtName(m_NameInput.text))
{
ServerTipDetails.DisplayNormalTip(Language.Get("L1007"));
return;
}
+
if (Application.internetReachability == NetworkReachability.NotReachable)
{
ServerTipDetails.DisplayNormalTip(Language.Get("L1116"));
return;
}
- LanguageVerify.Instance.VerifyPlayerName(userNameInput.text, 0, string.Empty, 0, 0, (bool ok, string name) =>
+ LanguageVerify.Instance.VerifyPlayerName(m_NameInput.text, 0, string.Empty, 0, 0, (bool ok, string name) =>
{
C0105_tagCCreateRole createRole = new C0105_tagCCreateRole();//瀹炰緥鍖朇0105_tagCCreateRole
- createRole.Job = (byte)userJob;
+ createRole.Job = (byte)CreateRoleManager.Instance.selectedJob.value;
createRole.Name = name;
createRole.Sex = 1;
createRole.Hair = 10002;
@@ -225,52 +202,46 @@
createRole.PlayerType = 1;
GameNetSystem.Instance.SendInfo(createRole);//鍙戦�佸垱瑙掑寘
});
-
-
-
- //灞忚斀鑱屼笟鐗规晥棰勫厛鍔犺浇閫伙紝浠ュ噺灏戜笉蹇呰鐨勫唴瀛樻崯鑰楀拰鑾峰緱鏇村揩鐨勫満鏅垏鎹㈤�熷害锛岃祫婧愬帇缂╀娇鐢↙Z4鎵嶈銆�
- // AssetPreLoad.Instance.PreLoadJobEffect(userJob);
}
- private void RoleChage()
+ private void OnCreateRoleSuccess()
{
if (Application.internetReachability == NetworkReachability.NotReachable)
{
ServerTipDetails.DisplayNormalTip(Language.Get("L1116"));
return;
}
- C0108_tagCRoleLoginAsk tagCRoleLoginAsk = new C0108_tagCRoleLoginAsk();
+
+ var tagCRoleLoginAsk = new C0108_tagCRoleLoginAsk();
tagCRoleLoginAsk.Type = 2;//杩涘叆娓告垙
tagCRoleLoginAsk.ClientID = SDKUtility.Instance.RegistrationID;
GameNetSystem.Instance.SendInfo(tagCRoleLoginAsk);
NetLinkWin.Show();
}
- private void RoleShow(float _delay)
+ [System.Serializable]
+ public struct SelectRoleButton
{
- StopCoroutine("DelayShowActor");
- StartCoroutine("DelayShowActor", _delay);
+ public int job;
+ public Button select;
+ public Image backGround;
+ public Image icon;
+
+ public void SetListener(UnityAction action)
+ {
+ select.SetListener(action);
+ }
+
+ public void SetSelected(bool selected)
+ {
+ var config = CreateRoleConfig.Get(job);
+ backGround.SetSprite(selected ? "CreateRole_ChoosenBottom_a" : "CreateRole_UnChoosenBottom_a");
+ icon.SetSprite(selected ? config.selectIcon : config.unselectIcon);
+ icon.SetNativeSize();
+ }
+
}
- IEnumerator DelayShowActor(float _delay)
- {
- m_CreateRoleShow = GameObject.FindObjectOfType<CreateRoleHeroShow>();
- UpdateInfo();
-
- yield return new WaitForSeconds(_delay);
- RemoveRoleModel();
- ShowRoleModel();
- }
-
- private void ShowRoleModel()
- {
- m_CreateRoleShow.CreateRoleShow(userJob);
- }
-
- private void RemoveRoleModel()
- {
- m_CreateRoleShow.Dispose();
- }
}
}
diff --git a/System/Login/SelectRoleWin.cs b/System/Login/SelectRoleWin.cs
index d4dd06a..2a409ed 100644
--- a/System/Login/SelectRoleWin.cs
+++ b/System/Login/SelectRoleWin.cs
@@ -6,22 +6,35 @@
using System;
using System.Collections;
using System.Collections.Generic;
-
using UnityEngine;
using UnityEngine.UI;
+
namespace Snxxz.UI
{
public class SelectRoleWin : Window
{
- [SerializeField] Text nameText;
- [SerializeField] Text lvText;
+ [SerializeField] Text m_PlayerName;
+ [SerializeField] Text m_PlayerLevel;
- [SerializeField] Button beginBtn;
- [SerializeField] Image playerIcon;
- [SerializeField] Button backBtn;
+ [SerializeField] Button m_Begin;
+ [SerializeField] Button m_Back;
- CreateRoleHeroShow m_CreateRoleShow;
+ [SerializeField] Image m_Description;
+ [SerializeField] Image m_JobName;
+ [SerializeField] Image m_JobSign;
+
+ SelectRoleProcessor m_SelectRoleProcessor;
+ SelectRoleProcessor selectRoleProcessor {
+ get {
+ if (m_SelectRoleProcessor == null)
+ {
+ m_SelectRoleProcessor = GameObject.FindObjectOfType<SelectRoleProcessor>();
+ }
+
+ return m_SelectRoleProcessor;
+ }
+ }
LoginModel model { get { return ModelCenter.Instance.GetModel<LoginModel>(); } }
@@ -32,8 +45,8 @@
protected override void AddListeners()
{
- beginBtn.onClick.AddListener(BeginBtn);
- backBtn.onClick.AddListener(BackToLogin);
+ m_Begin.onClick.AddListener(BeginBtn);
+ m_Back.onClick.AddListener(BackToLogin);
}
private void BackToLogin()
@@ -43,8 +56,6 @@
protected override void OnPreOpen()
{
- m_CreateRoleShow = GameObject.FindObjectOfType<CreateRoleHeroShow>();
-
InitInfo();
}
@@ -58,35 +69,31 @@
protected override void OnAfterClose()
{
- RemoveRoleModel();
+ selectRoleProcessor.Dispose();
}
#endregion
- private void RemoveRoleModel()
- {
- m_CreateRoleShow.Dispose();
- }
-
private void BeginBtn()
{
- if (GameNetSystem.Instance.netState != GameNetSystem.NetState.Connected)
+ if (GameNetSystem.Instance.netState == GameNetSystem.NetState.Connected)
{
- if (Application.internetReachability == NetworkReachability.NotReachable)
- {
- ConfirmCancel.ShowPopConfirm(
- Language.Get("Mail101"),
- Language.Get("L1116"),
- () => { }
- );
- NetLinkWin.Hide();
- }
- else
- {
- LoadingWin.targetMapResId =2;
- WindowCenter.Instance.Open<LoadingWin>();
- model.EnterWorld(2);
- }
+ return;
}
+
+ if (Application.internetReachability == NetworkReachability.NotReachable)
+ {
+ ConfirmCancel.ShowPopConfirm(
+ Language.Get("Mail101"),
+ Language.Get("L1116")
+ );
+
+ NetLinkWin.Hide();
+ return;
+ }
+
+ LoadingWin.targetMapResId = 2;
+ WindowCenter.Instance.Open<LoadingWin>();
+ model.EnterWorld(2);
}
private void InitInfo()
@@ -95,11 +102,15 @@
{
return;
}
- nameText.text = PlayerDatas.Instance.loginInfo.PlayerName.ToString();//鐜╁鏄电О
- lvText.text = Language.Get("Z1024", PlayerDatas.Instance.loginInfo.LV);//鐜╁绛夌骇
- CreateRoleConfig _cfg = CreateRoleConfig.Get(PlayerDatas.Instance.loginInfo.Job);
- playerIcon.SetSprite(_cfg.desc);
- m_CreateRoleShow.SelectRoleShow();
+
+ m_PlayerName.text = PlayerDatas.Instance.loginInfo.PlayerName.ToString();//鐜╁鏄电О
+ m_PlayerLevel.text = Language.Get("Z1024", PlayerDatas.Instance.loginInfo.LV);//鐜╁绛夌骇
+ var config = CreateRoleConfig.Get(PlayerDatas.Instance.loginInfo.Job);
+ m_Description.SetSprite(config.description);
+ m_JobName.SetSprite(config.jobName);
+ m_JobSign.SetSprite(config.jobSign);
+
+ selectRoleProcessor.Show(PlayerDatas.Instance.loginInfo.Job);
}
}
diff --git a/System/RidingPet/ContainerRidingPet.cs b/System/RidingPet/ContainerRidingPet.cs
index 312c3a0..93a6923 100644
--- a/System/RidingPet/ContainerRidingPet.cs
+++ b/System/RidingPet/ContainerRidingPet.cs
@@ -20,6 +20,7 @@
[SerializeField] RawImage m_BossRawImage;
DailyQuestModel dailyQuestModel { get { return ModelCenter.Instance.GetModel<DailyQuestModel>(); } }
ItemTipsModel itemTipsModel { get { return ModelCenter.Instance.GetModel<ItemTipsModel>(); } }
+ RidingPetBossModel ridingPetMdoel { get { return ModelCenter.Instance.GetModel<RidingPetBossModel>(); } }
public int RawImagetestBossID = 50103006;
public RewardPositionType rewardPositonType;
[SerializeField] ItemCell[] m_RewardArray;
@@ -33,8 +34,8 @@
public void DisplayBossRawImage()
{
- var config = NPCConfig.Get(RawImagetestBossID);
- UI3DModelExhibition.Instance.ShowNPC(RawImagetestBossID, config.UIModeLOffset, config.UIModelRotation, m_BossRawImage);
+ var config = NPCConfig.Get(ridingPetMdoel.BossIDArray[0]);
+ UI3DModelExhibition.Instance.ShowNPC(ridingPetMdoel.BossIDArray[0], config.UIModeLOffset, config.UIModelRotation, m_BossRawImage);
}
public void StopShowBossRawImage()
@@ -49,8 +50,8 @@
public void DisplayAnotherBossRawImage()
{
- var config = NPCConfig.Get(RawImagetestBossID);
- UI3DModelExhibition.InstanceClone1.ShowNPC(RawImagetestBossID, config.UIModeLOffset, config.UIModelRotation, m_BossRawImage);
+ var config = NPCConfig.Get(ridingPetMdoel.BossIDArray[1]);
+ UI3DModelExhibition.InstanceClone1.ShowNPC(ridingPetMdoel.BossIDArray[1], config.UIModeLOffset, config.UIModelRotation, m_BossRawImage);
}
public void DisplaySpiritPetHP()
@@ -64,7 +65,7 @@
dailyQuestModel.TryGetOpenTime((int)DailyQuestType.RidingPetActivity, out dailyQuestOpentime);
HourMinute hourMin;
dailyQuestOpentime.TryGetNextOpenTime(out hourMin);
- m_ActivityInfo.text = Language.Get("RidingPetBossQuestTime", hourMin.hourBegin, hourMin.minuteBegin);
+ m_ActivityInfo.text = Language.Get("RidingPetBossQuestTime", "<color=red>"+hourMin.hourBegin+":"+hourMin.minuteBegin+"</color>");
}
public void DisplayRewardItem()
diff --git a/System/SelectRole.meta b/System/SelectRole.meta
new file mode 100644
index 0000000..675ae68
--- /dev/null
+++ b/System/SelectRole.meta
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: e131efedb12411f41931be24df713a3c
+folderAsset: yes
+timeCreated: 1554890866
+licenseType: Pro
+DefaultImporter:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/System/SelectRole/SelectRoleBehaviour.cs b/System/SelectRole/SelectRoleBehaviour.cs
new file mode 100644
index 0000000..b7a6012
--- /dev/null
+++ b/System/SelectRole/SelectRoleBehaviour.cs
@@ -0,0 +1,92 @@
+锘縰sing System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+using Snxxz.UI;
+
+public class SelectRoleBehaviour : MonoBehaviour
+{
+
+ [SerializeField] Camera m_CreateRoleCamera;
+ [SerializeField] CreateRoleHeroPlatform m_HeroPlatform;
+ [SerializeField] ActorShadowCaster m_Shadow;
+
+ UI3DShowHero playerModel = new UI3DShowHero();
+
+ public void Show()
+ {
+ Dispose();
+
+ var fashionClothes = 0;
+ var fashionWeapon = 0;
+ var fashionSecondary = 0;
+ var clothesItemId = 0;
+ var weaponItemId = 0;
+ var wingsItemId = 0;
+ var secondaryItemId = 0;
+ var suitLevel = 0;
+ var equipInfos = PlayerDatas.Instance.loginInfo.EquipInfo;
+
+ for (int i = 0; i < equipInfos.Length; i++)
+ {
+ var equipInfo = equipInfos[i];
+ var itemConfig = ItemConfig.Get((int)equipInfo.ItemID);
+ switch ((RoleEquipType)itemConfig.EquipPlace)
+ {
+ case RoleEquipType.FashionClothes:
+ fashionClothes = (int)equipInfo.ItemID;
+ break;
+ case RoleEquipType.FashionWeapon:
+ fashionWeapon = (int)equipInfo.ItemID;
+ break;
+ case RoleEquipType.FashionWeapon2:
+ fashionSecondary = (int)equipInfo.ItemID;
+ break;
+ case RoleEquipType.Weapon:
+ weaponItemId = (int)equipInfo.ItemID;
+ break;
+ case RoleEquipType.Clothes:
+ clothesItemId = (int)equipInfo.ItemID;
+ break;
+ case RoleEquipType.Wing:
+ wingsItemId = (int)equipInfo.ItemID;
+ break;
+ case RoleEquipType.Weapon2:
+ secondaryItemId = (int)equipInfo.ItemID;
+ break;
+ }
+ }
+
+ var data = new UI3DPlayerExhibitionData()
+ {
+ job = PlayerDatas.Instance.loginInfo.Job,
+ fashionClothesId = fashionClothes,
+ clothesId = clothesItemId,
+ suitLevel = suitLevel,
+ fashionWeaponId = fashionWeapon,
+ weaponId = weaponItemId,
+ wingsId = wingsItemId,
+ fashionSecondaryId = fashionSecondary,
+ secondaryId = secondaryItemId,
+ };
+
+ m_CreateRoleCamera.gameObject.SetActive(true);
+ var model = playerModel.Show(data, m_HeroPlatform.transform);
+ playerModel.StandUp();
+ m_Shadow.Cast(model.transform);
+ }
+
+ public void Dispose()
+ {
+ playerModel.Dispose();
+ }
+
+ private void OnEnable()
+ {
+ }
+
+ private void OnDestroy()
+ {
+ StopAllCoroutines();
+ }
+
+}
diff --git a/Fight/Actor/AI/AI_BossDSX.cs.meta b/System/SelectRole/SelectRoleBehaviour.cs.meta
similarity index 75%
copy from Fight/Actor/AI/AI_BossDSX.cs.meta
copy to System/SelectRole/SelectRoleBehaviour.cs.meta
index 232ab26..e911b59 100644
--- a/Fight/Actor/AI/AI_BossDSX.cs.meta
+++ b/System/SelectRole/SelectRoleBehaviour.cs.meta
@@ -1,6 +1,6 @@
fileFormatVersion: 2
-guid: 265e7ff764601cf44991055e126d0d33
-timeCreated: 1514970107
+guid: 215e4bd908ee7314984e023ff5b3967a
+timeCreated: 1554946916
licenseType: Pro
MonoImporter:
serializedVersion: 2
diff --git a/System/SelectRole/SelectRoleProcessor.cs b/System/SelectRole/SelectRoleProcessor.cs
new file mode 100644
index 0000000..68041bc
--- /dev/null
+++ b/System/SelectRole/SelectRoleProcessor.cs
@@ -0,0 +1,30 @@
+锘縰sing System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+using Snxxz.UI;
+
+public class SelectRoleProcessor : MonoBehaviour
+{
+ [SerializeField] SelectRoleBehaviour m_Job1;
+ [SerializeField] SelectRoleBehaviour m_Job2;
+
+ public void Show(int job)
+ {
+ switch (job)
+ {
+ case 1:
+ m_Job1.Show();
+ break;
+ case 2:
+ m_Job2.Show();
+ break;
+ }
+ }
+
+ public void Dispose()
+ {
+ m_Job1.Dispose();
+ m_Job2.Dispose();
+ }
+
+}
diff --git a/System/Login/CreateRoleHeroShow.cs.meta b/System/SelectRole/SelectRoleProcessor.cs.meta
similarity index 100%
rename from System/Login/CreateRoleHeroShow.cs.meta
rename to System/SelectRole/SelectRoleProcessor.cs.meta
diff --git a/UI/Common/UI3DModelFactory.cs b/UI/Common/UI3DModelFactory.cs
index 44ec9d6..66bd059 100644
--- a/UI/Common/UI3DModelFactory.cs
+++ b/UI/Common/UI3DModelFactory.cs
@@ -1,67 +1,12 @@
锘縰sing UnityEngine;
-
using System.Collections.Generic;
using System;
public class UI3DModelFactory
{
-
static UI3DModelFactory()
{
GlobalTimeEvent.Instance.minuteEvent += OnPerMinute;
- }
-
- static Dictionary<int, GameObject> jobModels = new Dictionary<int, GameObject>();
-
- public static void LoadCreateRole(int job, Action<bool, UnityEngine.Object> _callBack)
- {
- if (jobModels.ContainsKey(job))
- {
- if (_callBack != null)
- {
- _callBack(true, jobModels[job]);
- }
-
- return;
- }
-
- Action<bool, UnityEngine.Object> assetCallBack = (bool _ok, UnityEngine.Object _asset) =>
- {
- GameObject instance = null;
- if (_ok)
- {
- instance = GameObject.Instantiate(_asset) as GameObject;
- if (instance != null)
- {
- jobModels[job] = instance;
- }
- }
-
- if (_callBack != null)
- {
- _callBack(_ok && instance != null, instance);
- }
- };
-
- InstanceResourcesLoader.LoadCreateRole(job, assetCallBack);
- }
-
- public static void ReleaseCreateRole(int job)
- {
- if (jobModels.ContainsKey(job))
- {
- jobModels[job].gameObject.SetActive(false);
- }
- }
-
- public static void ClearCreateRole()
- {
- jobModels.Clear();
-
- if (!AssetSource.mobFromEditor)
- {
- AssetBundleUtility.Instance.UnloadAssetBundle("mob/createrole", true, false);
- }
}
public static GameObject LoadUINPC(int id)
diff --git a/UI/HUD/PopUpNum.cs b/UI/HUD/PopUpNum.cs
index e105fed..5fcc58d 100644
--- a/UI/HUD/PopUpNum.cs
+++ b/UI/HUD/PopUpNum.cs
@@ -331,6 +331,10 @@
PetZhuXian = 38, //瀹犵墿璇涗粰
EnemyZhuXian = 39, //鏁屼汉璇涗粰
+ PlayerDeadlyHit = 43, //鐜╁鑷存涓�鍑�
+ PetDeadlyHit = 44, //瀹犵墿鑷存涓�鍑�
+ EnemyDeadlyHit = 45, //鏁屼汉鑷存涓�鍑�
+
BuffAddDefense = 101,//+闃插尽buff
BuffAddAttack = 102,//+鏀诲嚮buff
BuffAddAttackSpeed = 103,//+鏀婚�焍uff
diff --git a/Utility/EnumHelper.cs b/Utility/EnumHelper.cs
index ec300b0..93bdab6 100644
--- a/Utility/EnumHelper.cs
+++ b/Utility/EnumHelper.cs
@@ -120,6 +120,7 @@
BreakableObj = 19,//鍦烘櫙鍙鏀诲嚮鐗� 19
FightAssist = 20,// 鍔╂垬
SGZC_FightAssist = 21,// 涓婂彜鎴樺満鍔╂垬
+ MonsterTime = 22,// 鎸夋椂闂存帀琛�
OpenWorldMap = 99,// 鎵撳紑涓栫晫鍦板浘
}
@@ -750,8 +751,8 @@
EveryLvAddHp = 53, //姣�1绾�+%s鐢熷懡
AddEquipDropPrecent = 54, //澧炲姞瑁呭鎺夎惤鐜�
AddCoinsPrecent = 55,//澧炲姞閲戝竵
- ArmorMaxHPPer=63,//鍩虹瑁呭鐢熷懡
- WeaponAtkPer =65,//鍩虹瑁呭鏀诲嚮
+ ArmorMaxHPPer = 63,//鍩虹瑁呭鐢熷懡
+ WeaponAtkPer = 65,//鍩虹瑁呭鏀诲嚮
ArmorDefPer = 66, //闃插叿闃插尽鐧惧垎姣�
MinAtk = 67, //鏈�灏忔敾鍑�
MaxAtk = 68, //鏈�澶ф敾鍑�
@@ -1163,6 +1164,8 @@
ZhuXianAtk,
/** 缁堟瀬鏂╂潃 */
FinalKill,
+ /*鑷村懡涓�鍑�*/
+ DeadlyHit
}
public enum DungeonTargetType
--
Gitblit v1.8.0