Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
| New file |
| | |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | |
| | | public class SyncTargetPos : MonoBehaviour |
| | | { |
| | | public Transform target; |
| | | |
| | | // Update is called once per frame |
| | | void Update() |
| | | { |
| | | if (target) |
| | | { |
| | | var _y = transform.position.y; |
| | | transform.position = new Vector3(target.position.x, _y, target.position.z); |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: b04ecd0881278cc4bad0070cb1d06457 |
| | | timeCreated: 1542595938 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | | static public LaunchStage currentStage { get { return m_CurrentStage; } }
|
| | |
|
| | | static float m_Progress = 0f;
|
| | | static public float progress {
|
| | | static public float progress
|
| | | {
|
| | | get { return m_Progress; }
|
| | | set {
|
| | | set
|
| | | {
|
| | | if (m_Progress != value)
|
| | | {
|
| | | m_Progress = value;
|
| | |
| | | progress = Mathf.Clamp(progressBuf + timer / duration * 0.3f, progressBuf, progressBuf + 0.3f);
|
| | | yield return null;
|
| | | }
|
| | | }
|
| | |
|
| | | if (!AssetDeCompressTask.assetDeCompressCompleted)
|
| | | {
|
| | | progressBuf = progress;
|
| | | var decompressProgress = AssetDeCompressTask.DecompressAync(ResourcesPath.Instance.ExternalStorePath);
|
| | | while (!decompressProgress.done)
|
| | |
| | | progress = progressBuf + decompressProgress.progress * 0.1f;
|
| | | yield return null;
|
| | | }
|
| | |
|
| | | AssetDeCompressTask.assetDeCompressVersion = VersionConfig.Get().version;
|
| | | }
|
| | | break;
|
| | | case InstalledAsset.NullAsset:
|
| | |
| | | for (int i = 0; i < column + 1; ++i)
|
| | | {
|
| | | _start = new Vector3(_startX + i * size, _hero.Pos.y + 0.001f, _startZ);
|
| | | _end = new Vector3(_startX + i * size, _hero.Pos.y + 0.001f, _startZ + row* .5f);
|
| | | _end = new Vector3(_startX + i * size, _hero.Pos.y + 0.001f, _startZ + row * .5f);
|
| | |
|
| | | Gizmos.DrawLine(_start, _end);
|
| | | }
|
| | |
| | | {
|
| | | var _areaCamera = Config.Instance.Get<TableConfig.AreaCameraConfig>(_type);
|
| | |
|
| | | if (_areaCamera == null)
|
| | | if (_areaCamera == null
|
| | | || GA_Hero.s_MapSwitching)
|
| | | {
|
| | | yield break;
|
| | | }
|
| | |
| | | CameraController.Instance.rotationY = _areaCamera.RotY * Constants.F_DELTA;
|
| | |
|
| | | float _time = 2f;
|
| | | while (_time > 0)
|
| | | while (_time > 0 && !GA_Hero.s_MapSwitching)
|
| | | {
|
| | | _time -= Time.deltaTime;
|
| | | yield return null;
|
| | | }
|
| | |
|
| | | if (GA_Hero.s_MapSwitching)
|
| | | {
|
| | | yield break;
|
| | | }
|
| | |
|
| | | CameraController.Instance.AcceptInput = false;
|
| | |
|
| | | CameraController.Instance.Distance = _areaCamera.Distance * Constants.F_DELTA;
|
| | |
| | | using UnityEngine;
|
| | |
|
| | | public class DTCA125_tagMCChangeMapFail : DtcBasic
|
| | | { |
| | | |
| | | {
|
| | |
|
| | | public override void Done(GameNetPackBasic vNetPack)
|
| | | {
|
| | | base.Done(vNetPack);
|
| | |
| | | {
|
| | | return;
|
| | | }
|
| | | MapTransferUtility.Instance.CheckMap(PlayerDatas.Instance.baseData.MapID, true);
|
| | | MapTransferUtility.Instance.Clear();
|
| | |
|
| | | MapTransferUtility.Instance.lastMoveToWorldBossTime = 0;
|
| | | MapTransferUtility.Instance.lastMoveToWorldBossNpcID = 0;
|
| | |
| | | WindowCenter.Instance.Close<LoadingWin>();
|
| | |
|
| | | GA_Hero.s_MapSwitching = false;
|
| | | } |
| | | |
| | | }
|
| | |
|
| | | }
|
| | |
|
| | |
|
| | |
| | | m_PaymentTable["ProductID"] = "snxxz";
|
| | | m_PaymentTable["OperatorID"] = VersionConfig.Get().appId;
|
| | | // 取玩家区服ID
|
| | | string _region_flag = "s" + ServerListCenter.Instance.currentServer.region_flag;
|
| | | m_PaymentTable["RegionName"] = _region_flag;
|
| | | m_PaymentTable["RegionName"] = "s" + ServerListCenter.Instance.currentServer.region_flag;
|
| | | m_PaymentTable["TimeStamp"] = ((long)(System.DateTime.Now - System.TimeZone.CurrentTimeZone.ToLocalTime(new System.DateTime(1970, 1, 1))).TotalSeconds).ToString();
|
| | | m_PaymentTable["Time"] = System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
|
| | | m_PaymentTable["EventID"] = "12001";
|
| | |
| | | m_Json["roleID"] = PlayerDatas.Instance.baseData.PlayerID;
|
| | | m_Json["roleName"] = PlayerDatas.Instance.baseData.PlayerName;
|
| | | m_Json["level"] = PlayerDatas.Instance.baseData.LV.ToString();
|
| | | m_Json["sid"] = _region_flag;
|
| | | m_Json["sid"] = ServerListCenter.Instance.currentServer.region_flag;
|
| | | }
|
| | |
|
| | | if (ChannelPlatform == E_ChannelPlatform.Mr)
|
| | |
| | | private bool m_SwitchMapFinished = true;
|
| | | private int m_MapID;
|
| | |
|
| | | public void CheckMap(int mapID)
|
| | | public void CheckMap(int mapID, bool force = false)
|
| | | {
|
| | | if (m_MapID == mapID)
|
| | | if (m_MapID == mapID || force)
|
| | | {
|
| | | m_SwitchMapFinished = true;
|
| | | }
|
| | |
| | |
|
| | | private void OnTriggerExit(Collider other)
|
| | | {
|
| | | // if (GA_Hero.s_MapSwitching)
|
| | | // {
|
| | | // return;
|
| | | // }
|
| | |
|
| | | if (_type >= 3000)
|
| | | {
|
| | | SnxxzGame.Instance.MovingCamera(false, _type);
|
| | |
| | | public class AssetDeCompressTask |
| | | { |
| | | |
| | | |
| | | public static string assetDeCompressVersion |
| | | { |
| | | get |
| | | { |
| | | return LocalSave.GetString("AssetDeCompressVersion"); |
| | | } |
| | | set |
| | | { |
| | | LocalSave.SetString("AssetDeCompressVersion", value); |
| | | } |
| | | } |
| | | |
| | | public static bool assetDeCompressCompleted |
| | | { |
| | | get |
| | | { |
| | | if (string.IsNullOrEmpty(assetDeCompressVersion)) |
| | | { |
| | | return false; |
| | | } |
| | | else |
| | | { |
| | | return assetDeCompressVersion == VersionConfig.Get().version; |
| | | } |
| | | } |
| | | } |
| | | |
| | | public static void Decompress(string path) |
| | | { |
| | | var files = new List<FileInfo>(); |
| | |
| | | { |
| | | object progressLock = new object(); |
| | | float m_Progress = 0f; |
| | | public float progress { |
| | | get { |
| | | public float progress |
| | | { |
| | | get |
| | | { |
| | | return m_Progress; |
| | | } |
| | | set { |
| | | set |
| | | { |
| | | lock (progressLock) |
| | | { |
| | | m_Progress = value; |
| | |
| | | |
| | | object doneLock = new object(); |
| | | bool m_Done = false; |
| | | public bool done { |
| | | get { |
| | | public bool done |
| | | { |
| | | get |
| | | { |
| | | return m_Done; |
| | | } |
| | | set { |
| | | set |
| | | { |
| | | lock (doneLock) |
| | | { |
| | | m_Done = value; |
| | |
| | | public event Action UpdateWishAwardEvent;
|
| | | public event Action<int> onStateUpate;
|
| | | public const int WishRedKey = 20915;
|
| | | public bool isOpenPrompting { get; set;}
|
| | | public override void Init()
|
| | | {
|
| | | ParseConfig();
|
| | |
| | |
|
| | | public void OnBeforePlayerDataInitialize()
|
| | | {
|
| | | isOpenPrompting = true;
|
| | | ResetDragData();
|
| | | ResetPoolData();
|
| | | }
|
| | |
|
| | | public void OnPlayerLoginOk()
|
| | | {
|
| | | UpdateFreeWishRedpoint();
|
| | | UpdateRedpoint();
|
| | | }
|
| | |
|
| | |
| | | {
|
| | | if (type == Operation.WishingWellInfo && state == 0)
|
| | | {
|
| | | UpdateFreeWishRedpoint();
|
| | | UpdateRedpoint();
|
| | | if (onStateUpate != null)
|
| | | {
|
| | |
| | | {
|
| | | if (type == Operation.WishingWellInfo && state == 0)
|
| | | {
|
| | | UpdateFreeWishRedpoint();
|
| | | UpdateRedpoint();
|
| | | if (onStateUpate != null)
|
| | | {
|
| | |
| | | SetWishingAwardData(i, wellItem);
|
| | | }
|
| | | }
|
| | | UpdateFreeWishRedpoint();
|
| | | UpdateRedpoint();
|
| | | if(UpdateWishAwardEvent != null)
|
| | | {
|
| | |
| | | wishPointlist.Add(redpoint);
|
| | | }
|
| | | }
|
| | | private void UpdateRedpoint()
|
| | |
|
| | | private void UpdateFreeWishRedpoint()
|
| | | {
|
| | | freeWishRedpoint.state = RedPointState.None;
|
| | | if (!IsOpen) return;
|
| | |
|
| | | int second = 0;
|
| | | bool isCool = TryGetFreeWishCoolTime(out second);
|
| | | if (!isCool)
|
| | | {
|
| | | freeWishRedpoint.state = RedPointState.Simple;
|
| | | }
|
| | | UpdateRedpoint();
|
| | | }
|
| | |
|
| | | private void UpdateRedpoint()
|
| | | {
|
| | | for (int i = 0; i < wishPointlist.Count; i++)
|
| | | {
|
| | | var wishPoint = wishPointlist[i];
|
| | | wishPoint.state = RedPointState.None;
|
| | | }
|
| | |
|
| | | if (!IsOpen) return;
|
| | |
|
| | | int second = 0;
|
| | | bool isCool = TryGetFreeWishCoolTime(out second);
|
| | | if(!isCool)
|
| | | {
|
| | | freeWishRedpoint.state = RedPointState.Simple;
|
| | | }
|
| | | if (!IsOpen || freeWishRedpoint.state != RedPointState.None) return;
|
| | |
|
| | | for (int i = 0; i < wishPointlist.Count; i++)
|
| | | {
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), Language.Get("WishingPool105", wishingModel.wishingPrice), (bool isOk) =>
|
| | | if (wishingModel.isOpenPrompting)
|
| | | {
|
| | | if (isOk)
|
| | | ConfirmCancel.ToggleConfirmCancel(Language.Get("Mail101"), Language.Get("WishingPool105", wishingModel.wishingPrice),
|
| | | Language.Get("ConfirmCancel101"), (bool isOk, bool isToggle) =>
|
| | | {
|
| | | wishingModel.SendRefreshPoolInfo(0);
|
| | | }
|
| | | });
|
| | | if (isOk)
|
| | | {
|
| | | wishingModel.SendRefreshPoolInfo(0);
|
| | | wishingModel.isOpenPrompting = !isToggle;
|
| | | }
|
| | |
|
| | | });
|
| | | }
|
| | | else
|
| | | {
|
| | | wishingModel.SendRefreshPoolInfo(0);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), Language.Get("WishingPool106", wishingModel.wishingPrice), (bool isOk) =>
|
| | | ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), Language.Get("WishingPool106"), (bool isOk) =>
|
| | | {
|
| | | if (isOk)
|
| | | {
|
| | |
| | | public class PlayerDeadModel : Model, IBeforePlayerDataInitialize,IPlayerLoginOk
|
| | | {
|
| | | public int[]dungeonKillArray { get; private set; }
|
| | | public int deadBuffId { get; private set;}
|
| | |
|
| | | public override void Init()
|
| | | {
|
| | | isKillByPlayer = false;
|
| | |
| | | RebornConditions = ConfigParse.GetMultipleStr<int>(funcConfig.Numerical1);
|
| | | FuncConfigConfig RebornTime = Config.Instance.Get<FuncConfigConfig>("DuplicatesRebornTime");
|
| | | duplicatesRebornDict = ConfigParse.GetDic<int, int>(RebornTime.Numerical1);
|
| | | FuncConfigConfig ElderBattlefieldRobot = Config.Instance.Get<FuncConfigConfig>("ElderBattlefieldRobot");
|
| | | deadBuffId = int.Parse(ElderBattlefieldRobot.Numerical3);
|
| | | SysNotifyMgr.Instance.sysNotifyEvent += RefreshPlayerDieInfo;
|
| | | }
|
| | |
|
| | |
| | | using System;
|
| | | using System.Collections;
|
| | | using System.Collections.Generic;
|
| | | using TableConfig;
|
| | | using UnityEngine;
|
| | | using UnityEngine.UI;
|
| | |
| | | private Image _ringImage;
|
| | |
|
| | | [SerializeField] Text dieDesText;
|
| | | [SerializeField] Text buffText;
|
| | |
|
| | | PlayerDeadModel _deadModel;
|
| | | PlayerDeadModel DeadModel
|
| | |
| | | get { return _deadModel ?? (_deadModel = ModelCenter.Instance.GetModel<PlayerDeadModel>()); }
|
| | | }
|
| | |
|
| | | public const int ElderBattleMapID = 31160; //上古战场地图Id
|
| | | int questTimes = 0;
|
| | | #region Built-in
|
| | | protected override void BindController()
|
| | |
| | | TimeDownMgr.Instance.Get(TimeDownMgr.CoolTimeType.DuplicatesReborn, out coolDown);
|
| | | RefreshTime(Mathf.RoundToInt(coolDown.duration - coolDown.time));
|
| | | DeadModel.RefreshDuplicatesRebornCDEvent = RefreshTime;
|
| | | MapConfig mapConfig = Config.Instance.Get<MapConfig>(PlayerDatas.Instance.baseData.MapID);
|
| | | int curMapId = PlayerDatas.Instance.baseData.MapID;
|
| | | MapConfig mapConfig = Config.Instance.Get<MapConfig>(curMapId);
|
| | | dieDesText.gameObject.SetActive(false);
|
| | | buffText.gameObject.SetActive(curMapId == ElderBattleMapID);
|
| | | if (curMapId == ElderBattleMapID)
|
| | | {
|
| | | List<int> buffIds = new List<int>();
|
| | | StatusMgr.Instance.GetBuffIds(PlayerDatas.Instance.PlayerId, ref buffIds);
|
| | | var skillConfigs = SkillConfig.GetSkillActConfigs(0,0,DeadModel.deadBuffId);
|
| | | string skillName = string.Empty;
|
| | | int buffLv = 0;
|
| | | if(buffIds.Count > 0)
|
| | | {
|
| | | for(int i = 0; i < buffIds.Count; i++)
|
| | | {
|
| | | int buffId = buffIds[i];
|
| | | SkillConfig skillConfig = Config.Instance.Get<SkillConfig>(buffId);
|
| | | if(skillConfig.SkillTypeID == DeadModel.deadBuffId)
|
| | | {
|
| | | skillName = skillConfig.SkillName;
|
| | | buffLv = skillConfig.SkillLV + 1;
|
| | | break;
|
| | | }
|
| | | }
|
| | | }
|
| | | |
| | | if(skillConfigs != null && skillConfigs.Count > 0 && buffLv == 0)
|
| | | {
|
| | | SkillConfig skillConfig = skillConfigs[0];
|
| | | skillName = skillConfig.SkillName;
|
| | | buffLv = 1;
|
| | | }
|
| | |
|
| | | buffText.text = Language.Get("AncientBattlefield_Text_2",buffLv,skillName);
|
| | | }
|
| | | for (int i = 0; i < DeadModel.dungeonKillArray.Length; i++)
|
| | | {
|
| | | if(DeadModel.dungeonKillArray[i] == PlayerDatas.Instance.baseData.MapID)
|
| | | if(DeadModel.dungeonKillArray[i] == curMapId)
|
| | | {
|
| | | dieDesText.gameObject.SetActive(true);
|
| | | string msg = StringUtility.Contact(Language.Get("AncientBattlefield_Text_1", mapConfig.Name, UIHelper.ServerStringTrim(DeadModel.killerName)));
|
| | |
| | |
|
| | | RuneTowerModel runeTowerModel { get { return ModelCenter.Instance.GetModel<RuneTowerModel>(); } }
|
| | |
|
| | | public void Display(int _floor)
|
| | | public void Display(int selectedFloor, int nextUnLockFloor)
|
| | | {
|
| | | var config = Config.Instance.Get<RuneTowerFloorConfig>(_floor);
|
| | | if (_floor == runeTowerModel.selectedFloor)
|
| | | var config = Config.Instance.Get<RuneTowerFloorConfig>(nextUnLockFloor);
|
| | | if (nextUnLockFloor == runeTowerModel.selectedFloor)
|
| | | {
|
| | | m_FloorTitle.text = Language.Get("RuneTower10");
|
| | | }
|
| | |
| | | m_UnLockRuneHoleContainer.gameObject.SetActive(true);
|
| | | m_UnLockRuneComposeContainer.gameObject.SetActive(false);
|
| | |
|
| | | var nextHole = runeTowerModel.GetAccumulativeUnLockHoleCount(_floor);
|
| | | var nextHole = runeTowerModel.GetAccumulativeUnLockHoleCount(nextUnLockFloor);
|
| | | var currentHole = nextHole - 1;
|
| | | m_CurrentUnLockRuneHole.text = currentHole.ToString();
|
| | | m_NextUnLockRuneHole.text = nextHole.ToString();
|
| | | }
|
| | | else
|
| | | else if (config.UnLockCompose > 0)
|
| | | {
|
| | | m_UnLockRuneTypeContainer.gameObject.SetActive(false);
|
| | | m_UnLockRuneHoleContainer.gameObject.SetActive(false);
|
| | |
| | | m_UnLockRuneCompose.text = Language.Get("RuneTower8", Language.Get(StringUtility.Contact("RuneType_", itemConfig.Effect1)));
|
| | | m_RuneComposeBehaviour.Display(config.UnLockCompose);
|
| | | }
|
| | | else
|
| | | {
|
| | | var selectedConfig = Config.Instance.Get<RuneTowerFloorConfig>(selectedFloor);
|
| | | m_UnLockRuneTypeContainer.gameObject.SetActive(true);
|
| | | m_UnLockRuneHoleContainer.gameObject.SetActive(false);
|
| | | m_UnLockRuneComposeContainer.gameObject.SetActive(false);
|
| | |
|
| | | var itemConfig = Config.Instance.Get<ItemConfig>(selectedConfig.RuneDrop);
|
| | | m_UnLockRuneType.text = Language.Get("RuneTower13", Language.Get(StringUtility.Contact("RuneType_", itemConfig.Effect1)));
|
| | | m_RuneBehaviour.Display(config.RuneDrop);
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | }
|
| | |
|
| | | var nextUnLockFloor = model.GetNextUnLockFloor(model.selectedFloor);
|
| | | m_RunePreviewGroup.Display(nextUnLockFloor);
|
| | | m_RunePreviewGroup.Display(model.selectedFloor, nextUnLockFloor);
|
| | | }
|
| | |
|
| | | private void UpdateFightPower()
|