Merge branch 'master' of http://mobile.secondworld.net.cn:10010/r/Project_SG_scripts
| | |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | |
| | |
| | | |
| | | // 当前正在显示的弹窗 |
| | | PopupWindow currentWindow; |
| | | |
| | | float firstTime = 0; //打开HomeWin时的时间 |
| | | float stayTime; |
| | | bool homeWinFirstOpened = false; //HomeWin是否第一次打开 |
| | | |
| | | |
| | | // 上次弹窗时间,用于控制弹窗之间的间隔 |
| | | float lastTime = 0; //上次弹窗时间 |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// LateUpdate中处理弹窗队列,确保在所有其他逻辑处理完毕后才显示弹窗 |
| | | /// </summary> |
| | |
| | | if (!UIManager.Instance.IsOpened<HomeWin>()) |
| | | return; |
| | | |
| | | // 第一次打开HomeWin时记录时间 |
| | | if (!homeWinFirstOpened) |
| | | { |
| | | firstTime = Time.realtimeSinceStartup; |
| | | homeWinFirstOpened = true; |
| | | stayTime = float.Parse(FuncConfigConfig.Get("PopWin").Numerical1); |
| | | return; |
| | | } |
| | | // 等待x秒 |
| | | if (Time.realtimeSinceStartup - firstTime < stayTime) |
| | | return; |
| | | |
| | | if (UIManager.Instance.IsOpened(popupWindowQueue[0].window)) |
| | | { |
| | |
| | | if (UIManager.Instance.ExistAnyFullScreenOrMaskWin(popupWindowQueue[0].window)) |
| | | return; |
| | | |
| | | |
| | | |
| | | if (currentWindow.window != null) |
| | | { |
| | | //判断上一个推送是否关闭 |
| | |
| | | } |
| | | } |
| | | |
| | | public bool isBindBone = false; |
| | | |
| | | public bool isRedCamp = true; |
| | | public EffectConfig effectConfig; |
| | | |
| | |
| | | animator.speed = speedRate; |
| | | } |
| | | } |
| | | |
| | | public void BindBone(SkeletonAnimation skeletonAnim, string v) |
| | | { |
| | | Bone bone = skeletonAnim.skeleton.FindBone(v); |
| | | |
| | | if (null == bone) |
| | | { |
| | | return; |
| | | } |
| | | |
| | | isBindBone = true; |
| | | |
| | | BoneFollower boneFollower = gameObject.AddMissingComponent<BoneFollower>(); |
| | | boneFollower.boneName = v; |
| | | boneFollower.skeletonRenderer = skeletonAnim; |
| | | |
| | | boneFollower.followBoneRotation = false; |
| | | boneFollower.followXYPosition = true; |
| | | boneFollower.followZPosition = false; |
| | | boneFollower.followLocalScale = false; |
| | | boneFollower.followParentWorldScale = false; |
| | | boneFollower.followSkeletonFlip = false; |
| | | |
| | | boneFollower.Initialize(); |
| | | boneFollower.LateUpdate(); |
| | | } |
| | | } |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using Spine.Unity; |
| | | using UnityEngine; |
| | | |
| | | |
| | |
| | | BattleEffectPlayer effectPlayer = kv.Value.Key; |
| | | if (null != effectPlayer) |
| | | { |
| | | if (effectPlayer.isBindBone) |
| | | { |
| | | continue; |
| | | } |
| | | effectPlayer.transform.position = battleObject.heroRectTrans.position; |
| | | var effectPos = effectPlayer.effectConfig.effectPos; |
| | | if (null != effectPos && effectPos.Length >= 2) |
| | |
| | | return; |
| | | } |
| | | |
| | | bool isNew = false; |
| | | // bool isNew = false; |
| | | if (buffDataDict.ContainsKey(vNetData.BuffID)) |
| | | { |
| | | buffDataDict[vNetData.BuffID] = vNetData; |
| | | } |
| | | else |
| | | { |
| | | isNew = true; |
| | | // isNew = true; |
| | | buffDataDict.Add(vNetData.BuffID, vNetData); |
| | | } |
| | | |
| | |
| | | else |
| | | { |
| | | BattleEffectPlayer effect = battleObject.battleField.battleEffectMgr.PlayEffect(battleObject, skillConfig.BuffEffect, battleObject.heroRectTrans, battleObject.Camp); |
| | | |
| | | BoneFollower boneFollower = effect.AddMissingComponent<BoneFollower>(); |
| | | |
| | | effect.BindBone(battleObject.motionBase.skeletonAnim, "hit"); |
| | | |
| | | HashSet<uint> buffIdSet = new HashSet<uint>(); |
| | | buffIdSet.Add(vNetData.BuffID); |
| | | buffEffectDict.Add(skillConfig.BuffEffect, new KeyValuePair<BattleEffectPlayer, HashSet<uint>>(effect, buffIdSet)); |
| | |
| | | public Action OnHitAnimationComplete; |
| | | private List<Action> runningActions = new List<Action>(); |
| | | |
| | | protected SkeletonAnimation skeletonAnim; |
| | | public SkeletonAnimation skeletonAnim; |
| | | protected Spine.AnimationState animState; |
| | | protected Spine.Skeleton skeleton; |
| | | protected float defaultMixDuration = 0f; |
| | |
| | | public override void Reset() |
| | | { |
| | | base.Reset(); |
| | | start = WorldToLocalAnchoredPosition(bulletTrans.position); |
| | | start = WorldToLocalAnchoredPosition(bulletTrans.position) + bulletOffset; |
| | | end = WorldToLocalAnchoredPosition(target.position); |
| | | duration = Vector2.Distance(start, end) / skillConfig.BulletFlySpeed; |
| | | control = (start + end) / 2 + Vector2.up * 100f; |
| | |
| | | bounceElapsed = 0f; |
| | | if (hurtList.Count > 0) |
| | | { |
| | | start = WorldToLocalAnchoredPosition(bulletTrans.position); |
| | | start = WorldToLocalAnchoredPosition(bulletTrans.position) + bulletOffset; |
| | | end = WorldToLocalAnchoredPosition(target.position); |
| | | duration = Vector2.Distance(start, end) / skillConfig.BulletFlySpeed; |
| | | } |
| | |
| | | protected RectTransform target; |
| | | protected Action<int, List<HB427_tagSCUseSkill.tagSCUseSkillHurt>> onHit; |
| | | |
| | | protected Vector2 bulletOffset = Vector2.zero; |
| | | |
| | | protected bool finished = false; |
| | | protected float duration = 0f; |
| | | protected float elapsed = 0f; |
| | |
| | | out localPoint); |
| | | bulletTrans.anchoredPosition = localPoint; |
| | | } |
| | | |
| | | if (bulletEffect.effectConfig.effectPos != null && bulletEffect.effectConfig.effectPos.Length >= 2) |
| | | { |
| | | bulletOffset = new Vector2(bulletEffect.effectConfig.effectPos[0], bulletEffect.effectConfig.effectPos[1]); |
| | | } |
| | | } |
| | | |
| | | public virtual void Reset() |
| | |
| | | { |
| | | base.Reset(); |
| | | hitTriggered = false; |
| | | start = WorldToLocalAnchoredPosition(bulletTrans.position); |
| | | start = WorldToLocalAnchoredPosition(bulletTrans.position) + bulletOffset; |
| | | end = WorldToLocalAnchoredPosition(target.position); |
| | | duration = Vector2.Distance(start, end) / skillConfig.BulletFlySpeed; |
| | | Vector2 dir = (end - start).normalized; |
| | |
| | | public override void Reset() |
| | | { |
| | | base.Reset(); |
| | | start = WorldToLocalAnchoredPosition(bulletTrans.position); |
| | | start = WorldToLocalAnchoredPosition(bulletTrans.position) + bulletOffset; |
| | | end = WorldToLocalAnchoredPosition(target.position); |
| | | duration = Vector2.Distance(start, end) / skillConfig.BulletFlySpeed; |
| | | // BattleUtility.MarkStartAndEnd(bulletTrans, target); |
| | |
| | | using System.Collections.Generic; |
| | | using DG.DemiEditor; |
| | | using LitJson; |
| | | public class BoneFieldManager : GameSystemManager<BoneFieldManager> |
| | | { |
| | |
| | | |
| | | public void UpdateFBEnd(H0320_tagFBEnd vNetData) |
| | | { |
| | | if (vNetData.Msg.IsNullOrEmpty()) |
| | | if (vNetData.Msg == null) |
| | | return; |
| | | ChallengeResultData result = ChallengeResultData.FromJson(vNetData.Msg); |
| | | if (result == null || result.itemInfo.IsNullOrEmpty()) |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | public class BoneFieldWin : UIBase |
| | |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | |
| | |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | |
| | | public class FirstChargeHeroInfoWin : UIBase |
| | |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using UnityEngine; |
| | | |
| | | public class FirstChargeManager : GameSystemManager<FirstChargeManager> |
| | |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using System.Data; |
| | | using UnityEngine; |
| | | |
| | | public class FirstChargeWin : FunctionsBaseWin |
| | | { |
| | | |
| | | [Header("标签页")] |
| | | [SerializeField] TextEx[] txtTabTitles; |
| | | [SerializeField] ButtonEx[] btnTabs; |
| | | [SerializeField] RedpointBehaviour[] rpTabs; |
| | | [SerializeField] int fontSizeBefore = 24; |
| | | [SerializeField] int fontSizeAfter = 30; |
| | | [Header("主物品")] |
| | | [SerializeField] TextEx txtName; |
| | | [SerializeField] TextEx txtDesc; |
| | |
| | | btnBuy.SetListener(OnClickBuyButton); |
| | | btnPreviewHero.SetListener(OnClickPreviewHero); |
| | | } |
| | | |
| | | |
| | | |
| | | protected override void OnPreOpen() |
| | | { |
| | |
| | | { |
| | | for (int i = 0; i < btnTabs.Length; i++) |
| | | { |
| | | txtTabTitles[i].fontSize = i == functionOrder ? fontSizeAfter : fontSizeBefore; |
| | | |
| | | int firstID = model.GetFirstIDByTabIndex(i); |
| | | FirstChargeData firstChargeData; |
| | | if (!model.TryGetFirstChargeDataByFirstId(firstID, out firstChargeData)) |