Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
| | |
| | | public int NormalHurtPer;
|
| | | public int FabaoHurt;
|
| | | public int FabaoHurtPer;
|
| | | public int reduceCrit;//暴击抗性
|
| | | public int reduceHeartHurt;//会心一击伤害固定值减免
|
| | | public int reduceFinalHurt;//最终伤害百分比减免
|
| | |
|
| | | public long treasurePotentialSp
|
| | | {
|
| | |
| | | case PlayerDataType.CDBPlayerRefresh_FabaoHurtPer:
|
| | | baseData.FabaoHurtPer = (int)value;
|
| | | break;
|
| | | case PlayerDataType.CDBPlayerRefresh_SuperHitRateReduce:
|
| | | baseData.reduceCrit = (int)value;
|
| | | break;
|
| | | case PlayerDataType.CDBPlayerRefresh_LuckyHitReduce:
|
| | | baseData.reduceHeartHurt = (int)value;
|
| | | break;
|
| | | case PlayerDataType.CDBPlayerRefresh_FinalHurtReducePer:
|
| | | baseData.reduceFinalHurt = (int)value;
|
| | | break;
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | if (gsModel == null)
|
| | | return null;
|
| | |
|
| | | _tagGsProValueDict.Add(PropertyType.CritHurtPrecent, gsModel.SuperHitPerC);
|
| | | _tagGsProValueDict.Add(PropertyType.CritHurtPercent, gsModel.SuperHitPerC);
|
| | | _tagGsProValueDict.Add(PropertyType.HeartHit, gsModel.LuckyHitRateC);
|
| | | _tagGsProValueDict.Add(PropertyType.EveryLvAddAtk, gsModel.PerLVAtkC);
|
| | | _tagGsProValueDict.Add(PropertyType.EveryLvAddHp, gsModel.PerLVMaxHPC);
|
| | |
| | | using UnityEngine; |
| | | using Snxxz.UI; |
| | | |
| | | public class CreateRoleBehaviour : MonoBehaviour |
| | | public class CreateRoleBehaviour |
| | | { |
| | | [SerializeField] int m_Job; |
| | | [SerializeField] float m_Scale = 1; |
| | | [SerializeField] EnterPictureType m_EnterPictureType; |
| | | |
| | | [SerializeField] ShowAnimation m_RoutimeShowAnimation; |
| | | |
| | | [SerializeField] Effect[] m_PersistentEffect; |
| | | [SerializeField] Effect[] m_RoutimeShowEffect; |
| | | |
| | | [SerializeField] CreateRoleHeroPlatform m_Platform; |
| | | [SerializeField] ActorShadowCaster m_Shadow; |
| | | |
| | | CreateRoleTimeLine showTimeLine = new CreateRoleTimeLine(); |
| | | |
| | | public State state { get; private set; } |
| | | |
| | | CreateRoleTimeLine showTimeLine = new CreateRoleTimeLine(); |
| | | List<SFXController> sfxControllers = new List<SFXController>(); |
| | | |
| | | public void DoRoutineShow() |
| | | GameObject behaviour; |
| | | ActorShadowCaster shadow; |
| | | CreateRoleHeroPlatform platform; |
| | | |
| | | public void Show(CreateRoleScriptableObject.RoleShowParams showParams) |
| | | { |
| | | m_Shadow.gameObject.SetActive(false); |
| | | m_Platform.transform.localEulerAngles = new Vector3(0, 180, 0); |
| | | m_Platform.ForbidSeconds(m_RoutimeShowAnimation.delay + m_RoutimeShowAnimation.duration); |
| | | CreateRoleManager.Instance.LoadModel(m_Job, (bool ok, UnityEngine.Object @object) => |
| | | if (behaviour == null) |
| | | { |
| | | var prefab = SceneLoader.LoadCreateRole(showParams.platformPrefabName); |
| | | behaviour = GameObject.Instantiate(prefab, showParams.platformPosition, Quaternion.identity); |
| | | behaviour.name = showParams.platformPrefabName; |
| | | shadow = behaviour.GetComponentInChildren<ActorShadowCaster>(); |
| | | platform = behaviour.GetComponentInChildren<CreateRoleHeroPlatform>(); |
| | | |
| | | var camera = behaviour.GetComponent<Camera>("CreateRoleCamera"); |
| | | if (camera != null) |
| | | { |
| | | camera.gameObject.SetActive(false); |
| | | } |
| | | } |
| | | |
| | | shadow.gameObject.SetActive(false); |
| | | platform.transform.localEulerAngles = new Vector3(0, 180, 0); |
| | | platform.ForbidSeconds(showParams.animationDuration); |
| | | CreateRoleManager.Instance.LoadModel(showParams.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); |
| | | model.transform.SetParentEx(platform.transform, Vector3.zero, Quaternion.identity, Vector3.one * showParams.scale); |
| | | |
| | | switch (m_EnterPictureType) |
| | | switch (showParams.enterPictureType) |
| | | { |
| | | case EnterPictureType.OutIn: |
| | | case CreateRoleScriptableObject.EnterPictureType.OutIn: |
| | | model.SetActive(false); |
| | | break; |
| | | case EnterPictureType.Stand: |
| | | case CreateRoleScriptableObject.EnterPictureType.Stand: |
| | | model.SetActive(true); |
| | | m_Shadow.gameObject.SetActive(true); |
| | | m_Shadow.Cast(model.transform); |
| | | shadow.gameObject.SetActive(true); |
| | | shadow.Cast(model.transform); |
| | | break; |
| | | } |
| | | |
| | |
| | | state = State.RoutimeShow; |
| | | |
| | | showTimeLine.ClearNode(); |
| | | showTimeLine.AddNone(m_RoutimeShowAnimation.delay, () => |
| | | showTimeLine.AddNone(0f, () => |
| | | { |
| | | if (m_EnterPictureType == EnterPictureType.OutIn) |
| | | if (showParams.enterPictureType == CreateRoleScriptableObject.EnterPictureType.OutIn) |
| | | { |
| | | model.SetActive(true); |
| | | } |
| | | |
| | | var animator = model.GetComponent<Animator>(); |
| | | animator.Play(m_RoutimeShowAnimation.animation); |
| | | animator.Play(showParams.animation); |
| | | }); |
| | | |
| | | showTimeLine.AddNone(m_RoutimeShowAnimation.delay+0.1f, () => |
| | | showTimeLine.AddNone(0.1f, () => |
| | | { |
| | | if (m_EnterPictureType == EnterPictureType.OutIn) |
| | | if (showParams.enterPictureType == CreateRoleScriptableObject.EnterPictureType.OutIn) |
| | | { |
| | | m_Shadow.gameObject.SetActive(true); |
| | | m_Shadow.Cast(model.transform); |
| | | shadow.gameObject.SetActive(true); |
| | | shadow.Cast(model.transform); |
| | | } |
| | | }); |
| | | |
| | | foreach (var effect in m_PersistentEffect) |
| | | foreach (var effect in showParams.persistentEffects) |
| | | { |
| | | showTimeLine.AddNone(effect.delay, () => |
| | | showTimeLine.AddNone(0f, () => |
| | | { |
| | | PlayEffect(model.transform, effect); |
| | | }); |
| | | } |
| | | |
| | | foreach (var effect in m_RoutimeShowEffect) |
| | | showTimeLine.AddNone(0f, () => |
| | | { |
| | | showTimeLine.AddNone(effect.delay, () => |
| | | { |
| | | PlayEffect(model.transform, effect); |
| | | }); |
| | | } |
| | | PlayEffect(model.transform, showParams.showEffect); |
| | | }); |
| | | |
| | | showTimeLine.AddNone(2f, () => |
| | | { |
| | |
| | | }); |
| | | } |
| | | |
| | | public void SetActive(bool active) |
| | | { |
| | | if (behaviour != null) |
| | | { |
| | | behaviour.gameObject.SetActive(active); |
| | | } |
| | | } |
| | | |
| | | 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)); |
| | | showTimeLine = null; |
| | | behaviour = null; |
| | | shadow = null; |
| | | platform = null; |
| | | } |
| | | |
| | | public void ReleaseEffects() |
| | |
| | | sfxControllers.Clear(); |
| | | } |
| | | |
| | | [System.Serializable] |
| | | public struct ShowAnimation |
| | | private void PlayEffect(Transform model, int effectId) |
| | | { |
| | | public string animation; |
| | | public float delay; |
| | | public float duration; |
| | | } |
| | | var config = EffectConfig.Get(effectId); |
| | | Transform parent = null; |
| | | if (!string.IsNullOrEmpty(config.nodeName)) |
| | | { |
| | | parent = model.transform.GetChildTransformDeeply(config.nodeName); |
| | | } |
| | | else |
| | | { |
| | | parent = model.transform; |
| | | } |
| | | |
| | | [System.Serializable] |
| | | public struct Effect |
| | | { |
| | | public int id; |
| | | public float delay; |
| | | } |
| | | |
| | | public enum EnterPictureType |
| | | { |
| | | Stand, |
| | | OutIn, |
| | | sfxControllers.Add(SFXPlayUtility.Instance.Play(effectId, parent)); |
| | | } |
| | | |
| | | public enum State |
| | |
| | | |
| | | public class CreateRoleManager : Singleton<CreateRoleManager> |
| | | { |
| | | CreateRoleProcessor m_Processor; |
| | | CreateRoleProcessor processor { |
| | | get { |
| | | return m_Processor ?? (m_Processor = GameObject.FindObjectOfType<CreateRoleProcessor>()); |
| | | } |
| | | } |
| | | |
| | | CreateRoleProcessor processor; |
| | | Dictionary<int, GameObject> jobModels = new Dictionary<int, GameObject>(); |
| | | |
| | | public readonly LogicInt selectedJob = new LogicInt(); |
| | |
| | | |
| | | public void View(int job, bool immediately) |
| | | { |
| | | processor.LoadNecessaryResources(); |
| | | if (processor == null) |
| | | { |
| | | processor = new CreateRoleProcessor(); |
| | | processor.LoadNecessaryResources(); |
| | | } |
| | | |
| | | selectedJob.value = job; |
| | | switch (job) |
| | | { |
| | |
| | | |
| | | public void Dispose() |
| | | { |
| | | m_Processor.Dispose(); |
| | | m_Processor = null; |
| | | processor.Dispose(); |
| | | processor = null; |
| | | |
| | | jobModels.Clear(); |
| | | if (!AssetSource.mobFromEditor) |
| | |
| | | using UnityEngine; |
| | | using Snxxz.UI; |
| | | |
| | | public class CreateRoleProcessor : MonoBehaviour |
| | | public class CreateRoleProcessor |
| | | { |
| | | [SerializeField] CreateRoleBehaviour m_Warrior; |
| | | [SerializeField] CreateRoleBehaviour m_Magic; |
| | | CreateRoleTimeLine m_WarriorTimeLine = new CreateRoleTimeLine(); |
| | | CreateRoleTimeLine m_MagicTimeLine = new CreateRoleTimeLine(); |
| | | |
| | | [SerializeField] CameraParams m_CameraParams; |
| | | CreateRoleBehaviour m_WarriorBehaviour = new CreateRoleBehaviour(); |
| | | CreateRoleBehaviour m_MagicBehaviour = new CreateRoleBehaviour(); |
| | | |
| | | Animator cameraAnimator; |
| | | Camera createRoleCamera; |
| | |
| | | { |
| | | if (cameraAnimator == null || createRoleCamera == null) |
| | | { |
| | | var prefab = SceneLoader.LoadCreateRole(m_CameraParams.prefabName); |
| | | var cameraParams = CreateRoleScriptableObject.GetCameraParams(); |
| | | var prefab = SceneLoader.LoadCreateRole(cameraParams.prefabName); |
| | | var instance = GameObject.Instantiate(prefab); |
| | | cameraAnimator = instance.GetComponent<Animator>(); |
| | | createRoleCamera = instance.GetComponentInChildren<Camera>(true); |
| | | createRoleCamera.enabled = false; |
| | | } |
| | | } |
| | | |
| | | public void SwitchToWarrior(bool immediately) |
| | | { |
| | | WindowCenter.Instance.Close<CreateRoleWin>(); |
| | | cameraAnimator.Play(m_CameraParams.magicToWarrior, 0, immediately ? 1f : 0f); |
| | | m_Magic.ReleaseEffects(); |
| | | m_Warrior.ReleaseEffects(); |
| | | m_WarriorTimeLine.ClearNode(); |
| | | var cameraParams = CreateRoleScriptableObject.GetCameraParams(); |
| | | |
| | | StopCoroutine("Co_SwitchToWarrior"); |
| | | StartCoroutine("Co_SwitchToWarrior", immediately ? 0f : m_CameraParams.magicToWarriorTime); |
| | | m_MagicBehaviour.SetActive(false); |
| | | m_WarriorBehaviour.SetActive(false); |
| | | |
| | | m_WarriorTimeLine.AddNone(0f, () => |
| | | { |
| | | WindowCenter.Instance.Close<CreateRoleWin>(); |
| | | createRoleCamera.enabled = true; |
| | | cameraAnimator.Play(cameraParams.magicToWarrior, 0, immediately ? 1f : 0f); |
| | | |
| | | m_MagicBehaviour.ReleaseEffects(); |
| | | m_WarriorBehaviour.ReleaseEffects(); |
| | | }); |
| | | |
| | | m_WarriorTimeLine.AddNone(immediately ? 0f : cameraParams.magicToWarriorTime, () => |
| | | { |
| | | m_WarriorBehaviour.SetActive(true); |
| | | m_WarriorBehaviour.Show(CreateRoleScriptableObject.GetJobParams(1)); |
| | | }); |
| | | |
| | | } |
| | | |
| | | public void SwitchToMagic(bool immediately) |
| | | { |
| | | WindowCenter.Instance.Close<CreateRoleWin>(); |
| | | cameraAnimator.Play(m_CameraParams.warriorToMagic, 0, immediately?1f:0f); |
| | | m_Magic.ReleaseEffects(); |
| | | m_Warrior.ReleaseEffects(); |
| | | m_MagicTimeLine.ClearNode(); |
| | | var cameraParams = CreateRoleScriptableObject.GetCameraParams(); |
| | | |
| | | StopCoroutine("Co_SwitchToMagic"); |
| | | StartCoroutine("Co_SwitchToMagic", immediately ? 0f : m_CameraParams.warriorToMagicTime); |
| | | } |
| | | m_MagicBehaviour.SetActive(false); |
| | | m_WarriorBehaviour.SetActive(false); |
| | | |
| | | IEnumerator Co_SwitchToWarrior(float waitTime) |
| | | { |
| | | yield return new WaitForSeconds(waitTime); |
| | | m_Magic.gameObject.SetActive(false); |
| | | m_Warrior.gameObject.SetActive(true); |
| | | m_Warrior.DoRoutineShow(); |
| | | } |
| | | m_MagicTimeLine.AddNone(0f, () => |
| | | { |
| | | WindowCenter.Instance.Close<CreateRoleWin>(); |
| | | createRoleCamera.enabled = true; |
| | | cameraAnimator.Play(cameraParams.warriorToMagic, 0, immediately ? 1f : 0f); |
| | | |
| | | IEnumerator Co_SwitchToMagic(float waitTime) |
| | | { |
| | | yield return new WaitForSeconds(waitTime); |
| | | m_Warrior.gameObject.SetActive(false); |
| | | m_Magic.gameObject.SetActive(true); |
| | | m_Magic.DoRoutineShow(); |
| | | m_MagicBehaviour.ReleaseEffects(); |
| | | m_WarriorBehaviour.ReleaseEffects(); |
| | | }); |
| | | |
| | | m_MagicTimeLine.AddNone(immediately ? 0f : cameraParams.warriorToMagicTime, () => |
| | | { |
| | | m_MagicBehaviour.SetActive(true); |
| | | m_MagicBehaviour.Show(CreateRoleScriptableObject.GetJobParams(2)); |
| | | }); |
| | | } |
| | | |
| | | public void Dispose() |
| | | { |
| | | m_Warrior.Dispose(); |
| | | m_Magic.Dispose(); |
| | | } |
| | | m_WarriorBehaviour.Dispose(); |
| | | m_MagicBehaviour.Dispose(); |
| | | m_WarriorBehaviour = null; |
| | | m_MagicBehaviour = null; |
| | | |
| | | [System.Serializable] |
| | | public struct CameraParams |
| | | { |
| | | public string prefabName; |
| | | public string warriorToMagic; |
| | | public float warriorToMagicTime; |
| | | public string magicToWarrior; |
| | | public float magicToWarriorTime; |
| | | m_WarriorTimeLine.Dispose(); |
| | | m_MagicTimeLine.Dispose(); |
| | | |
| | | cameraAnimator = null; |
| | | createRoleCamera = null; |
| | | } |
| | | |
| | | |
| New file |
| | |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | |
| | | [CreateAssetMenu(menuName = "Config/CreateRoleScriptableObject")] |
| | | public class CreateRoleScriptableObject : ScriptableObject |
| | | { |
| | | [SerializeField] CameraParams m_CameraParams; |
| | | public CameraParams cameraParams { get { return m_CameraParams; } } |
| | | |
| | | [SerializeField] RoleShowParams m_Warrior; |
| | | public RoleShowParams warrior { get { return m_Warrior; } } |
| | | |
| | | [SerializeField] RoleShowParams m_Magic; |
| | | public RoleShowParams magic { get { return m_Magic; } } |
| | | |
| | | static CreateRoleScriptableObject config; |
| | | public static CameraParams GetCameraParams() |
| | | { |
| | | if (config == null) |
| | | { |
| | | config = BuiltInLoader.LoadScriptableObject<CreateRoleScriptableObject>("CreateRoleConfig"); |
| | | } |
| | | |
| | | return config.cameraParams; |
| | | } |
| | | |
| | | public static RoleShowParams GetJobParams(int job) |
| | | { |
| | | if (config == null) |
| | | { |
| | | config = BuiltInLoader.LoadScriptableObject<CreateRoleScriptableObject>("CreateRoleConfig"); |
| | | } |
| | | |
| | | switch (job) |
| | | { |
| | | case 1: |
| | | return config.warrior; |
| | | case 2: |
| | | return config.magic; |
| | | default: |
| | | return default(RoleShowParams); |
| | | } |
| | | } |
| | | |
| | | [System.Serializable] |
| | | public struct CameraParams |
| | | { |
| | | public string prefabName; |
| | | public string warriorToMagic; |
| | | public float warriorToMagicTime; |
| | | public string magicToWarrior; |
| | | public float magicToWarriorTime; |
| | | } |
| | | |
| | | [System.Serializable] |
| | | public struct RoleShowParams |
| | | { |
| | | public int job; |
| | | public float scale; |
| | | public string platformPrefabName; |
| | | public Vector3 platformPosition; |
| | | public EnterPictureType enterPictureType; |
| | | public string animation; |
| | | public float animationDuration; |
| | | public int[] persistentEffects; |
| | | public int showEffect; |
| | | } |
| | | |
| | | public enum EnterPictureType |
| | | { |
| | | Stand, |
| | | OutIn, |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 41159df38ea09e0419833fb7efe84e1a |
| | | timeCreated: 1555642714 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | | switch (dataMapId)
|
| | | {
|
| | | case CrossServerBossModel.DATA_MAPID:
|
| | | case HazyGrassModel.FairyGrassMapId:
|
| | | case HazyGrassModel.ReikiGrassMapId:
|
| | | case HazyDemonKingModel.DEMONKINGMAPID2:
|
| | | var crossServerBossModel = ModelCenter.Instance.GetModel<CrossServerBossModel>();
|
| | | crossServerBossModel.RequestExit();
|
| | | break;
|
| | |
| | | model.ExitCurrentDungeon();
|
| | | WindowCenter.Instance.Close<JadyDynastyTowerVictoryWin>();
|
| | | break;
|
| | | case HazyDemonKingModel.DEMONKINGMAPID2:
|
| | | case HazyGrassModel.ReikiGrassMapId:
|
| | | case HazyGrassModel.FairyGrassMapId:
|
| | | var crossServerBossModel = ModelCenter.Instance.GetModel<CrossServerBossModel>();
|
| | | crossServerBossModel.RequestExit();
|
| | | break;
|
| | | default:
|
| | | model.ExitCurrentDungeon();
|
| | | break;
|
| | |
| | | { |
| | | if (operateType == EquipTrainModel.TrainOperateType.Train) |
| | | { |
| | | m_DeltaValue.text = inevitable ? "最大" : ""; |
| | | m_DeltaValue.text = inevitable ? "必增" : ""; |
| | | m_DeltaValue.color = UIHelper.GetUIColor(TextColType.Green, true); |
| | | m_DeltaValueMax.text = inevitable ? string.Format("+{0}", propertyBar.deltaMax) : ""; |
| | | } |
| | |
| | | namespace Snxxz.UI
|
| | | {
|
| | | [XLua.LuaCallCSharp]
|
| | | public class FairyGrabBossModel : Model, IBeforePlayerDataInitialize, IPlayerLoginOk, IOpenServerActivity
|
| | | public class FairyGrabBossModel : Model, IBeforePlayerDataInitialize, IPlayerLoginOk
|
| | | {
|
| | | public List<int> bosses { get; private set; }
|
| | | Dictionary<int, List<Item>> dropItemDict = new Dictionary<int, List<Item>>();
|
| | |
| | | WindowCenter.Instance.windowAfterCloseEvent += WindowAfterCloseEvent;
|
| | | NewBieCenter.Instance.guideCompletedEvent += GuideCompletedEvent;
|
| | | TreasureNewGotWin.CloseTreasureNewGotWinEvent += CloseTreasureNewGotWinEvent;
|
| | | OpenServerActivityCenter.Instance.Register(13, this);
|
| | | }
|
| | |
|
| | | public void OnBeforePlayerDataInitialize()
|
| | |
| | | m_BuffSlider.delay = 0.2f;
|
| | | DisplayInvincibleProgress();
|
| | | }
|
| | | else
|
| | | {
|
| | | if (m_ContainerInvincibleBuff.gameObject.activeSelf)
|
| | | {
|
| | | m_ContainerInvincibleBuff.gameObject.SetActive(false);
|
| | | }
|
| | | }
|
| | | }
|
| | | #endregion
|
| | |
|
| | |
| | | {
|
| | | invincibleLastTime = (uint)milliSeconds;
|
| | | }
|
| | | var progress = Mathf.Clamp01(1 - (float)milliSeconds / invincibleLastTime);
|
| | | var progress = Mathf.Clamp01((float)milliSeconds / invincibleLastTime);
|
| | | m_BuffSlider.value = progress;
|
| | | }
|
| | |
|
| | |
| | | return StatusMgr.Instance.IsExistBossBelong(playerId);
|
| | | }
|
| | |
|
| | | public void RequestExitDungeon()
|
| | | {
|
| | | if (PlayerDatas.Instance.baseData.MapID == DEMONKINGMAPID1)
|
| | | {
|
| | | ModelCenter.Instance.GetModel<DungeonModel>().ExitCurrentDungeon();
|
| | | }
|
| | | else
|
| | | {
|
| | | var pak = new CC104_tagCMExitCrossRealm();
|
| | | GameNetSystem.Instance.SendToCrossServer(pak);
|
| | | }
|
| | | }
|
| | |
|
| | | public void RequestEnterClientDungeon()
|
| | | {
|
| | | var config = HazyRegionConfig.Get(hazyRegionModel.processingIncidentId);
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | model.ExitCurrentDungeon();
|
| | | ModelCenter.Instance.GetModel<HazyDemonKingModel>().RequestExitDungeon();
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | yield return WaitingForSecondConst.WaitMS500;
|
| | |
|
| | | var allComplete = true;
|
| | | bool existAnyDoingIncident = false;
|
| | | var incidents = model.GetAllIncidents();
|
| | | if (incidents != null)
|
| | | {
|
| | |
| | | {
|
| | | allComplete = false;
|
| | | }
|
| | | if (incident.state == HazyRegionModel.IncidentState.Processing)
|
| | | {
|
| | | existAnyDoingIncident = true;
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | if (!allComplete)
|
| | | {
|
| | | if (!existAnyDoingIncident && model.point == 0)
|
| | | {
|
| | | allComplete = true;
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | [SerializeField] Image m_Description;
|
| | | [SerializeField] Image m_JobName;
|
| | |
|
| | | 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>(); } }
|
| | |
|
| | | #region Built-in
|
| | |
| | |
|
| | | protected override void OnAfterClose()
|
| | | {
|
| | | selectRoleProcessor.Dispose();
|
| | | }
|
| | | #endregion
|
| | |
|
| | |
| | | m_Description.SetSprite(config.description);
|
| | | m_JobName.SetSprite(config.jobName);
|
| | |
|
| | | selectRoleProcessor.Show(PlayerDatas.Instance.loginInfo.Job);
|
| | | new SelectRoleProcessor().Show();
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | case 6: |
| | | break; |
| | | case 7: |
| | | _imge.SetSprite("Atk_Scramble"); |
| | | _text.text = _dic.ContainsKey(7) ? _dic[7] : string.Empty; |
| | | break; |
| | | default: |
| | | break; |
| | |
| | | case 6:
|
| | | break;
|
| | | case 7:
|
| | | _PkImage.SetSprite("Atk_Scramble");
|
| | | break;
|
| | | default:
|
| | | break;
|
| | |
| | | activityCell.timer.text = TimeUtility.SecondsToHMS(seconds);
|
| | | activityCell.containerTimer.gameObject.SetActive(seconds > 0);
|
| | | }
|
| | | cell = m_ActivityCtrl.GetActiveCellView((int)OpenServerActivityCenter.OSActivityType.FairyGrabBossNotice);
|
| | | if (cell != null)
|
| | | {
|
| | | var activityCell = cell as OpenServerActivityCell;
|
| | | var seconds = fairyGrabBossModel.GetNextSessionSeconds();
|
| | | bool isOpen = fairyGrabBossModel.IsOpen;
|
| | | activityCell.containerTimer.gameObject.SetActive(seconds > 0 || isOpen);
|
| | | if (seconds > 0)
|
| | | {
|
| | | activityCell.timer.text = TimeUtility.SecondsToHMS(seconds);
|
| | | }
|
| | | else if (isOpen)
|
| | | {
|
| | | activityCell.timer.text = Language.Get("FairyGrabBossOpened");
|
| | | }
|
| | | }
|
| | | //cell = m_ActivityCtrl.GetActiveCellView((int)OpenServerActivityCenter.OSActivityType.FairyGrabBossNotice);
|
| | | //if (cell != null)
|
| | | //{
|
| | | // var activityCell = cell as OpenServerActivityCell;
|
| | | // var seconds = fairyGrabBossModel.GetNextSessionSeconds();
|
| | | // bool isOpen = fairyGrabBossModel.IsOpen;
|
| | | // activityCell.containerTimer.gameObject.SetActive(seconds > 0 || isOpen);
|
| | | // if (seconds > 0)
|
| | | // {
|
| | | // activityCell.timer.text = TimeUtility.SecondsToHMS(seconds);
|
| | | // }
|
| | | // else if (isOpen)
|
| | | // {
|
| | | // activityCell.timer.text = Language.Get("FairyGrabBossOpened");
|
| | | // }
|
| | | //}
|
| | | }
|
| | |
|
| | | void CheckAlreadyOpen()
|
| | |
| | | case 12:
|
| | | WindowCenter.Instance.Open<FairyLeagueNoticeWin>(true);
|
| | | break;
|
| | | case 13:
|
| | | WindowCenter.Instance.Open<FairyGrabBossNoticeWin>(true);
|
| | | break;
|
| | | //case 13:
|
| | | // WindowCenter.Instance.Open<FairyGrabBossNoticeWin>(true);
|
| | | // break;
|
| | | case 14:
|
| | | WindowCenter.Instance.Open<FlashRushToBuyWin>(true);
|
| | | break;
|
| | |
| | | int.TryParse(jobStr[jobStr.Length - 1].ToString(), out occupa);
|
| | | int classLv = 0;
|
| | | int.TryParse(jobStr.Substring(0, jobStr.Length - 1), out classLv);
|
| | | jobText.text = OccupationNameConfig.GetOccupationName(occupa, classLv);
|
| | | jobText.text = OccupationNameConfig.GetOccupationName(occupa, 1);
|
| | | int realmLv = 0;
|
| | | switch ((RankType)data.type)
|
| | | {
|
| | |
| | | m_PropertyMoveSpeed.text = GetAttrStr(PropertyType.MoveSpeed);
|
| | | m_PropertyRealHurt.text = GetAttrStr(PropertyType.RealHurt);
|
| | | m_PropertyRealDef.text = GetAttrStr(PropertyType.RealResis);
|
| | | m_PropertyExtraHurt.text = GetAttrStr(PropertyType.AddHurt);
|
| | | m_PropertyReduceHurt.text = GetAttrStr(PropertyType.ReduceHurt);
|
| | | m_PropertyExtraHurt.text = GetAttrStr(PropertyType.PVPAddHurt);
|
| | | m_PropertyReduceHurt.text = GetAttrStr(PropertyType.PVPReduceHurt);
|
| | | m_PropertyCritOdd.text = GetAttrStr(PropertyType.CritChance);
|
| | | m_PropertyCritHurt.text = GetAttrStr(PropertyType.CritHurt);
|
| | | m_PropertyCritHurtOdd.text = GetAttrStr(PropertyType.HeartHit);
|
| | |
| | | using UnityEngine; |
| | | using Snxxz.UI; |
| | | |
| | | public class SelectRoleBehaviour : MonoBehaviour |
| | | public class SelectRoleBehaviour |
| | | { |
| | | |
| | | [SerializeField] Camera m_CreateRoleCamera; |
| | | [SerializeField] CreateRoleHeroPlatform m_HeroPlatform; |
| | | [SerializeField] ActorShadowCaster m_Shadow; |
| | | GameObject behaviour; |
| | | Camera ceateRoleCamera; |
| | | CreateRoleHeroPlatform platform; |
| | | ActorShadowCaster shadow; |
| | | |
| | | UI3DShowHero playerModel = new UI3DShowHero(); |
| | | |
| | | public void Show() |
| | | { |
| | | Dispose(); |
| | | LoadAssets(CreateRoleScriptableObject.GetJobParams(PlayerDatas.Instance.loginInfo.Job)); |
| | | playerModel.Dispose(); |
| | | |
| | | var fashionClothes = 0; |
| | | var fashionWeapon = 0; |
| | |
| | | secondaryId = secondaryItemId, |
| | | }; |
| | | |
| | | m_CreateRoleCamera.gameObject.SetActive(true); |
| | | var model = playerModel.Show(data, m_HeroPlatform.transform); |
| | | ceateRoleCamera.gameObject.SetActive(true); |
| | | var model = playerModel.Show(data, platform.transform); |
| | | playerModel.StandUp(); |
| | | m_Shadow.Cast(model.transform); |
| | | shadow.gameObject.SetActive(true); |
| | | shadow.Cast(model.transform); |
| | | } |
| | | |
| | | public void Hide() |
| | | { |
| | | if (ceateRoleCamera != null) |
| | | { |
| | | ceateRoleCamera.gameObject.SetActive(false); |
| | | } |
| | | |
| | | if (shadow != null) |
| | | { |
| | | shadow.gameObject.SetActive(false); |
| | | } |
| | | } |
| | | |
| | | public void Dispose() |
| | | { |
| | | playerModel.Dispose(); |
| | | behaviour = null; |
| | | ceateRoleCamera = null; |
| | | platform = null; |
| | | shadow = null; |
| | | playerModel = null; |
| | | } |
| | | |
| | | private void OnEnable() |
| | | private void LoadAssets(CreateRoleScriptableObject.RoleShowParams showParams) |
| | | { |
| | | if (behaviour == null) |
| | | { |
| | | var prefab = SceneLoader.LoadCreateRole(showParams.platformPrefabName); |
| | | behaviour = GameObject.Instantiate(prefab, showParams.platformPosition, Quaternion.identity); |
| | | behaviour.name = showParams.platformPrefabName; |
| | | shadow = behaviour.GetComponentInChildren<ActorShadowCaster>(); |
| | | platform = behaviour.GetComponentInChildren<CreateRoleHeroPlatform>(); |
| | | ceateRoleCamera = behaviour.GetComponentInChildren<Camera>(); |
| | | } |
| | | } |
| | | |
| | | private void OnDestroy() |
| | | { |
| | | StopAllCoroutines(); |
| | | } |
| | | |
| | | } |
| | |
| | | using UnityEngine; |
| | | using Snxxz.UI; |
| | | |
| | | public class SelectRoleProcessor : MonoBehaviour |
| | | public class SelectRoleProcessor |
| | | { |
| | | [SerializeField] SelectRoleBehaviour m_Job1; |
| | | [SerializeField] SelectRoleBehaviour m_Job2; |
| | | |
| | | public void Show(int job) |
| | | public void Show( ) |
| | | { |
| | | switch (job) |
| | | { |
| | | case 1: |
| | | m_Job1.Show(); |
| | | break; |
| | | case 2: |
| | | m_Job2.Show(); |
| | | break; |
| | | } |
| | | } |
| | | |
| | | public void Dispose() |
| | | { |
| | | m_Job1.Dispose(); |
| | | m_Job2.Dispose(); |
| | | new SelectRoleBehaviour().Show(); |
| | | } |
| | | |
| | | } |
| | |
| | | var _property = treasure.treasureStages[0].propertyDict.First();
|
| | | switch (_property.Key)
|
| | | {
|
| | | case (int)PropertyType.KillMonsExpPrecent:
|
| | | case (int)PropertyType.KillMonsExpPercent:
|
| | | m_AddedEffect.text = Language.Get("FairyTreasure_2", _property.Value / 100);
|
| | | break;
|
| | | case (int)PropertyType.AddHurt:
|
| | | case (int)PropertyType.PVPAddHurt:
|
| | | m_AddedEffect.text = Language.Get("FairyTreasure_3", _property.Value / 100);
|
| | | break;
|
| | | case 60:
|
| | |
| | | System = 4,
|
| | | Loading = 5,
|
| | |
|
| | | Flag=99,
|
| | | Flag = 99,
|
| | | }
|
| | |
|
| | | public enum GestureType
|
| | |
| | | CDBPlayerRefresh_Earth = 205,//# 灵根属性-土
|
| | | CDBPlayerRefresh_NormalHurt = 206,// # 属性普通攻击增伤:普通攻击附加的固定值伤害
|
| | | CDBPlayerRefresh_NormalHurtPer = 207,// # 属性普通攻击增伤:普通攻击附加的固定值伤害
|
| | | CDBPlayerRefresh_FabaoHurt = 208,// # 属性普通攻击增伤:普通攻击附加的固定值伤害 |
| | | CDBPlayerRefresh_FabaoHurtPer = 209,// # 属性普通攻击增伤:普通攻击附加的固定值伤害 |
| | |
|
| | | CDBPlayerRefresh_FabaoHurt = 208,// # 属性法宝技能增伤:法宝技能攻击附加的固定值伤害 |
| | | CDBPlayerRefresh_FabaoHurtPer = 209,// # 属性法宝技能加成:法宝技能攻击附加的伤害百分比 |
| | | CDBPlayerRefresh_SuperHitRateReduce=210,//暴击抗性
|
| | | CDBPlayerRefresh_LuckyHitReduce=211,//会心一击伤害固定值减免
|
| | | CDBPlayerRefresh_FinalHurtReducePer=212,//最终伤害百分比减少
|
| | | };
|
| | |
|
| | | /** 背包类型码定义 */
|
| | |
| | | ATKSPEED = 11,//攻击速度
|
| | | CritChance = 12,//暴击几率
|
| | | CritHurt = 13,//暴击伤害
|
| | | CritResis = 14,//暴击抵抗
|
| | | CritResis = 14,//暴击减伤
|
| | | HeartHit = 15,//会心一击
|
| | | HeartHurt = 16,//会心一击伤害
|
| | | HeartResis = 17,//会心一击抵抗
|
| | | SkillHurt = 18,//技能伤害
|
| | | AddHurt = 19,//增加伤害
|
| | | ReduceHurt = 20,//减少伤害
|
| | | HeartHurt = 16,//会心伤害
|
| | | HeartResis = 17,//会心抗性
|
| | | SkillHurt = 18,//技能加成
|
| | | PVPAddHurt = 19,//PVP增加伤害
|
| | | PVPReduceHurt = 20,//PVP减少伤害
|
| | | LifeReply = 21,//生命回复
|
| | | HurtReflect = 22,//伤害反射
|
| | | MoveSpeed = 23,//移动速度
|
| | |
| | | AktReplyBlood = 32,//攻击回血
|
| | | Stun = 33,//击晕
|
| | | CtrlResis = 34,//控制抵抗
|
| | | OutHurt = 35,//输出伤害
|
| | | ReduceBearHurt = 36,//减少承受伤害
|
| | | PVPAddHurt = 37,//PVP增加伤害
|
| | | PVPReduceHurt = 38,//PVP伤害减少
|
| | | AddFinalHurt = 35,//附加伤害
|
| | | ReduceFinalHurt = 36,//附加伤害减少
|
| | | PVPAddHurtPer = 37,//PVP百分比增加伤害
|
| | | PVPReduceHurtPer = 38,//PVP百分比伤害减少
|
| | | DleHitChance = 39,//连击几率
|
| | | DleHurt = 40,//连击伤害
|
| | | BasicAtkPrecent = 41, //基础攻击百分比
|
| | | BasicHpPrecent = 42, //基础生命百分比
|
| | | BasicDefPrecent = 43, //基础防御百分比
|
| | | HitPrecent = 44, //命中百分比
|
| | | DodgePrecent = 45,//闪避百分比
|
| | | KillMonsExpPrecent = 46,//杀怪经验百分比
|
| | | HorcruxBasicAttrPrecent = 48, //魂器基础属性
|
| | | SkillHurtPrecent = 49, //技能减伤
|
| | | HpPrecent = 50,//生命百分比
|
| | | AtkPrecent = 51, //攻击百分比
|
| | | BasicAtkPercent = 41, //基础攻击百分比
|
| | | BasicHpPercent = 42, //基础生命百分比
|
| | | BasicDefPercent = 43, //基础防御百分比
|
| | | HitPercent = 44, //命中百分比
|
| | | DodgePercent = 45,//闪避百分比
|
| | | KillMonsExpPercent = 46,//杀怪经验百分比
|
| | | HorcruxBasicAttrPercent = 48, //魂器基础属性
|
| | | ReduceSkillHurtPercent = 49, //技能减伤
|
| | | HpPercent = 50,//生命百分比
|
| | | AtkPercent = 51, //攻击百分比
|
| | | EveryLvAddAtk = 52, //每1级+%s攻击
|
| | | EveryLvAddHp = 53, //每1级+%s生命
|
| | | AddEquipDropPrecent = 54, //增加装备掉落率
|
| | | AddCoinsPrecent = 55,//增加金币
|
| | | AddRealHurtPer = 61,//百分比增加真实伤害
|
| | | ReduceRealHurtPer = 62,//百分比减少真实伤害
|
| | | ArmorMaxHPPer = 63,//基础装备生命
|
| | | WeaponAtkPer = 65,//基础装备攻击
|
| | | ArmorDefPer = 66, //防具防御百分比
|
| | | MinAtk = 67, //最小攻击
|
| | | MaxAtk = 68, //最大攻击
|
| | | DefencePrecent = 69,//防御百分比
|
| | | CritHurtPrecent = 70,//暴击伤害
|
| | | MoveSpeedPrecent = 71, //移动速度百分比
|
| | | DefencePercent = 69,//防御百分比
|
| | | CritHurtPercent = 70,//暴击伤害
|
| | | MoveSpeedPercent = 71, //移动速度百分比
|
| | | MaxProDef = 72, //防护值
|
| | | ProDefHPPer = 73,//防护值百分比
|
| | | ProDefAbsorb = 74, //护盾吸收伤害百分比
|
| | |
| | | WingHPPer = 86, //翅膀生命
|
| | | SuiteBasePer = 87, //套装基础属性
|
| | | PlusBaseAtkPer = 88, //强化攻击
|
| | | NpcHurtAddPer = 89,//对怪物伤害加成
|
| | | NpcHurtAddPer = 89,//百分比PVE技能加成
|
| | | JobAHurtAddPer = 90,//对龙魂伤害增加百分比
|
| | | JobBHurtAddPer = 91,//对灵瑶伤害增加百分比
|
| | | JobCHurtAddPer = 92,//对弓箭手伤害增加百分比
|
| | |
| | | SkillReducePerG = 115, //射日神弓技能减伤百分比
|
| | | Luck = 120,//气运
|
| | | LuckPer = 133,//气运百分比
|
| | |
|
| | | AddNormalHurt = 134,//固定值增加普通攻击伤害
|
| | | AddNormalHurtPer = 135,//百分比增加普通攻击伤害
|
| | | AddSkillHurt = 136,//固定值增加技能伤害
|
| | | AddSkillHurtPer = 137,//百分比增加技能伤害
|
| | |
|
| | | ReduceCrit = 138,//减少暴击率
|
| | | AddHeartHurtPer = 139,//百分比增加会心一击伤害
|
| | | ReduceHeartHurtPer = 140,//百分比减少会心一击伤害
|
| | | AddPVEHurt = 141,//固定值增加pve伤害
|
| | | AddFinalHurtPer = 142,//百分比增加最终伤害
|
| | | ReduceFinalHurtPer = 143,//百分比减少最终伤害
|
| | |
|
| | | Mater = 201,//金
|
| | | Wood = 202,//木
|
| | | Water = 203,//水
|
| | | Fire = 204,//火
|
| | | Earth = 205,//土
|
| | |
|
| | | }
|
| | |
|
| | | public enum TextColType
|
| | |
| | | AllByCountry = 7, //阵营副本
|
| | | All = 8, //所有
|
| | | VSRoom = 9, //pk房间
|
| | | CrossAll = 11, //跨服所有
|
| | | }
|
| | |
|
| | | public enum GuideType
|
| | |
| | | return PlayerDatas.Instance.extersion.LuckyHitRateReduce;
|
| | | case PropertyType.SkillHurt:
|
| | | return PlayerDatas.Instance.extersion.SkillAtkRate;
|
| | | case PropertyType.AddHurt:
|
| | | case PropertyType.PVPAddHurt:
|
| | | return PlayerDatas.Instance.extersion.DamagePer;
|
| | | case PropertyType.ReduceHurt:
|
| | | case PropertyType.PVPReduceHurt:
|
| | | return PlayerDatas.Instance.extersion.damageReduceRate;
|
| | | case PropertyType.LifeReply:
|
| | | return PlayerDatas.Instance.extersion.HPRestorePer;
|
| | |
| | | return PlayerDatas.Instance.extersion.FaintRate;
|
| | | case PropertyType.CtrlResis:
|
| | | return PlayerDatas.Instance.extersion.FaintDefRate;
|
| | | case PropertyType.OutHurt:
|
| | | case PropertyType.AddFinalHurt:
|
| | | return PlayerDatas.Instance.extersion.FinalHurt;
|
| | | case PropertyType.ReduceBearHurt:
|
| | | case PropertyType.ReduceFinalHurt:
|
| | | return PlayerDatas.Instance.extersion.FinalHurtReduce;
|
| | | case PropertyType.PVPAddHurt:
|
| | | case PropertyType.PVPAddHurtPer:
|
| | | return PlayerDatas.Instance.extersion.DamagePerPVP;
|
| | | case PropertyType.PVPReduceHurt:
|
| | | case PropertyType.PVPReduceHurtPer:
|
| | | return PlayerDatas.Instance.extersion.DamagePerPVPReduce;
|
| | | case PropertyType.DleHitChance:
|
| | | return PlayerDatas.Instance.extersion.ComboDamPerRate;
|
| | | case PropertyType.DleHurt:
|
| | | return PlayerDatas.Instance.extersion.ComboDamPer;
|
| | | case PropertyType.SkillHurtPrecent:
|
| | | case PropertyType.ReduceSkillHurtPercent:
|
| | | return PlayerDatas.Instance.extersion.skillAtkRateReduce;
|
| | | case PropertyType.NpcHurtAddPer:
|
| | | return PlayerDatas.Instance.extersion.NpcHurtAddPer;
|