【代码整理】一些工具类移入sdk
parent
86b04bf03f
commit
0a8f6708ed
|
|
@ -1,89 +0,0 @@
|
|||
public static class SoundNames
|
||||
{
|
||||
public const string add_diamond = "sfx_add_diamond";
|
||||
public const string bbq_begin = "sfx_bbq_begin";
|
||||
public const string bbq_burnt = "sfx_bbq_burnt";
|
||||
public const string bbq_end = "sfx_bbq_end";
|
||||
public const string bbq_work = "sfx_bbq_work";
|
||||
public const string button_l = "sfx_button_l";
|
||||
public const string button_m = "sfx_button_m";
|
||||
public const string button_s = "sfx_button_s";
|
||||
public const string cardbag_close = "sfx_cardbag_close";
|
||||
public const string cardbag_get = "sfx_cardbag_get";
|
||||
public const string cardbag_open = "sfx_cardbag_open";
|
||||
public const string coin_add = "sfx_coin_add";
|
||||
public const string combo3 = "sfx_combo3";
|
||||
public const string combo4 = "sfx_combo4";
|
||||
public const string combo5 = "sfx_combo5";
|
||||
public const string combo6 = "sfx_combo6";
|
||||
public const string combo7 = "sfx_combo7";
|
||||
public const string combomaster_activated = "sfx_combomaster_activated";
|
||||
public const string combomaster_fail = "sfx_combomaster_fail";
|
||||
public const string combomaster_openbox = "sfx_combomaster_openbox";
|
||||
public const string combomaster_pop = "sfx_combomaster_pop";
|
||||
public const string combomaster_success = "sfx_combomaster_success";
|
||||
public const string cut_begin = "sfx_cut_begin";
|
||||
public const string cut_end = "sfx_cut_end";
|
||||
public const string cut_work = "sfx_cut_work";
|
||||
public const string cut_work2 = "sfx_cut_work2";
|
||||
public const string cut_work3 = "sfx_cut_work3";
|
||||
public const string cut_work_loop = "sfx_cut_work_loop";
|
||||
public const string deepfry_begin = "sfx_deepfry_begin";
|
||||
public const string deepfry_burnt = "sfx_deepfry_burnt";
|
||||
public const string deepfry_end = "sfx_deepfry_end";
|
||||
public const string deepfry_work = "sfx_deepfry_work";
|
||||
public const string drink_begin = "sfx_drink_begin";
|
||||
public const string drink_end = "sfx_drink_end";
|
||||
public const string drink_work = "sfx_drink_work";
|
||||
public const string easter_egg_open = "sfx_easter_egg_open";
|
||||
public const string endless_box_open = "sfx_endless_box_open";
|
||||
public const string endless_wave_tip = "sfx_endless_wave_tip";
|
||||
public const string food_frozen = "sfx_food_frozen";
|
||||
public const string fry_begin = "sfx_fry_begin";
|
||||
public const string fry_burnt = "sfx_fry_burnt";
|
||||
public const string fry_end = "sfx_fry_end";
|
||||
public const string fry_work = "sfx_fry_work";
|
||||
public const string gain_diamond = "sfx_gain_diamond";
|
||||
public const string get_bowl = "sfx_get_bowl";
|
||||
public const string get_coin = "sfx_get_coin";
|
||||
public const string get_dish = "sfx_get_dish";
|
||||
public const string get_glass = "sfx_get_glass";
|
||||
public const string get_like = "sfx_get_like";
|
||||
public const string get_plate = "sfx_get_plate";
|
||||
public const string get_spoon = "sfx_get_spoon";
|
||||
public const string get_sugar = "sfx_get_sugar";
|
||||
public const string get_wood = "sfx_get_wood";
|
||||
public const string ingredient_meat = "sfx_ingredient_meat";
|
||||
public const string ingredient_sauce = "sfx_ingredient_sauce";
|
||||
public const string ingredient_veg = "sfx_ingredient_veg";
|
||||
public const string lose = "sfx_lose";
|
||||
public const string machine_begin = "sfx_machine_begin";
|
||||
public const string machine_end = "sfx_machine_end";
|
||||
public const string machine_work = "sfx_machine_work";
|
||||
public const string newmap_unlock = "sfx_newmap_unlock";
|
||||
public const string open_keybox = "sfx_open_keybox";
|
||||
public const string order_get = "sfx_order_get";
|
||||
public const string order_show = "sfx_order_show";
|
||||
public const string oven_begin = "sfx_oven_begin";
|
||||
public const string oven_end = "sfx_oven_end";
|
||||
public const string oven_work = "sfx_oven_work";
|
||||
public const string panel_in = "sfx_panel_in";
|
||||
public const string panel_out = "sfx_panel_out";
|
||||
public const string piggybank_getreward = "sfx_piggybank_getreward";
|
||||
public const string piggybank_shake = "sfx_piggybank_shake";
|
||||
public const string piggybank_smash = "sfx_piggybank_smash";
|
||||
public const string pot_begin = "sfx_pot_begin";
|
||||
public const string pot_burnt = "sfx_pot_burnt";
|
||||
public const string pot_work = "sfx_pot_work";
|
||||
public const string purchase_success = "sfx_purchase_success";
|
||||
public const string spin_end = "sfx_spin_end";
|
||||
public const string spin_go = "sfx_Spin_Go";
|
||||
public const string spin_idle = "sfx_Spin_Idle";
|
||||
public const string tap_food = "sfx_tap_food";
|
||||
public const string trash = "sfx_trash";
|
||||
public const string upgrade = "sfx_upgrade";
|
||||
public const string upgrade_confirm = "sfx_upgrade_confirm";
|
||||
public const string upgrade_locked = "sfx_upgrade_locked";
|
||||
public const string upgrade_unlock = "sfx_upgrade_unlock";
|
||||
public const string win = "sfx_win";
|
||||
}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 1edf6f32253b442ba959f68754d8f8c5
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -1,10 +1,7 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
using cfg;
|
||||
using cfg.ActorCfg;
|
||||
using PhxhSDK;
|
||||
using Utils;
|
||||
using static Framework.EventManager;
|
||||
|
||||
namespace Framework.Condition
|
||||
|
|
|
|||
|
|
@ -1,94 +0,0 @@
|
|||
using System;
|
||||
using UnityEngine;
|
||||
using Object = UnityEngine.Object;
|
||||
|
||||
namespace Framework
|
||||
{
|
||||
/// <summary>
|
||||
/// gameobject对象工厂,封装了gameobject的创建和销毁
|
||||
/// </summary>
|
||||
public static class GameObjectFactory
|
||||
{
|
||||
private static Transform _defaultRoot;
|
||||
|
||||
|
||||
public static GameObject Create(bool dontDestroyOnLoad)
|
||||
{
|
||||
try
|
||||
{
|
||||
var go = new GameObject();
|
||||
// if(dontDestroyOnLoad)GameObject.DontDestroyOnLoad(go);
|
||||
go.transform.parent = GetDefaultRoot();
|
||||
return go;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
DebugUtil.LogError(e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static void Destroy(Object go)
|
||||
{
|
||||
try
|
||||
{
|
||||
Object.Destroy(go);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
DebugUtil.LogError(e);
|
||||
}
|
||||
}
|
||||
|
||||
public static GameObject Clone(GameObject templateGo,GameObject parObj=null)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (templateGo!=null)
|
||||
{
|
||||
Transform parent = null;
|
||||
if (parObj != null && parObj.transform != null)
|
||||
{
|
||||
parent = parObj.transform;
|
||||
}
|
||||
|
||||
if (parent == null)
|
||||
{
|
||||
parent = templateGo.transform.parent;
|
||||
}
|
||||
|
||||
if (parent == null)
|
||||
{
|
||||
return Object.Instantiate(templateGo);
|
||||
}
|
||||
|
||||
return Object.Instantiate(templateGo, parent, true);
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
DebugUtil.LogError(e);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public static Transform GetDefaultRoot()
|
||||
{
|
||||
try
|
||||
{
|
||||
if (_defaultRoot == null)
|
||||
{
|
||||
GameObject gameObj = new GameObject("GameObjectFactoryRoot");
|
||||
// Object.DontDestroyOnLoad(gameObj);
|
||||
_defaultRoot = gameObj.transform;
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
DebugUtil.LogError(e);
|
||||
}
|
||||
return _defaultRoot;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: f9758ce3398364147a7062443817aec7
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
using UnityEngine;
|
||||
|
||||
public static class AnimatorUtils
|
||||
{
|
||||
static public AnimationClip GetClipInfo(Animator animator, string clipName)
|
||||
{
|
||||
var clips = animator?.runtimeAnimatorController?.animationClips;
|
||||
if (clips != null)
|
||||
{
|
||||
for (int i = 0; i < clips.Length; i++)
|
||||
{
|
||||
if (clips[i].name.Equals(clipName))
|
||||
{
|
||||
return clips[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return default(AnimationClip);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 84697ceaf6763438fb9e2267f40be056
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
using UnityEngine;
|
||||
|
||||
namespace Framework
|
||||
{
|
||||
public static class MaterialPropertyBlockVisitor
|
||||
{
|
||||
static private MaterialPropertyBlock _instance;
|
||||
public static MaterialPropertyBlock Instance
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_instance == null)
|
||||
{
|
||||
_instance = new MaterialPropertyBlock();
|
||||
}
|
||||
_instance.Clear();
|
||||
return _instance;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 8c77f9fb6d14743aab406aeb20b85dd0
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
using UnityEngine;
|
||||
|
||||
namespace Framework
|
||||
{
|
||||
public class ParticleSystemUtils
|
||||
{
|
||||
public static void Play(ParticleSystem ps, bool withChildren)
|
||||
{
|
||||
ps?.Play(withChildren);
|
||||
}
|
||||
|
||||
public static void Play(ParticleSystem[] pss, bool withChildren)
|
||||
{
|
||||
if (pss != null)
|
||||
{
|
||||
for (int i = 0; i < pss.Length; i++)
|
||||
{
|
||||
pss[i].Play(withChildren);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void Stop(ParticleSystem ps, bool withChildren)
|
||||
{
|
||||
ps?.Stop(withChildren);
|
||||
}
|
||||
|
||||
public static void Stop(ParticleSystem[] pss, bool withChildren)
|
||||
{
|
||||
if (pss != null)
|
||||
{
|
||||
for (int i = 0; i < pss.Length; i++)
|
||||
{
|
||||
pss[i].Stop(withChildren);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 5224ec2a94ce04cdf96a56ce9595679f
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 02d1d2393f5ae094ea9e3fb413a07567
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -1,837 +0,0 @@
|
|||
// -----------------------------------------------------------------------
|
||||
// <copyright file=" Framework.PhxhScrollView.cs" company="AillieoTech">
|
||||
// Copyright (c) AillieoTech. All rights reserved.
|
||||
// </copyright>
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
namespace Framework
|
||||
{
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Serialization;
|
||||
using UnityEngine.UI;
|
||||
|
||||
[RequireComponent(typeof(RectTransform))]
|
||||
[DisallowMultipleComponent]
|
||||
public class PhxhScrollView : ScrollRect
|
||||
{
|
||||
[Tooltip("默认item尺寸")]
|
||||
public Vector2 defaultItemSize;
|
||||
|
||||
[Tooltip("item的模板")]
|
||||
public RectTransform itemTemplate;
|
||||
|
||||
// 0001
|
||||
protected const int flagScrollDirection = 1;
|
||||
|
||||
[SerializeField]
|
||||
[FormerlySerializedAs("m_layoutType")]
|
||||
protected ItemLayoutType layoutType = ItemLayoutType.Vertical;
|
||||
|
||||
// 只保存4个临界index
|
||||
protected int[] criticalItemIndex = new int[4];
|
||||
|
||||
// callbacks for items
|
||||
protected Action<int, RectTransform> updateFunc;
|
||||
protected Action<GameObject> bindButton;
|
||||
|
||||
protected Func<int, Vector2> itemSizeFunc;
|
||||
protected Func<int> itemCountFunc;
|
||||
protected Func<int, RectTransform> itemGetFunc;
|
||||
protected Action<RectTransform> itemRecycleFunc;
|
||||
|
||||
private readonly List<ScrollItemWithRect> managedItems = new List<ScrollItemWithRect>();
|
||||
|
||||
private Rect refRect;
|
||||
|
||||
// resource management
|
||||
private PhxhSimpleObjPool<RectTransform> itemPool = null;
|
||||
|
||||
private int dataCount = 0;
|
||||
|
||||
[Tooltip("初始化时池内item数量")]
|
||||
[SerializeField]
|
||||
private int poolSize;
|
||||
|
||||
// status
|
||||
private bool initialized = false;
|
||||
private int willUpdateData = 0;
|
||||
|
||||
private Vector3[] viewWorldConers = new Vector3[4];
|
||||
private Vector3[] rectCorners = new Vector3[2];
|
||||
|
||||
// for hide and show
|
||||
public enum ItemLayoutType
|
||||
{
|
||||
// 最后一位表示滚动方向
|
||||
Vertical = 0b0001, // 0001
|
||||
Horizontal = 0b0010, // 0010
|
||||
VerticalThenHorizontal = 0b0100, // 0100
|
||||
HorizontalThenVertical = 0b0101, // 0101
|
||||
}
|
||||
|
||||
public virtual void SetUpdateFunc(Action<int, RectTransform> func)
|
||||
{
|
||||
this.updateFunc = func;
|
||||
}
|
||||
|
||||
public virtual void SetItemSizeFunc(Func<int, Vector2> func)
|
||||
{
|
||||
this.itemSizeFunc = func;
|
||||
}
|
||||
|
||||
public virtual void SetItemCountFunc(Func<int> func)
|
||||
{
|
||||
this.itemCountFunc = func;
|
||||
}
|
||||
|
||||
public void SetItemGetAndRecycleFunc(Func<int, RectTransform> getFunc, Action<RectTransform> recycleFunc)
|
||||
{
|
||||
if (getFunc != null && recycleFunc != null)
|
||||
{
|
||||
this.itemGetFunc = getFunc;
|
||||
this.itemRecycleFunc = recycleFunc;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.itemGetFunc = null;
|
||||
this.itemRecycleFunc = null;
|
||||
}
|
||||
}
|
||||
|
||||
public void ResetAllDelegates()
|
||||
{
|
||||
this.SetUpdateFunc(null);
|
||||
this.SetItemSizeFunc(null);
|
||||
this.SetItemCountFunc(null);
|
||||
this.SetItemGetAndRecycleFunc(null, null);
|
||||
}
|
||||
|
||||
public void UpdateData(bool immediately = true)
|
||||
{
|
||||
if (immediately)
|
||||
{
|
||||
this.willUpdateData |= 3; // 0011
|
||||
this.InternalUpdateData();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (this.willUpdateData == 0 && this.IsActive())
|
||||
{
|
||||
this.StartCoroutine(this.DelayUpdateData());
|
||||
}
|
||||
|
||||
this.willUpdateData |= 3;
|
||||
}
|
||||
}
|
||||
|
||||
public void UpdateDataIncrementally(bool immediately = true)
|
||||
{
|
||||
if (immediately)
|
||||
{
|
||||
this.willUpdateData |= 1; // 0001
|
||||
this.InternalUpdateData();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (this.willUpdateData == 0)
|
||||
{
|
||||
this.StartCoroutine(this.DelayUpdateData());
|
||||
}
|
||||
|
||||
this.willUpdateData |= 1;
|
||||
}
|
||||
}
|
||||
|
||||
public void ScrollTo(int index)
|
||||
{
|
||||
this.InternalScrollTo(index);
|
||||
}
|
||||
|
||||
protected override void OnEnable()
|
||||
{
|
||||
base.OnEnable();
|
||||
if (this.willUpdateData != 0)
|
||||
{
|
||||
this.StartCoroutine(this.DelayUpdateData());
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnDisable()
|
||||
{
|
||||
this.initialized = false;
|
||||
base.OnDisable();
|
||||
}
|
||||
|
||||
protected virtual void InternalScrollTo(int index)
|
||||
{
|
||||
index = Mathf.Clamp(index, 0, this.dataCount - 1);
|
||||
this.EnsureItemRect(index);
|
||||
Rect r = this.managedItems[index].rect;
|
||||
var dir = (int)this.layoutType & flagScrollDirection;
|
||||
if (dir == 1)
|
||||
{
|
||||
// vertical
|
||||
var value = 1 - (-r.yMax / (this.content.sizeDelta.y - this.refRect.height));
|
||||
this.SetNormalizedPosition(value, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
// horizontal
|
||||
var value = r.xMin / (this.content.sizeDelta.x - this.refRect.width);
|
||||
this.SetNormalizedPosition(value, 0);
|
||||
}
|
||||
}
|
||||
|
||||
protected override void SetContentAnchoredPosition(Vector2 position)
|
||||
{
|
||||
base.SetContentAnchoredPosition(position);
|
||||
this.UpdateCriticalItems();
|
||||
}
|
||||
|
||||
protected override void SetNormalizedPosition(float value, int axis)
|
||||
{
|
||||
base.SetNormalizedPosition(value, axis);
|
||||
this.ResetCriticalItems();
|
||||
}
|
||||
|
||||
protected void EnsureItemRect(int index)
|
||||
{
|
||||
if (!this.managedItems[index].rectDirty)
|
||||
{
|
||||
// 已经是干净的了
|
||||
return;
|
||||
}
|
||||
|
||||
ScrollItemWithRect firstItem = this.managedItems[0];
|
||||
if (firstItem.rectDirty)
|
||||
{
|
||||
Vector2 firstSize = this.GetItemSize(0);
|
||||
firstItem.rect = CreateWithLeftTopAndSize(Vector2.zero, firstSize);
|
||||
firstItem.rectDirty = false;
|
||||
}
|
||||
|
||||
// 当前item之前的最近的已更新的rect
|
||||
var nearestClean = 0;
|
||||
for (var i = index; i >= 0; --i)
|
||||
{
|
||||
if (!this.managedItems[i].rectDirty)
|
||||
{
|
||||
nearestClean = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// 需要更新 从 nearestClean 到 index 的尺寸
|
||||
Rect nearestCleanRect = this.managedItems[nearestClean].rect;
|
||||
Vector2 curPos = GetLeftTop(nearestCleanRect);
|
||||
Vector2 size = nearestCleanRect.size;
|
||||
this.MovePos(ref curPos, size);
|
||||
|
||||
for (var i = nearestClean + 1; i <= index; i++)
|
||||
{
|
||||
size = this.GetItemSize(i);
|
||||
this.managedItems[i].rect = CreateWithLeftTopAndSize(curPos, size);
|
||||
this.managedItems[i].rectDirty = false;
|
||||
this.MovePos(ref curPos, size);
|
||||
}
|
||||
|
||||
var range = new Vector2(Mathf.Abs(curPos.x), Mathf.Abs(curPos.y));
|
||||
switch (this.layoutType)
|
||||
{
|
||||
case ItemLayoutType.VerticalThenHorizontal:
|
||||
range.x += size.x;
|
||||
range.y = this.refRect.height;
|
||||
break;
|
||||
case ItemLayoutType.HorizontalThenVertical:
|
||||
range.x = this.refRect.width;
|
||||
if (curPos.x != 0)
|
||||
{
|
||||
range.y += size.y;
|
||||
}
|
||||
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
this.content.sizeDelta = range;
|
||||
}
|
||||
|
||||
protected override void OnDestroy()
|
||||
{
|
||||
if (this.itemPool != null)
|
||||
{
|
||||
this.itemPool.Purge();
|
||||
}
|
||||
}
|
||||
|
||||
protected Rect GetItemLocalRect(int index)
|
||||
{
|
||||
if (index >= 0 && index < this.dataCount)
|
||||
{
|
||||
this.EnsureItemRect(index);
|
||||
return this.managedItems[index].rect;
|
||||
}
|
||||
|
||||
return (Rect)default;
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
protected override void OnValidate()
|
||||
{
|
||||
var dir = (int)this.layoutType & flagScrollDirection;
|
||||
if (dir == 1)
|
||||
{
|
||||
// vertical
|
||||
if (this.horizontalScrollbar != null)
|
||||
{
|
||||
this.horizontalScrollbar.gameObject.SetActive(false);
|
||||
this.horizontalScrollbar = null;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// horizontal
|
||||
if (this.verticalScrollbar != null)
|
||||
{
|
||||
this.verticalScrollbar.gameObject.SetActive(false);
|
||||
this.verticalScrollbar = null;
|
||||
}
|
||||
}
|
||||
|
||||
base.OnValidate();
|
||||
}
|
||||
#endif
|
||||
|
||||
private static Vector2 GetLeftTop(Rect rect)
|
||||
{
|
||||
Vector2 ret = rect.position;
|
||||
ret.y += rect.size.y;
|
||||
return ret;
|
||||
}
|
||||
|
||||
private static Rect CreateWithLeftTopAndSize(Vector2 leftTop, Vector2 size)
|
||||
{
|
||||
Vector2 leftBottom = leftTop - new Vector2(0, size.y);
|
||||
return new Rect(leftBottom, size);
|
||||
}
|
||||
|
||||
private IEnumerator DelayUpdateData()
|
||||
{
|
||||
yield return new WaitForEndOfFrame();
|
||||
this.InternalUpdateData();
|
||||
}
|
||||
|
||||
private void InternalUpdateData()
|
||||
{
|
||||
if (!this.IsActive())
|
||||
{
|
||||
this.willUpdateData |= 3;
|
||||
return;
|
||||
}
|
||||
|
||||
if (!this.initialized)
|
||||
{
|
||||
this.InitScrollView();
|
||||
}
|
||||
|
||||
var newDataCount = 0;
|
||||
var keepOldItems = (this.willUpdateData & 2) == 0;
|
||||
|
||||
if (this.itemCountFunc != null)
|
||||
{
|
||||
newDataCount = this.itemCountFunc();
|
||||
}
|
||||
|
||||
if (newDataCount != this.managedItems.Count)
|
||||
{
|
||||
if (this.managedItems.Count < newDataCount)
|
||||
{
|
||||
// 增加
|
||||
if (!keepOldItems)
|
||||
{
|
||||
foreach (var itemWithRect in this.managedItems)
|
||||
{
|
||||
// 重置所有rect
|
||||
itemWithRect.rectDirty = true;
|
||||
}
|
||||
}
|
||||
|
||||
while (this.managedItems.Count < newDataCount)
|
||||
{
|
||||
this.managedItems.Add(new ScrollItemWithRect());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// 减少 保留空位 避免GC
|
||||
for (int i = 0, count = this.managedItems.Count; i < count; ++i)
|
||||
{
|
||||
if (i < newDataCount)
|
||||
{
|
||||
// 重置所有rect
|
||||
if (!keepOldItems)
|
||||
{
|
||||
this.managedItems[i].rectDirty = true;
|
||||
}
|
||||
|
||||
if (i == newDataCount - 1)
|
||||
{
|
||||
this.managedItems[i].rectDirty = true;
|
||||
}
|
||||
}
|
||||
|
||||
// 超出部分 清理回收item
|
||||
if (i >= newDataCount)
|
||||
{
|
||||
this.managedItems[i].rectDirty = true;
|
||||
if (this.managedItems[i].item != null)
|
||||
{
|
||||
this.RecycleOldItem(this.managedItems[i].item);
|
||||
this.managedItems[i].item = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!keepOldItems)
|
||||
{
|
||||
for (int i = 0, count = this.managedItems.Count; i < count; ++i)
|
||||
{
|
||||
// 重置所有rect
|
||||
this.managedItems[i].rectDirty = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.dataCount = newDataCount;
|
||||
|
||||
this.ResetCriticalItems();
|
||||
|
||||
this.willUpdateData = 0;
|
||||
}
|
||||
|
||||
private void ResetCriticalItems()
|
||||
{
|
||||
bool hasItem, shouldShow;
|
||||
int firstIndex = -1, lastIndex = -1;
|
||||
|
||||
for (var i = 0; i < this.dataCount; i++)
|
||||
{
|
||||
hasItem = this.managedItems[i].item != null;
|
||||
shouldShow = this.ShouldItemSeenAtIndex(i);
|
||||
|
||||
if (shouldShow)
|
||||
{
|
||||
if (firstIndex == -1)
|
||||
{
|
||||
firstIndex = i;
|
||||
}
|
||||
|
||||
lastIndex = i;
|
||||
}
|
||||
|
||||
if (hasItem && shouldShow)
|
||||
{
|
||||
// 应显示且已显示
|
||||
this.SetDataForItemAtIndex(this.managedItems[i].item, i);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (hasItem == shouldShow)
|
||||
{
|
||||
// 不应显示且未显示
|
||||
// if (firstIndex != -1)
|
||||
// {
|
||||
// // 已经遍历完所有要显示的了 后边的先跳过
|
||||
// break;
|
||||
// }
|
||||
continue;
|
||||
}
|
||||
|
||||
if (hasItem && !shouldShow)
|
||||
{
|
||||
// 不该显示 但是有
|
||||
this.RecycleOldItem(this.managedItems[i].item);
|
||||
this.managedItems[i].item = null;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (shouldShow && !hasItem)
|
||||
{
|
||||
// 需要显示 但是没有
|
||||
RectTransform item = this.GetNewItem(i);
|
||||
this.OnGetItemForDataIndex(item, i);
|
||||
this.managedItems[i].item = item;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
// content.localPosition = Vector2.zero;
|
||||
this.criticalItemIndex[CriticalItemType.UpToHide] = firstIndex;
|
||||
this.criticalItemIndex[CriticalItemType.DownToHide] = lastIndex;
|
||||
this.criticalItemIndex[CriticalItemType.UpToShow] = Mathf.Max(firstIndex - 1, 0);
|
||||
this.criticalItemIndex[CriticalItemType.DownToShow] = Mathf.Min(lastIndex + 1, this.dataCount - 1);
|
||||
}
|
||||
|
||||
private RectTransform GetCriticalItem(int type)
|
||||
{
|
||||
var index = this.criticalItemIndex[type];
|
||||
if (index >= 0 && index < this.dataCount)
|
||||
{
|
||||
return this.managedItems[index].item;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private void UpdateCriticalItems()
|
||||
{
|
||||
var dirty = true;
|
||||
|
||||
while (dirty)
|
||||
{
|
||||
dirty = false;
|
||||
|
||||
for (int i = CriticalItemType.UpToHide; i <= CriticalItemType.DownToShow; i++)
|
||||
{
|
||||
if (i <= CriticalItemType.DownToHide)
|
||||
{
|
||||
// 隐藏离开可见区域的item
|
||||
dirty = dirty || this.CheckAndHideItem(i);
|
||||
}
|
||||
else
|
||||
{
|
||||
// 显示进入可见区域的item
|
||||
dirty = dirty || this.CheckAndShowItem(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private bool CheckAndHideItem(int criticalItemType)
|
||||
{
|
||||
RectTransform item = this.GetCriticalItem(criticalItemType);
|
||||
var criticalIndex = this.criticalItemIndex[criticalItemType];
|
||||
if (item != null && !this.ShouldItemSeenAtIndex(criticalIndex))
|
||||
{
|
||||
this.RecycleOldItem(item);
|
||||
this.managedItems[criticalIndex].item = null;
|
||||
|
||||
if (criticalItemType == CriticalItemType.UpToHide)
|
||||
{
|
||||
// 最上隐藏了一个
|
||||
this.criticalItemIndex[criticalItemType + 2] = Mathf.Max(criticalIndex, this.criticalItemIndex[criticalItemType + 2]);
|
||||
this.criticalItemIndex[criticalItemType]++;
|
||||
}
|
||||
else
|
||||
{
|
||||
// 最下隐藏了一个
|
||||
this.criticalItemIndex[criticalItemType + 2] = Mathf.Min(criticalIndex, this.criticalItemIndex[criticalItemType + 2]);
|
||||
this.criticalItemIndex[criticalItemType]--;
|
||||
}
|
||||
|
||||
this.criticalItemIndex[criticalItemType] = Mathf.Clamp(this.criticalItemIndex[criticalItemType], 0, this.dataCount - 1);
|
||||
|
||||
if (this.criticalItemIndex[CriticalItemType.UpToHide] > this.criticalItemIndex[CriticalItemType.DownToHide])
|
||||
{
|
||||
// 偶然的情况 拖拽超出一屏
|
||||
this.ResetCriticalItems();
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private bool CheckAndShowItem(int criticalItemType)
|
||||
{
|
||||
RectTransform item = this.GetCriticalItem(criticalItemType);
|
||||
var criticalIndex = this.criticalItemIndex[criticalItemType];
|
||||
|
||||
if (item == null && this.ShouldItemSeenAtIndex(criticalIndex))
|
||||
{
|
||||
RectTransform newItem = this.GetNewItem(criticalIndex);
|
||||
this.OnGetItemForDataIndex(newItem, criticalIndex);
|
||||
this.managedItems[criticalIndex].item = newItem;
|
||||
|
||||
if (criticalItemType == CriticalItemType.UpToShow)
|
||||
{
|
||||
// 最上显示了一个
|
||||
this.criticalItemIndex[criticalItemType - 2] = Mathf.Min(criticalIndex, this.criticalItemIndex[criticalItemType - 2]);
|
||||
this.criticalItemIndex[criticalItemType]--;
|
||||
}
|
||||
else
|
||||
{
|
||||
// 最下显示了一个
|
||||
this.criticalItemIndex[criticalItemType - 2] = Mathf.Max(criticalIndex, this.criticalItemIndex[criticalItemType - 2]);
|
||||
this.criticalItemIndex[criticalItemType]++;
|
||||
}
|
||||
|
||||
this.criticalItemIndex[criticalItemType] = Mathf.Clamp(this.criticalItemIndex[criticalItemType], 0, this.dataCount - 1);
|
||||
|
||||
if (this.criticalItemIndex[CriticalItemType.UpToShow] >= this.criticalItemIndex[CriticalItemType.DownToShow])
|
||||
{
|
||||
// 偶然的情况 拖拽超出一屏
|
||||
this.ResetCriticalItems();
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private bool ShouldItemSeenAtIndex(int index)
|
||||
{
|
||||
if (index < 0 || index >= this.dataCount)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
this.EnsureItemRect(index);
|
||||
return new Rect(this.refRect.position - this.content.anchoredPosition, this.refRect.size).Overlaps(this.managedItems[index].rect);
|
||||
}
|
||||
|
||||
private bool ShouldItemFullySeenAtIndex(int index)
|
||||
{
|
||||
if (index < 0 || index >= this.dataCount)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
this.EnsureItemRect(index);
|
||||
return this.IsRectContains(new Rect(this.refRect.position - this.content.anchoredPosition, this.refRect.size), this.managedItems[index].rect);
|
||||
}
|
||||
|
||||
private bool IsRectContains(Rect outRect, Rect inRect, bool bothDimensions = false)
|
||||
{
|
||||
if (bothDimensions)
|
||||
{
|
||||
var xContains = (outRect.xMax >= inRect.xMax) && (outRect.xMin <= inRect.xMin);
|
||||
var yContains = (outRect.yMax >= inRect.yMax) && (outRect.yMin <= inRect.yMin);
|
||||
return xContains && yContains;
|
||||
}
|
||||
else
|
||||
{
|
||||
var dir = (int)this.layoutType & flagScrollDirection;
|
||||
if (dir == 1)
|
||||
{
|
||||
// 垂直滚动 只计算y向
|
||||
return (outRect.yMax >= inRect.yMax) && (outRect.yMin <= inRect.yMin);
|
||||
}
|
||||
else
|
||||
{
|
||||
// = 0
|
||||
// 水平滚动 只计算x向
|
||||
return (outRect.xMax >= inRect.xMax) && (outRect.xMin <= inRect.xMin);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void InitPool()
|
||||
{
|
||||
var poolNode = new GameObject("POOL");
|
||||
poolNode.SetActive(false);
|
||||
poolNode.transform.SetParent(this.transform, false);
|
||||
this.itemPool = new PhxhSimpleObjPool<RectTransform>(
|
||||
this.poolSize,
|
||||
(RectTransform item) =>
|
||||
{
|
||||
item.transform.SetParent(poolNode.transform, false);
|
||||
},
|
||||
() =>
|
||||
{
|
||||
GameObject itemObj = Instantiate(this.itemTemplate.gameObject);
|
||||
RectTransform item = itemObj.GetComponent<RectTransform>();
|
||||
itemObj.transform.SetParent(poolNode.transform, false);
|
||||
if (this.bindButton != null)
|
||||
{
|
||||
this.bindButton(itemObj);
|
||||
}
|
||||
item.anchorMin = Vector2.up;
|
||||
item.anchorMax = Vector2.up;
|
||||
item.pivot = Vector2.zero;
|
||||
|
||||
itemObj.SetActive(true);
|
||||
return item;
|
||||
});
|
||||
}
|
||||
|
||||
private void OnGetItemForDataIndex(RectTransform item, int index)
|
||||
{
|
||||
this.SetDataForItemAtIndex(item, index);
|
||||
item.transform.SetParent(this.content, false);
|
||||
}
|
||||
|
||||
private void SetDataForItemAtIndex(RectTransform item, int index)
|
||||
{
|
||||
if (this.updateFunc != null)
|
||||
{
|
||||
this.updateFunc(index, item);
|
||||
}
|
||||
|
||||
this.SetPosForItemAtIndex(item, index);
|
||||
}
|
||||
|
||||
private void SetPosForItemAtIndex(RectTransform item, int index)
|
||||
{
|
||||
this.EnsureItemRect(index);
|
||||
Rect r = this.managedItems[index].rect;
|
||||
item.localPosition = r.position;
|
||||
item.sizeDelta = r.size;
|
||||
}
|
||||
|
||||
private Vector2 GetItemSize(int index)
|
||||
{
|
||||
if (index >= 0 && index <= this.dataCount)
|
||||
{
|
||||
if (this.itemSizeFunc != null)
|
||||
{
|
||||
return this.itemSizeFunc(index);
|
||||
}
|
||||
}
|
||||
|
||||
return this.defaultItemSize;
|
||||
}
|
||||
|
||||
private RectTransform GetNewItem(int index)
|
||||
{
|
||||
RectTransform item;
|
||||
if (this.itemGetFunc != null)
|
||||
{
|
||||
item = this.itemGetFunc(index);
|
||||
}
|
||||
else
|
||||
{
|
||||
item = this.itemPool.Get();
|
||||
}
|
||||
|
||||
return item;
|
||||
}
|
||||
|
||||
private void RecycleOldItem(RectTransform item)
|
||||
{
|
||||
if (this.itemRecycleFunc != null)
|
||||
{
|
||||
this.itemRecycleFunc(item);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.itemPool.Recycle(item);
|
||||
}
|
||||
}
|
||||
|
||||
private void InitScrollView()
|
||||
{
|
||||
this.initialized = true;
|
||||
|
||||
// 根据设置来控制原ScrollRect的滚动方向
|
||||
var dir = (int)this.layoutType & flagScrollDirection;
|
||||
this.vertical = dir == 1;
|
||||
this.horizontal = dir == 0;
|
||||
|
||||
this.content.pivot = Vector2.up;
|
||||
this.content.anchorMin = Vector2.up;
|
||||
this.content.anchorMax = Vector2.up;
|
||||
this.content.anchoredPosition = Vector2.zero;
|
||||
|
||||
this.InitPool();
|
||||
this.UpdateRefRect();
|
||||
}
|
||||
|
||||
// refRect是在Content节点下的 viewport的 rect
|
||||
private void UpdateRefRect()
|
||||
{
|
||||
/*
|
||||
* WorldCorners
|
||||
*
|
||||
* 1 ------- 2
|
||||
* | |
|
||||
* | |
|
||||
* 0 ------- 3
|
||||
*
|
||||
*/
|
||||
|
||||
if (!CanvasUpdateRegistry.IsRebuildingLayout())
|
||||
{
|
||||
Canvas.ForceUpdateCanvases();
|
||||
}
|
||||
|
||||
this.viewRect.GetWorldCorners(this.viewWorldConers);
|
||||
this.rectCorners[0] = this.content.transform.InverseTransformPoint(this.viewWorldConers[0]);
|
||||
this.rectCorners[1] = this.content.transform.InverseTransformPoint(this.viewWorldConers[2]);
|
||||
this.refRect = new Rect((Vector2)this.rectCorners[0] - this.content.anchoredPosition, this.rectCorners[1] - this.rectCorners[0]);
|
||||
}
|
||||
|
||||
private void MovePos(ref Vector2 pos, Vector2 size)
|
||||
{
|
||||
// 注意 所有的rect都是左下角为基准
|
||||
switch (this.layoutType)
|
||||
{
|
||||
case ItemLayoutType.Vertical:
|
||||
// 垂直方向 向下移动
|
||||
pos.y -= size.y;
|
||||
break;
|
||||
case ItemLayoutType.Horizontal:
|
||||
// 水平方向 向右移动
|
||||
pos.x += size.x;
|
||||
break;
|
||||
case ItemLayoutType.VerticalThenHorizontal:
|
||||
pos.y -= size.y;
|
||||
if (pos.y - size.y < -this.refRect.height)
|
||||
{
|
||||
pos.y = 0;
|
||||
pos.x += size.x;
|
||||
}
|
||||
|
||||
break;
|
||||
case ItemLayoutType.HorizontalThenVertical:
|
||||
|
||||
pos.x += size.x;
|
||||
if (pos.x + size.x > this.refRect.width)
|
||||
{
|
||||
pos.x = 0;
|
||||
pos.y -= size.y;
|
||||
}
|
||||
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
public void SetButton(Action<GameObject> action)
|
||||
{
|
||||
this.bindButton = action;
|
||||
}
|
||||
|
||||
// const int 代替 enum 减少 (int)和(CriticalItemType)转换
|
||||
protected static class CriticalItemType
|
||||
{
|
||||
public static byte UpToHide = 0;
|
||||
public static byte DownToHide = 1;
|
||||
public static byte UpToShow = 2;
|
||||
public static byte DownToShow = 3;
|
||||
}
|
||||
|
||||
private class ScrollItemWithRect
|
||||
{
|
||||
// scroll item 身上的 RectTransform组件
|
||||
public RectTransform item;
|
||||
|
||||
// scroll item 在scrollview中的位置
|
||||
public Rect rect;
|
||||
|
||||
// rect 是否需要更新
|
||||
public bool rectDirty = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 9f9de67925f950347af7cb5c19023db8
|
||||
timeCreated: 1533042733
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -1,245 +0,0 @@
|
|||
// -----------------------------------------------------------------------
|
||||
// <copyright file="ScrollViewEx.cs" company="AillieoTech">
|
||||
// Copyright (c) AillieoTech. All rights reserved.
|
||||
// </copyright>
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
namespace Framework
|
||||
{
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
using UnityEngine.Serialization;
|
||||
|
||||
[RequireComponent(typeof(RectTransform))]
|
||||
[DisallowMultipleComponent]
|
||||
public class PhxhScrollViewEx : PhxhScrollView
|
||||
{
|
||||
[SerializeField]
|
||||
[FormerlySerializedAs("m_pageSize")]
|
||||
private int pageSize = 50;
|
||||
|
||||
private int startOffset = 0;
|
||||
|
||||
private Func<int> realItemCountFunc;
|
||||
|
||||
private Vector2 lastPosition;
|
||||
|
||||
private bool reloadFlag = false;
|
||||
|
||||
public override void SetUpdateFunc(Action<int, RectTransform> func)
|
||||
{
|
||||
if (func != null)
|
||||
{
|
||||
var f = func;
|
||||
func = (index, rect) =>
|
||||
{
|
||||
f(index + this.startOffset, rect);
|
||||
};
|
||||
}
|
||||
|
||||
base.SetUpdateFunc(func);
|
||||
}
|
||||
|
||||
public override void SetItemSizeFunc(Func<int, Vector2> func)
|
||||
{
|
||||
if (func != null)
|
||||
{
|
||||
var f = func;
|
||||
func = (index) =>
|
||||
{
|
||||
return f(index + this.startOffset);
|
||||
};
|
||||
}
|
||||
|
||||
base.SetItemSizeFunc(func);
|
||||
}
|
||||
|
||||
public override void SetItemCountFunc(Func<int> func)
|
||||
{
|
||||
this.realItemCountFunc = func;
|
||||
if (func != null)
|
||||
{
|
||||
var f = func;
|
||||
func = () => Mathf.Min(f(), this.pageSize);
|
||||
}
|
||||
|
||||
base.SetItemCountFunc(func);
|
||||
}
|
||||
|
||||
public override void OnDrag(PointerEventData eventData)
|
||||
{
|
||||
if (this.reloadFlag)
|
||||
{
|
||||
this.reloadFlag = false;
|
||||
this.OnEndDrag(eventData);
|
||||
this.OnBeginDrag(eventData);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
base.OnDrag(eventData);
|
||||
}
|
||||
|
||||
protected override void Awake()
|
||||
{
|
||||
base.Awake();
|
||||
|
||||
this.lastPosition = Vector2.up;
|
||||
this.onValueChanged.AddListener(this.OnValueChanged);
|
||||
}
|
||||
|
||||
protected override void InternalScrollTo(int index)
|
||||
{
|
||||
var count = 0;
|
||||
if (this.realItemCountFunc != null)
|
||||
{
|
||||
count = this.realItemCountFunc();
|
||||
}
|
||||
|
||||
index = Mathf.Clamp(index, 0, count - 1);
|
||||
this.startOffset = Mathf.Clamp(index - (this.pageSize / 2), 0, count - this.itemCountFunc());
|
||||
this.UpdateData(true);
|
||||
base.InternalScrollTo(index - this.startOffset);
|
||||
}
|
||||
|
||||
private void OnValueChanged(Vector2 position)
|
||||
{
|
||||
int toShow;
|
||||
int critical;
|
||||
bool downward;
|
||||
int pin;
|
||||
|
||||
Vector2 delta = position - this.lastPosition;
|
||||
this.lastPosition = position;
|
||||
|
||||
this.reloadFlag = false;
|
||||
|
||||
if (((int)this.layoutType & flagScrollDirection) == 1)
|
||||
{
|
||||
// 垂直滚动 只计算y向
|
||||
if (delta.y < 0)
|
||||
{
|
||||
// 向上
|
||||
toShow = this.criticalItemIndex[CriticalItemType.DownToShow];
|
||||
critical = this.pageSize - 1;
|
||||
if (toShow < critical)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
pin = critical - 1;
|
||||
downward = false;
|
||||
}
|
||||
else if (delta.y > 0)
|
||||
{
|
||||
// 向下
|
||||
toShow = this.criticalItemIndex[CriticalItemType.UpToShow];
|
||||
critical = 0;
|
||||
if (toShow > critical)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
pin = critical + 1;
|
||||
downward = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// = 0
|
||||
// 水平滚动 只计算x向
|
||||
if (delta.x > 0)
|
||||
{
|
||||
// 向右
|
||||
toShow = this.criticalItemIndex[CriticalItemType.UpToShow];
|
||||
critical = 0;
|
||||
if (toShow > critical)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
pin = critical + 1;
|
||||
downward = true;
|
||||
}
|
||||
else if (delta.x < 0)
|
||||
{
|
||||
// 向左
|
||||
toShow = this.criticalItemIndex[CriticalItemType.DownToShow];
|
||||
critical = this.pageSize - 1;
|
||||
if (toShow < critical)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
pin = critical - 1;
|
||||
downward = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// 该翻页了 翻半页吧
|
||||
var old = this.startOffset;
|
||||
if (downward)
|
||||
{
|
||||
this.startOffset -= this.pageSize / 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.startOffset += this.pageSize / 2;
|
||||
}
|
||||
|
||||
var realDataCount = 0;
|
||||
if (this.realItemCountFunc != null)
|
||||
{
|
||||
realDataCount = this.realItemCountFunc();
|
||||
}
|
||||
|
||||
this.startOffset = Mathf.Clamp(this.startOffset, 0, Mathf.Max(realDataCount - this.pageSize, 0));
|
||||
|
||||
if (old != this.startOffset)
|
||||
{
|
||||
this.reloadFlag = true;
|
||||
|
||||
// 记录 原先的速度
|
||||
Vector2 oldVelocity = this.velocity;
|
||||
|
||||
// 计算 pin元素的世界坐标
|
||||
Rect rect = this.GetItemLocalRect(pin);
|
||||
|
||||
Vector2 oldWorld = this.content.TransformPoint(rect.position);
|
||||
var dataCount = 0;
|
||||
if (this.itemCountFunc != null)
|
||||
{
|
||||
dataCount = this.itemCountFunc();
|
||||
}
|
||||
|
||||
if (dataCount > 0)
|
||||
{
|
||||
this.EnsureItemRect(0);
|
||||
if (dataCount > 1)
|
||||
{
|
||||
this.EnsureItemRect(dataCount - 1);
|
||||
}
|
||||
}
|
||||
|
||||
// 根据 pin元素的世界坐标 计算出content的position
|
||||
var pin2 = pin + old - this.startOffset;
|
||||
Rect rect2 = this.GetItemLocalRect(pin2);
|
||||
Vector2 newWorld = this.content.TransformPoint(rect2.position);
|
||||
Vector2 deltaWorld = newWorld - oldWorld;
|
||||
Vector2 deltaLocal = this.content.InverseTransformVector(deltaWorld);
|
||||
this.SetContentAnchoredPosition(this.content.anchoredPosition - deltaLocal);
|
||||
this.UpdateData(true);
|
||||
this.velocity = oldVelocity;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 990bec45166081c4087bc378d32950f1
|
||||
timeCreated: 1533042733
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -1,76 +0,0 @@
|
|||
// -----------------------------------------------------------------------
|
||||
// <copyright file="SimpleObjPool.cs" company="AillieoTech">
|
||||
// Copyright (c) AillieoTech. All rights reserved.
|
||||
// </copyright>
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
namespace Framework
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public class PhxhSimpleObjPool<T>
|
||||
{
|
||||
private readonly Stack<T> stack;
|
||||
private readonly Func<T> ctor;
|
||||
private readonly Action<T> onRecycle;
|
||||
private int size;
|
||||
private int usedCount;
|
||||
|
||||
public PhxhSimpleObjPool(int max = 5, Action<T> onRecycle = null, Func<T> ctor = null)
|
||||
{
|
||||
this.stack = new Stack<T>(max);
|
||||
this.size = max;
|
||||
this.onRecycle = onRecycle;
|
||||
this.ctor = ctor;
|
||||
}
|
||||
|
||||
public T Get()
|
||||
{
|
||||
T item;
|
||||
if (this.stack.Count == 0)
|
||||
{
|
||||
if (this.ctor != null)
|
||||
{
|
||||
item = this.ctor();
|
||||
}
|
||||
else
|
||||
{
|
||||
item = Activator.CreateInstance<T>();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
item = this.stack.Pop();
|
||||
}
|
||||
|
||||
this.usedCount++;
|
||||
return item;
|
||||
}
|
||||
|
||||
public void Recycle(T item)
|
||||
{
|
||||
if (this.onRecycle != null)
|
||||
{
|
||||
this.onRecycle.Invoke(item);
|
||||
}
|
||||
|
||||
if (this.stack.Count < this.size)
|
||||
{
|
||||
this.stack.Push(item);
|
||||
}
|
||||
|
||||
this.usedCount--;
|
||||
}
|
||||
|
||||
public void Purge()
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return $"SimpleObjPool: item=[{typeof(T)}], inUse=[{this.usedCount}], restInPool=[{this.stack.Count}/{this.size}] ";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 05ad16b4d0f8b4c37a1cadc920b0b045
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -1,9 +1,7 @@
|
|||
using System;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using UnityEditor;
|
||||
using UnityEngine.EventSystems;
|
||||
using UnityEngine.InputSystem;
|
||||
|
||||
[RequireComponent(typeof(Button))]
|
||||
public class UIButtonEx: Button
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1,11 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 45075e6d297604846a12a334871735f9
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
using System.Collections.Generic;
|
||||
using Framework;
|
||||
using PhxhSDK;
|
||||
using UnityEngine;
|
||||
|
||||
public class UIReuseable : MonoBehaviour
|
||||
|
|
@ -27,7 +27,7 @@ public class UIReuseable : MonoBehaviour
|
|||
GameObject cell = null;
|
||||
if (_cellPoolList.Count == 0)
|
||||
{
|
||||
cell = GameObjectFactory.Clone(template, parent);
|
||||
cell = Utils.Clone(template, parent);
|
||||
cell.SetActive(true);
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -1,394 +0,0 @@
|
|||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Framework.Wrapper
|
||||
{
|
||||
/// <summary>
|
||||
/// gameobject 和 transform 操作的封装类
|
||||
/// </summary>
|
||||
public class GameObjectWrapper
|
||||
{
|
||||
protected GameObject _gameObject;
|
||||
|
||||
public GameObjectWrapper(GameObject go)
|
||||
{
|
||||
if (go == null)
|
||||
{
|
||||
DebugUtil.LogError("GameObjectWrapper: gameObject is null");
|
||||
}
|
||||
_gameObject = go;
|
||||
}
|
||||
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return _gameObject != null ? _gameObject.name : null;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (_gameObject != null) _gameObject.name = value;
|
||||
}
|
||||
}
|
||||
|
||||
private Transform Transform => _gameObject != null ? _gameObject.transform : null;
|
||||
|
||||
public int GetInstanceID()
|
||||
{
|
||||
return _gameObject != null ? _gameObject.GetInstanceID() : 0;
|
||||
}
|
||||
|
||||
public string GetNameMark()
|
||||
{
|
||||
return _gameObject != null ? (_gameObject.name + _gameObject.transform.parent.name) : string.Empty;
|
||||
}
|
||||
|
||||
public bool GetActive()
|
||||
{
|
||||
return _gameObject != null && _gameObject.activeSelf;
|
||||
}
|
||||
|
||||
public void SetActive(bool active)
|
||||
{
|
||||
if (_gameObject != null) _gameObject.SetActive(active);
|
||||
}
|
||||
|
||||
public bool IsActive()
|
||||
{
|
||||
return _gameObject != null && _gameObject.activeSelf;
|
||||
}
|
||||
|
||||
public Vector3 GetPosition(Space relativeTo = Space.World)
|
||||
{
|
||||
return Transform != null
|
||||
? relativeTo == Space.World ? Transform.position : Transform.localPosition
|
||||
: Vector3.zero;
|
||||
}
|
||||
|
||||
public void SetPosition(Vector3 position, Space relativeTo = Space.World)
|
||||
{
|
||||
if (Transform == null) return;
|
||||
if (relativeTo == Space.World)
|
||||
{
|
||||
Transform.position = position;
|
||||
}
|
||||
else
|
||||
{
|
||||
Transform.localPosition = position;
|
||||
}
|
||||
}
|
||||
|
||||
public Quaternion GetRotation(Space relativeTo = Space.World)
|
||||
{
|
||||
if (Transform == null)
|
||||
{
|
||||
return Quaternion.identity;
|
||||
}
|
||||
return relativeTo == Space.World ? Transform.rotation : Transform.localRotation;
|
||||
}
|
||||
|
||||
public void SetRotationH(Vector3 dir)
|
||||
{
|
||||
Quaternion rotation;
|
||||
if (TransformUtil.ToRotationH(dir, out rotation))
|
||||
{
|
||||
SetRotation(rotation);
|
||||
}
|
||||
}
|
||||
|
||||
public void SetRotation(Vector3 dir, Vector3 up)
|
||||
{
|
||||
Quaternion rotation;
|
||||
if (TransformUtil.ToRotation(dir, up, out rotation))
|
||||
{
|
||||
SetRotation(rotation);
|
||||
}
|
||||
}
|
||||
|
||||
public void SetRotation(Quaternion rotation, Space relativeTo = Space.World)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (Transform == null) return;
|
||||
if (relativeTo == Space.World)
|
||||
{
|
||||
Transform.rotation = rotation;
|
||||
}
|
||||
else
|
||||
{
|
||||
Transform.localRotation = rotation;
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
DebugUtil.LogError(e);
|
||||
}
|
||||
}
|
||||
|
||||
public Vector3 GetEulerAngles(Space relativeTo = Space.World)
|
||||
{
|
||||
return GetRotation(relativeTo).eulerAngles;
|
||||
}
|
||||
|
||||
public void SetEulerAngles(Vector3 eulerAngles, Space relativeTo = Space.World)
|
||||
{
|
||||
Quaternion rotation = Quaternion.Euler(eulerAngles);
|
||||
SetRotation(rotation, relativeTo);
|
||||
}
|
||||
|
||||
public Vector3 GetRight()
|
||||
{
|
||||
return Transform != null ? Transform.right : Vector3.zero;
|
||||
}
|
||||
|
||||
public Vector3 GetForward()
|
||||
{
|
||||
return Transform != null ? Transform.forward : Vector3.zero;
|
||||
}
|
||||
|
||||
public Vector3 GetUp()
|
||||
{
|
||||
return Transform != null ? Transform.up : Vector3.zero;
|
||||
}
|
||||
|
||||
public float GetAngleH()
|
||||
{
|
||||
return TransformUtil.GetAngleH(GetRotation());
|
||||
}
|
||||
|
||||
public void SetAngleH(float angle)
|
||||
{
|
||||
SetRotation(Quaternion.AngleAxis(angle, Vector3.up));
|
||||
}
|
||||
|
||||
public Vector3 GetScale(Space relativeTo = Space.Self)
|
||||
{
|
||||
if (Transform == null)
|
||||
{
|
||||
return Vector3.one;
|
||||
}
|
||||
return relativeTo == Space.World ? Transform.lossyScale : Transform.localScale;
|
||||
}
|
||||
|
||||
public void SetScale(float scale)
|
||||
{
|
||||
if (scale > 0.0f)
|
||||
{
|
||||
SetScale(Vector3.one * scale);
|
||||
}
|
||||
}
|
||||
|
||||
public void SetScale(Vector3 scale, Space relativeTo = Space.Self)
|
||||
{
|
||||
try
|
||||
{
|
||||
var transform = Transform;
|
||||
if (transform == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (scale.x > 0.0f && scale.y > 0.0f && scale.z > 0.0f)
|
||||
{
|
||||
if (relativeTo == Space.World)
|
||||
{
|
||||
if (Transform.parent == null)
|
||||
{
|
||||
Transform.localScale = scale;
|
||||
}
|
||||
else
|
||||
{
|
||||
Vector3 parentScale = Transform.parent.lossyScale;
|
||||
if (parentScale.x > 0.0f &&
|
||||
parentScale.y > 0.0f &&
|
||||
parentScale.z > 0.0f)
|
||||
{
|
||||
Transform.localScale = new Vector3(scale.x / parentScale.x,
|
||||
scale.y / parentScale.y,
|
||||
scale.z / parentScale.z);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Transform.localScale = scale;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
DebugUtil.LogError(e);
|
||||
}
|
||||
}
|
||||
|
||||
public Matrix4x4 GetLocalToWorldMatrix()
|
||||
{
|
||||
return Transform != null ? Transform.localToWorldMatrix : Matrix4x4.identity;
|
||||
}
|
||||
|
||||
public Matrix4x4 GetWorldToLocalMatrix()
|
||||
{
|
||||
return Transform != null ? Transform.worldToLocalMatrix : Matrix4x4.identity;
|
||||
}
|
||||
|
||||
public Transform GetParent()
|
||||
{
|
||||
return Transform != null ? Transform.parent : null;
|
||||
}
|
||||
|
||||
|
||||
public void SetParent(GameObjectWrapper parent, bool worldPositionStays = true)
|
||||
{
|
||||
SetParent(parent?.Transform, worldPositionStays);
|
||||
}
|
||||
|
||||
public void SetParent(Transform parent, bool worldPositionStays = true)
|
||||
{
|
||||
var transform = Transform;
|
||||
if (transform == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
Transform.SetParent(parent, worldPositionStays);
|
||||
if (!worldPositionStays)
|
||||
{
|
||||
Transform.localPosition = Vector3.zero;
|
||||
Transform.localRotation = Quaternion.identity;
|
||||
}
|
||||
}
|
||||
|
||||
public int GetChildCount()
|
||||
{
|
||||
return Transform != null ? Transform.childCount : 0;
|
||||
}
|
||||
|
||||
public void AttachChild(Transform child)
|
||||
{
|
||||
AttachChild(child, Vector3.zero, rotation: Quaternion.identity);
|
||||
}
|
||||
|
||||
public void AttachChild(Transform child, Vector3 position)
|
||||
{
|
||||
AttachChild(child, position, rotation: Quaternion.identity);
|
||||
}
|
||||
|
||||
public void AttachChild(Transform child, Vector3 position, Quaternion rotation) => AttachChild(child, position, rotation, Vector3.one);
|
||||
|
||||
public void AttachChild(Transform child, Vector3 position, Quaternion rotation, Vector3 scale)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (child != null && Transform != null)
|
||||
{
|
||||
child.SetParent(Transform, false);
|
||||
child.localPosition = position;
|
||||
child.localRotation = rotation;
|
||||
child.localScale = scale;
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
DebugUtil.LogError(e);
|
||||
}
|
||||
}
|
||||
|
||||
public void DetachChild(Transform child)
|
||||
{
|
||||
if (child != null)
|
||||
{
|
||||
child.SetParent(null);
|
||||
}
|
||||
}
|
||||
|
||||
public void AttachChild(GameObjectWrapper child)
|
||||
{
|
||||
AttachChild(child, position: Vector3.zero, rotation: Quaternion.identity, scale: Vector3.one);
|
||||
}
|
||||
|
||||
public void AttachChild(GameObjectWrapper child, Vector3 position)
|
||||
{
|
||||
AttachChild(child, position, Quaternion.identity, Vector3.one);
|
||||
}
|
||||
|
||||
public void AttachChild(GameObjectWrapper child, Vector3 position, Quaternion rotation)
|
||||
{
|
||||
AttachChild(child, position, rotation, Vector3.one);
|
||||
}
|
||||
|
||||
public void AttachChild(GameObjectWrapper child, Vector3 position, Quaternion rotation, Vector3 scale)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (Transform == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
child.SetParent(Transform, false);
|
||||
child.SetPosition(position, Space.Self);
|
||||
child.SetRotation(rotation, Space.Self);
|
||||
child.SetScale(scale);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
DebugUtil.LogError(e);
|
||||
}
|
||||
}
|
||||
|
||||
public void DetachChild(GameObjectWrapper child)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (child != null)
|
||||
{
|
||||
DetachChild(child.Transform);
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
DebugUtil.LogError(e);
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void SetLayer(int layer)
|
||||
{
|
||||
if (_gameObject != null) _gameObject.layer = layer;
|
||||
}
|
||||
|
||||
public int GetLayer()
|
||||
{
|
||||
return _gameObject != null ? _gameObject.layer : 0;
|
||||
}
|
||||
|
||||
public GameObject GameObject
|
||||
{
|
||||
get { return _gameObject; }
|
||||
}
|
||||
|
||||
public Transform transform
|
||||
{
|
||||
get
|
||||
{
|
||||
return _gameObject.transform;
|
||||
}
|
||||
}
|
||||
|
||||
public Vector3 TransformPoint(Vector3 position)
|
||||
{
|
||||
return _gameObject.transform.TransformPoint(position);
|
||||
}
|
||||
|
||||
public Vector3 InverseTransformVector(Vector3 position)
|
||||
{
|
||||
return _gameObject.transform.InverseTransformVector(position);
|
||||
}
|
||||
|
||||
public Vector3 InverseTransformPoint(Vector3 position)
|
||||
{
|
||||
return _gameObject.transform.InverseTransformPoint(position);
|
||||
}
|
||||
|
||||
public Vector3 TransformVector(Vector3 position)
|
||||
{
|
||||
return _gameObject.transform.TransformVector(position);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: f0271496c285e437aa515e0c872eb926
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -1 +0,0 @@
|
|||
using System;
using UnityEngine;
namespace Framework.Wrapper
{
/// <summary>
/// 空的游戏物体
/// </summary>
public sealed class Node : GameObjectWrapper, IDisposable
{
public Node():base(GameObjectFactory.Create(false))
{
}
public static Node Root = new Node();
/// <summary>
/// 需要显式调用Dispose,销毁game object,editor模式下,系统会帮你检查node的泄漏问题
/// </summary>
public void Dispose()
{
Dispose(true);
#if UNITY_EDITOR
GC.SuppressFinalize(this); //自己释放了,不需要gc帮我调用析构函数
#endif
}
#if UNITY_EDITOR
~Node()
{
Dispose(false);
}
#endif
private void ReleaseUnmanagedResources()
{
GameObjectFactory.Destroy(_gameObject);
}
private void Dispose(bool disposing)
{
if (!disposing)
{
DebugUtil.LogError(
"Node should call dispose method,or the inner game object wont destroy. node name: {0}", Name);
}
ReleaseUnmanagedResources();
if (disposing)
{
}
}
}
}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: a300f7b978bde4ed9a02fb89a2608cf9
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -1,98 +0,0 @@
|
|||
|
||||
using UnityEngine;
|
||||
|
||||
namespace Framework.Wrapper
|
||||
{
|
||||
public class RendererWrapper
|
||||
{
|
||||
private readonly Renderer[] _renderers;
|
||||
private Material[][] _originalMaterials;
|
||||
private Shader[] _originalShaders;
|
||||
|
||||
|
||||
public RendererWrapper(Renderer[] renderers)
|
||||
{
|
||||
if (renderers == null)
|
||||
{
|
||||
DebugUtil.LogError("RendererWrapper: renderer is null");
|
||||
}
|
||||
_renderers = renderers;
|
||||
|
||||
if (_renderers.Length > 0)
|
||||
{
|
||||
_originalMaterials = new Material[_renderers.Length][];
|
||||
for (int i = 0; i < _renderers.Length; i++)
|
||||
{
|
||||
_originalMaterials[i] = _renderers[i].sharedMaterials;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void SetVisible(bool visible)
|
||||
{
|
||||
if (_renderers != null)
|
||||
{
|
||||
foreach (var renderer in _renderers)
|
||||
{
|
||||
if (renderer != null)
|
||||
{
|
||||
renderer.enabled = visible;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void SetMaterialProperty(string name, Color value)
|
||||
{
|
||||
if (_renderers != null)
|
||||
{
|
||||
foreach (var renderer in _renderers)
|
||||
{
|
||||
if (renderer != null)
|
||||
{
|
||||
var mpb = MaterialPropertyBlockVisitor.Instance;
|
||||
mpb.SetColor(name, value);
|
||||
renderer.SetPropertyBlock(mpb);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void SetMaterial(Material material)
|
||||
{
|
||||
if (_renderers != null)
|
||||
{
|
||||
foreach (var renderer in _renderers)
|
||||
{
|
||||
if (renderer != null)
|
||||
{
|
||||
if (renderer.materials != null && renderer.sharedMaterials.Length > 0)
|
||||
{
|
||||
var mats = new Material[renderer.sharedMaterials.Length];
|
||||
for (int i = 0; i < mats.Length; i++)
|
||||
{
|
||||
mats[i] = material;
|
||||
}
|
||||
renderer.sharedMaterials = mats;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void ResetMaterial()
|
||||
{
|
||||
if (_originalMaterials != null && _renderers != null && _originalMaterials.Length != _renderers.Length)
|
||||
{
|
||||
DebugUtil.LogError(
|
||||
"{0}.ResetMaterial, _originalMaterials.Length {1} != _renderers.Length {2}", GetType(),
|
||||
_originalMaterials.Length, _renderers.Length);
|
||||
return;
|
||||
}
|
||||
for (int i = 0; i < _originalMaterials.Length; i++)
|
||||
{
|
||||
_renderers[i].sharedMaterials = _originalMaterials[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 8372e28a48792474c8e63275532eb6a9
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -1,69 +0,0 @@
|
|||
using System.Collections;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Framework
|
||||
{
|
||||
public static class TransformUtil
|
||||
{
|
||||
public static bool ToRotationH(Vector3 dir, out Quaternion rotation)
|
||||
{
|
||||
dir.y = 0.0f;
|
||||
if (dir.sqrMagnitude > Constants.DOUBLE_EPSILON)
|
||||
{
|
||||
dir.Normalize();
|
||||
rotation = Quaternion.LookRotation(dir, Vector3.up);
|
||||
return true;
|
||||
}
|
||||
|
||||
rotation = Quaternion.identity;
|
||||
return false;
|
||||
}
|
||||
|
||||
public static bool ToRotation(Vector3 dir, Vector3 up, out Quaternion rotation)
|
||||
{
|
||||
if (dir.sqrMagnitude > Constants.DOUBLE_EPSILON &&
|
||||
up.sqrMagnitude > Constants.DOUBLE_EPSILON)
|
||||
{
|
||||
rotation = Quaternion.LookRotation(dir, up);
|
||||
return true;
|
||||
}
|
||||
|
||||
rotation = Quaternion.identity;
|
||||
return false;
|
||||
}
|
||||
|
||||
public static float GetAngleH(Quaternion rotation)
|
||||
{
|
||||
var angle = 0.0f;
|
||||
var axis = Vector3.zero;
|
||||
rotation.ToAngleAxis(out angle, out axis);
|
||||
return angle * axis.y;
|
||||
}
|
||||
|
||||
public static void CopyTransform(Transform src, Transform dst)
|
||||
{
|
||||
dst.parent = src.parent;
|
||||
dst.position = src.position;
|
||||
dst.rotation = src.rotation;
|
||||
dst.localPosition = src.localPosition;
|
||||
dst.localRotation = src.localRotation;
|
||||
dst.localScale = src.localScale;
|
||||
}
|
||||
|
||||
// public static IEnumerator Easing(Transform o, Transform startPos, Transform endPos, float duration)
|
||||
// {
|
||||
// var current = 0f;
|
||||
// while ((current += Time.deltaTime) < duration)
|
||||
// {
|
||||
// var start = startPos.position;
|
||||
// var change = endPos.position - start;
|
||||
// var x = EasingEquationsDouble.Linear(current, start.x, change.x, duration);
|
||||
// var y = EasingEquationsDouble.Linear(current, start.y, change.y, duration);
|
||||
// var z = EasingEquationsDouble.Linear(current, start.z, change.z, duration);
|
||||
// o.position = new Vector3((float)x,(float)y,(float)z);
|
||||
// yield return null;
|
||||
// }
|
||||
// o.transform.position = endPos.position;
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: c6634bff59b374ac19cd5c020ef71ee1
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -1,119 +0,0 @@
|
|||
using System;
|
||||
using JetBrains.Annotations;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Events;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace Framework.Wrapper
|
||||
{
|
||||
public class UIGameObjectWrapper : GameObjectWrapper
|
||||
{
|
||||
|
||||
public UIGameObjectWrapper(GameObject go) : base(go)
|
||||
{
|
||||
}
|
||||
|
||||
public GameObject TryGetItem(string key)
|
||||
{
|
||||
if (key == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
if (string.IsNullOrEmpty(key))
|
||||
{
|
||||
return _gameObject;
|
||||
}
|
||||
var obj = _gameObject.transform.Find(key)?.gameObject;
|
||||
return obj;
|
||||
}
|
||||
|
||||
public T TryGetItem<T>(string key) where T : Component
|
||||
{
|
||||
var child = TryGetItem(key);
|
||||
return TryGetItem<T>(child);
|
||||
}
|
||||
|
||||
public T TryGetItem<T>() where T : Component
|
||||
{
|
||||
return TryGetItem<T>(_gameObject);
|
||||
}
|
||||
|
||||
public T TryGetItem<T>(GameObject go) where T : Component
|
||||
{
|
||||
return go?.GetComponent<T>();
|
||||
}
|
||||
|
||||
public GameObject GetItem(string key)
|
||||
{
|
||||
var obj = TryGetItem(key);
|
||||
if (obj == null)
|
||||
{
|
||||
DebugUtil.LogError("GetItem failed, window controller name : {0}, key = {1}", GetType(), key);
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
public T GetItem<T>(string key) where T : Component
|
||||
{
|
||||
var child = GetItem(key);
|
||||
return GetItem<T>(child);
|
||||
}
|
||||
|
||||
public T GetItem<T>() where T : Component
|
||||
{
|
||||
return GetItem<T>(_gameObject);
|
||||
}
|
||||
|
||||
public T GetItem<T>(GameObject go) where T : Component
|
||||
{
|
||||
if (go != null)
|
||||
{
|
||||
var com = TryGetItem<T>(go);
|
||||
if (com == null)
|
||||
{
|
||||
DebugUtil.LogError("GetItem failed, window controller name : {0}, game object name = {1}, Component type:{2}",GetType(),go.name,typeof(T));
|
||||
}
|
||||
|
||||
return com;
|
||||
}
|
||||
|
||||
return default(T);
|
||||
}
|
||||
|
||||
public Button BindButton(string key, UnityAction action)
|
||||
{
|
||||
Button button = GetItem<Button>(key);
|
||||
if (button != null)
|
||||
{
|
||||
button.onClick.RemoveAllListeners();
|
||||
button.onClick.AddListener(action);
|
||||
return button;
|
||||
}
|
||||
else
|
||||
{
|
||||
DebugUtil.LogError("BindButton failed, button key = {0}", key);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public Button BindButton(UnityAction action)
|
||||
{
|
||||
Button button = GetItem<Button>();
|
||||
if (button != null)
|
||||
{
|
||||
button.onClick.RemoveAllListeners();
|
||||
button.onClick.AddListener(action);
|
||||
return button;
|
||||
}
|
||||
else
|
||||
{
|
||||
DebugUtil.LogError("BindButton failed. game object = {0}", _gameObject.name);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: d2796a82ee7a64285bd1e4224cdd5c76
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -3,7 +3,6 @@ using Cysharp.Threading.Tasks;
|
|||
using MagicaCloth2;
|
||||
using PhxhSDK;
|
||||
using UnityEngine;
|
||||
using Object = UnityEngine.Object;
|
||||
|
||||
namespace Framework.Wrapper
|
||||
{
|
||||
|
|
@ -79,7 +78,7 @@ namespace Framework.Wrapper
|
|||
OnDispose();
|
||||
_goWrapper?.SetActive(false);
|
||||
if (_goWrapper != null) GameplayInfoManager.Instance.UnRegister(_goWrapper.GetInstanceID());
|
||||
GameObjectFactory.Destroy(_goWrapper?.GameObject);
|
||||
Utils.Destroy(_goWrapper?.GameObject);
|
||||
_node?.Dispose();
|
||||
_node = null;
|
||||
_loadStatus = LoadStatus.NotLoad;
|
||||
|
|
@ -126,7 +125,7 @@ namespace Framework.Wrapper
|
|||
return;
|
||||
}
|
||||
|
||||
var go = Object.Instantiate(o);
|
||||
var go = GameObject.Instantiate(o);
|
||||
if (go != null)
|
||||
{
|
||||
_goWrapper = new GameObjectWrapper(go);
|
||||
|
|
|
|||
|
|
@ -12,8 +12,6 @@ namespace Gameplay.Effect
|
|||
using Cysharp.Threading.Tasks;
|
||||
using Framework;
|
||||
using Gameplay.Pause;
|
||||
using Gameplay.Skill;
|
||||
using Gameplay.Utils;
|
||||
using UnityEngine;
|
||||
|
||||
public class EffectManager
|
||||
|
|
|
|||
|
|
@ -141,7 +141,7 @@ namespace Gameplay.Level
|
|||
|
||||
if (_selectedGroundGFX != null)
|
||||
{
|
||||
GameObjectFactory.Destroy(_selectedGroundGFX);
|
||||
PhxhSDK.Utils.Destroy(_selectedGroundGFX);
|
||||
_selectedGroundGFX = null;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@ using Gameplay.Common;
|
|||
using Gameplay.Pause;
|
||||
using Gameplay.Skill;
|
||||
using Gameplay.Summon;
|
||||
using Gameplay.Utils;
|
||||
using Gameplay.Vehicle;
|
||||
using Gameplay.Vehicle.Impl;
|
||||
using Gameplay.Vehicle.TireMark;
|
||||
|
|
|
|||
|
|
@ -1,9 +1,7 @@
|
|||
using Cysharp.Threading.Tasks;
|
||||
using Framework;
|
||||
using Gameplay.Character;
|
||||
using Gameplay.Character.Utils;
|
||||
using Gameplay.Common;
|
||||
using Gameplay.Utils;
|
||||
using Gameplay.Vehicle;
|
||||
using Gameplay.Vehicle.Impl;
|
||||
using TGS;
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@
|
|||
using NLDMID;
|
||||
using NLDPB;
|
||||
using Framework;
|
||||
using CommonUtilsForUI = Utils.CommonUtils;
|
||||
|
||||
namespace Gameplay.Net
|
||||
{
|
||||
|
|
@ -50,7 +49,7 @@ namespace Gameplay.Net
|
|||
if (mPB.Result != (uint)OpResult.Ok)
|
||||
{
|
||||
DebugUtil.LogError("G_Clt_OpResult error, m_PB.MsgId={0},opResult={1}, param={2}", (MSGID)m_PB.MsgId, mPB.Result, m_PB.Param);
|
||||
CommonUtilsForUI.ConsoleOpResultError(mPB.Result);
|
||||
CommonUtils.ConsoleOpResultError(mPB.Result);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,18 +1,14 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using cfg.VehicleCfg;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
using Framework;
|
||||
using Gameplay;
|
||||
using Gameplay.Character;
|
||||
using Gameplay.Common;
|
||||
using Gameplay.Level;
|
||||
using Gameplay.Utils;
|
||||
using Gameplay.Vehicle;
|
||||
using Gameplay.Vehicle.Impl;
|
||||
using Google.Protobuf.WellKnownTypes;
|
||||
using PhxhSDK;
|
||||
using Constants = Framework.Constants;
|
||||
using EventManager = Framework.EventManager;
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ using System.Collections.Generic;
|
|||
using System.Data;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using Framework;
|
||||
using Gameplay;
|
||||
using Gameplay.Common;
|
||||
using Gameplay.Emoji;
|
||||
using PhxhSDK;
|
||||
|
|
@ -245,7 +246,7 @@ public class TeamPreviewNode: MonoBehaviour
|
|||
{
|
||||
_characterDic.Add(idx, go);
|
||||
go.SetLayerEx(LayerDefine.TeamEdit);
|
||||
var anim = Utils.CommonUtils.GetChildComponent<Animator>(go);
|
||||
var anim = CommonUtils.GetChildComponent<Animator>(go);
|
||||
if (anim)
|
||||
{
|
||||
if (idx < 2 || idx > 4)
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Framework;
|
||||
using Gameplay;
|
||||
using Gameplay.Net;
|
||||
using Sirenix.OdinInspector;
|
||||
using TMPro;
|
||||
|
|
@ -68,7 +69,7 @@ public class UI_CurrencyItem : MonoBehaviour
|
|||
{
|
||||
if (Vaild)
|
||||
{
|
||||
_num.text = Utils.CommonUtils.NumToEnglish(Actor.Instance.Item.GetItemCount(currencyID));
|
||||
_num.text = CommonUtils.NumToEnglish(Actor.Instance.Item.GetItemCount(currencyID));
|
||||
//todo 替换icon
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ using Button = UnityEngine.UI.Button;
|
|||
using Image = UnityEngine.UI.Image;
|
||||
using DG.Tweening;
|
||||
using Framework;
|
||||
using Gameplay;
|
||||
using PhxhSDK;
|
||||
|
||||
public class UIFightClockController : UIWindow{
|
||||
|
|
@ -195,16 +196,16 @@ public class UIFightClockController : UIWindow{
|
|||
{
|
||||
if (LevelManager.Instance.CurrentLevel.IsPreparing())
|
||||
{
|
||||
return Utils.CommonUtils.GetLocalizeText("battle_ready");
|
||||
return CommonUtils.GetLocalizeText("battle_ready");
|
||||
}
|
||||
|
||||
if (LevelManager.Instance.CurrentLevel.IsInBattle())
|
||||
{
|
||||
if (LevelManager.Instance.CurrentLevel.IsPause())
|
||||
{
|
||||
return Utils.CommonUtils.GetLocalizeText("battle_pause");
|
||||
return CommonUtils.GetLocalizeText("battle_pause");
|
||||
}
|
||||
return Utils.CommonUtils.GetLocalizeText("battle_in");
|
||||
return CommonUtils.GetLocalizeText("battle_in");
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using Framework;
|
||||
using Gameplay;
|
||||
using Gameplay.Character;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
|
@ -269,9 +270,9 @@ public class UIHerosHeadItemNode: UIHeadItemNode
|
|||
}
|
||||
//SingleTeamCharacterInfo characterData = TeamManager.Instance.GetCharacterDataInfo(uid);
|
||||
// var configData = characterData.GetConfigInfo();
|
||||
// var path = Utils.CommonUtils.GetWholeHeadPath(configData.Cfg.PIcDeathHeadPath);
|
||||
// var path = CommonUtils.GetWholeHeadPath(configData.Cfg.PIcDeathHeadPath);
|
||||
// Image_HeadPic.sprite = AssetManager.Instance.LoadAsset<Sprite>(path);
|
||||
Utils.CommonUtils.SetImageGray(Image_HeadPic, true);
|
||||
CommonUtils.SetImageGray(Image_HeadPic, true);
|
||||
RefreshBefore(characterInfo);
|
||||
}
|
||||
|
||||
|
|
@ -283,7 +284,7 @@ public class UIHerosHeadItemNode: UIHeadItemNode
|
|||
return;
|
||||
}
|
||||
//SingleTeamCharacterInfo characterData = TeamManager.Instance.GetCharacterDataInfo(uid);
|
||||
Utils.CommonUtils.SetImageGray(Image_HeadPic, true);
|
||||
CommonUtils.SetImageGray(Image_HeadPic, true);
|
||||
}
|
||||
|
||||
/***************** 战前阶段刷新 *****************/
|
||||
|
|
|
|||
|
|
@ -375,15 +375,15 @@ public class UITeamFightController : UIWindow
|
|||
if (characData.Type == SingleTeamCharacterInfo.CharacType.Hero)
|
||||
{
|
||||
var cfg = characData.GetConfigInfo().Cfg;
|
||||
var path = Utils.CommonUtils.GetCharacterPicPath(cfg.RoleID,Utils.CommonUtils.ECharacterPicPathType.Poster);
|
||||
var skillID = Utils.CommonUtils.GetGameUnitUltraSkillID(uid);
|
||||
var path = CommonUtils.GetCharacterPicPath(cfg.RoleID,CommonUtils.ECharacterPicPathType.Poster);
|
||||
var skillID = CommonUtils.GetGameUnitUltraSkillID(uid);
|
||||
DataSkill skillData = TableManager.Instance.Tables.SkillConfig?.Get(skillID);
|
||||
|
||||
if (skillData != null)
|
||||
{
|
||||
Text_SkillName.text = Utils.CommonUtils.GetLocalizeText(skillData.Name);
|
||||
Text_SkillCD.text = Utils.CommonUtils.GetLocalizeText("time_sec", skillData.CDTime);
|
||||
Text_SkillInfoDes.text = Utils.CommonUtils.GetLocalizeText(skillData.SkillDesc);
|
||||
Text_SkillName.text = CommonUtils.GetLocalizeText(skillData.Name);
|
||||
Text_SkillCD.text = CommonUtils.GetLocalizeText("time_sec", skillData.CDTime);
|
||||
Text_SkillInfoDes.text = CommonUtils.GetLocalizeText(skillData.SkillDesc);
|
||||
}
|
||||
Image_StandPaintting.sprite = AssetManager.Instance.LoadAsset<Sprite>(path);
|
||||
var charData = TableManager.Instance.Tables.CharacterAttri.GetOrDefault(cfg.RoleID);
|
||||
|
|
@ -391,8 +391,8 @@ public class UITeamFightController : UIWindow
|
|||
//Image_CharacterLogo.sprite = AssetManager.Instance.LoadAsset<Sprite>();
|
||||
//Image_SkillInfoLogo.sprite = AssetManager.Instance.LoadAsset<Sprite>();
|
||||
Image_Profession.sprite = AssetManager.Instance.LoadAsset<Sprite>(professionData.IconPath);
|
||||
Text_CharacterName.text = Utils.CommonUtils.GetLocalizeText(cfg.Name);
|
||||
Text_EnglishName.text = Utils.CommonUtils.GetLocalizeText(cfg.NickName);
|
||||
Text_CharacterName.text = CommonUtils.GetLocalizeText(cfg.Name);
|
||||
Text_EnglishName.text = CommonUtils.GetLocalizeText(cfg.NickName);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1155,7 +1155,7 @@ public class UITeamFightController : UIWindow
|
|||
{
|
||||
if (!SkillManager.instance.GetUnitSkillManager(character).positiveSkill.canRelease)
|
||||
{
|
||||
UITipsManager.ShowTips(Utils.CommonUtils.GetLocalizeText("skill_in_cd"));
|
||||
UITipsManager.ShowTips(CommonUtils.GetLocalizeText("skill_in_cd"));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -1163,7 +1163,7 @@ public class UITeamFightController : UIWindow
|
|||
{
|
||||
if (character.statusData.isRetreat)
|
||||
{
|
||||
UITipsManager.ShowTips(Utils.CommonUtils.GetLocalizeText("skill_cant_put"));
|
||||
UITipsManager.ShowTips(CommonUtils.GetLocalizeText("skill_cant_put"));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
using System.Collections.Generic;
|
||||
using Framework;
|
||||
using Gameplay;
|
||||
using Gameplay.Character;
|
||||
using Gameplay.Common;
|
||||
using Gameplay.Level;
|
||||
|
|
@ -86,7 +87,7 @@ public class UICharacterDamage: MonoBehaviour
|
|||
}
|
||||
}
|
||||
|
||||
Utils.CommonUtils.SetScaleWithCameraOrgSize(gameObject);
|
||||
CommonUtils.SetScaleWithCameraOrgSize(gameObject);
|
||||
}
|
||||
|
||||
//外部接口,受到伤害
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ public class UICharacterStateBar: UIUnitStateBar
|
|||
}
|
||||
}
|
||||
|
||||
//Utils.CommonUtils.SetScaleWithCameraOrgSize(gameObject);
|
||||
//CommonUtils.SetScaleWithCameraOrgSize(gameObject);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Framework;
|
||||
using Gameplay;
|
||||
using Gameplay.Character;
|
||||
using Gameplay.Common;
|
||||
using Gameplay.Level;
|
||||
|
|
@ -116,7 +117,7 @@ public class UIFightSceneController : UIWindow{
|
|||
SetActionStatesPos(go, character);
|
||||
go.SetActive(true);
|
||||
img.SetNativeSize();
|
||||
Utils.CommonUtils.SetScaleWithCameraOrgSize(go);
|
||||
CommonUtils.SetScaleWithCameraOrgSize(go);
|
||||
}
|
||||
else if (character.runtimeData.isInSuppressed)
|
||||
{
|
||||
|
|
@ -124,7 +125,7 @@ public class UIFightSceneController : UIWindow{
|
|||
SetActionStatesPos(go, character);
|
||||
go.SetActive(true);
|
||||
img.SetNativeSize();
|
||||
Utils.CommonUtils.SetScaleWithCameraOrgSize(go);
|
||||
CommonUtils.SetScaleWithCameraOrgSize(go);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
using UnityEngine.UI;
|
||||
using Framework;
|
||||
using Gameplay;
|
||||
using Gameplay.Common;
|
||||
using Gameplay.Level;
|
||||
using Gameplay.Vehicle.Impl;
|
||||
|
|
@ -47,7 +48,7 @@ public class UIVehicleStateBar : UIUnitStateBar
|
|||
Image_HP.fillAmount = (float)(curBlood + curShield) / m_totalHP;
|
||||
Image_Armor.fillAmount = (float)curShield / m_totalHP;
|
||||
|
||||
Utils.CommonUtils.SetScaleWithCameraOrgSize(gameObject);
|
||||
CommonUtils.SetScaleWithCameraOrgSize(gameObject);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ public class UINewLoginController : UIWindow
|
|||
private void OnRecvNewLoginTips(string obj)
|
||||
{
|
||||
TipsObj.SetActive(true);
|
||||
Utils.CommonUtils.GetComponent<TMP_Text>(TipsObj, "label").text = obj;
|
||||
CommonUtils.GetComponent<TMP_Text>(TipsObj, "label").text = obj;
|
||||
|
||||
IEnumerator coroutine = waitTime();
|
||||
StartCoroutine(coroutine);
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
using Framework;
|
||||
using Gameplay.Net;
|
||||
using System;
|
||||
using Gameplay;
|
||||
using MagicaCloth2;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
|
|
@ -108,7 +109,7 @@ public class UIRaffleResultController : UIWindow
|
|||
private void RefreshSingleCharacter(GameObject obj,uint id ,uint count)
|
||||
{
|
||||
int uid = TableManager.Instance.Tables.Item.GetOrDefault((int)id).Param1;
|
||||
Utils.CommonUtils.RefreshCharacter2DPic(Utils.CommonUtils.GetComponent<Image>(obj, "Image_Poster"), uid, Utils.CommonUtils.ECharacterPicPathType.SelectCharacter);
|
||||
CommonUtils.RefreshCharacter2DPic(CommonUtils.GetComponent<Image>(obj, "Image_Poster"), uid, CommonUtils.ECharacterPicPathType.SelectCharacter);
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -119,8 +120,8 @@ public class UIRaffleResultController : UIWindow
|
|||
|
||||
int cId = TableManager.Instance.Tables.Item.GetOrDefault((int)awards.Ids[0]).Param1;
|
||||
DataCharacterAttri cfg = TableManager.Instance.Tables.CharacterAttri.GetOrDefault(cId);
|
||||
Utils.CommonUtils.RefreshCharacter2DPic(Image_poster, cfg.RoleID, Utils.CommonUtils.ECharacterPicPathType.Cultivate);
|
||||
Name.text = Utils.CommonUtils.GetLocalizeText(cfg.Name);
|
||||
CommonUtils.RefreshCharacter2DPic(Image_poster, cfg.RoleID, CommonUtils.ECharacterPicPathType.Cultivate);
|
||||
Name.text = CommonUtils.GetLocalizeText(cfg.Name);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ using cfg.CharacterCfg;
|
|||
using Framework;
|
||||
using CharacterInfo = Gameplay.Net.CharacterInfo;
|
||||
using cfg;
|
||||
using Gameplay;
|
||||
using PhxhSDK;
|
||||
|
||||
public class CharacterDataInfoManager : Singlenton<CharacterDataInfoManager>, IInitable
|
||||
|
|
@ -543,7 +544,7 @@ public class CharacterDataInfo : CharacterInfo
|
|||
if (Skinindex == -1)
|
||||
Skinindex = Cfg.DefaultSkinIndex;
|
||||
|
||||
return Utils.CommonUtils.GetWholeHeadPath(TableManager.Instance.Tables.SkinCfg.Get(Skinindex, Cfg.RoleID).PIcHeadPath);
|
||||
return CommonUtils.GetWholeHeadPath(TableManager.Instance.Tables.SkinCfg.Get(Skinindex, Cfg.RoleID).PIcHeadPath);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
using UnityEngine;
|
||||
using Framework;
|
||||
using System;
|
||||
using Gameplay;
|
||||
using PhxhSDK;
|
||||
using UnityEngine.UI;
|
||||
|
||||
|
|
@ -34,7 +35,7 @@ public class ItemObj
|
|||
|
||||
private void OnIconLoaded(Sprite sprite)
|
||||
{
|
||||
Utils.CommonUtils.GetComponent<Image>(_itemGo, "icon").sprite= sprite;
|
||||
CommonUtils.GetComponent<Image>(_itemGo, "icon").sprite= sprite;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ using NLDPB;
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Gameplay;
|
||||
using PhxhSDK;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
|
|
@ -174,7 +175,7 @@ public class UIAdvanceController : UIWindow
|
|||
}
|
||||
if(!IsMaterial)
|
||||
{
|
||||
UIManager.Instance.ShowUITips(UINameConst.UIAirView, Utils.CommonUtils.GetLocalizeText("cultivate_AwakeMaterialNotFull"));
|
||||
UIManager.Instance.ShowUITips(UINameConst.UIAirView, CommonUtils.GetLocalizeText("cultivate_AwakeMaterialNotFull"));
|
||||
return;
|
||||
}
|
||||
NetHelper.CharacterUpgrade(mCharacterDataInfo.ID, NLDPB.UpgradeType.UtAwake, (uint)mTargetLevel);
|
||||
|
|
@ -197,9 +198,9 @@ public class UIAdvanceController : UIWindow
|
|||
if(!IsMaxLevel())
|
||||
{
|
||||
var targetCfg = mCharacterAwakeCfg.Get((int)mCharacterDataInfo.ID, mTargetLevel);
|
||||
GetComponent<TMP_Text>("Image_BG/UI_RankLevel/Text_RankLevel02/fixvalue02").text = Utils.CommonUtils.GetLocalizeText(targetCfg.Name);
|
||||
GetComponent<TMP_Text>("Image_BG/UI_RankLevel/Text_RankLevel02/fixvalue02").text = CommonUtils.GetLocalizeText(targetCfg.Name);
|
||||
}
|
||||
GetComponent<TMP_Text>("Image_BG/UI_RankLevel/Text_RankLevel01/fixvalue01").text = Utils.CommonUtils.GetLocalizeText(oriCfg.Name);
|
||||
GetComponent<TMP_Text>("Image_BG/UI_RankLevel/Text_RankLevel01/fixvalue01").text = CommonUtils.GetLocalizeText(oriCfg.Name);
|
||||
|
||||
}
|
||||
private void OnCharacterLevelup(UpgradeType type)
|
||||
|
|
@ -271,7 +272,7 @@ public class UIAdvanceController : UIWindow
|
|||
RefreshTitle();
|
||||
|
||||
mAnimator.Play("Advance SkillInfo_Change", 0, 0f);
|
||||
float waitTime = Utils.CommonUtils.GetAnimatorLength(mAnimator, "Advance SkillInfo_Change");
|
||||
float waitTime = PhxhSDK.Utils.GetAnimatorLength(mAnimator, "Advance SkillInfo_Change");
|
||||
coroutine = WaitTimeRefresh(waitTime);
|
||||
StartCoroutine(coroutine);
|
||||
}
|
||||
|
|
@ -293,8 +294,8 @@ public class UIAdvanceController : UIWindow
|
|||
if ((cbreak.PassiveSkillID != 0))
|
||||
{
|
||||
DataSkill afterSkill = TableManager.Instance.Tables.SkillConfig.Get(cbreak.PassiveSkillID);
|
||||
Text_SkillName03.text = Utils.CommonUtils.GetLocalizeText(afterSkill.Name);
|
||||
Text_SkillInfo03.text = Utils.CommonUtils.GetLocalizeText(afterSkill.SkillDesc);
|
||||
Text_SkillName03.text = CommonUtils.GetLocalizeText(afterSkill.Name);
|
||||
Text_SkillInfo03.text = CommonUtils.GetLocalizeText(afterSkill.SkillDesc);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -355,7 +356,7 @@ public class UIAdvanceController : UIWindow
|
|||
IsMaterial = true;
|
||||
RefreshBreakLevelLvUpAbout();
|
||||
RegisterEvent();
|
||||
Utils.CommonUtils.SetImageBlur(GetComponent<Image>("blurObj"));
|
||||
CommonUtils.SetImageBlur(GetComponent<Image>("blurObj"));
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -383,7 +384,7 @@ public class UIAdvanceController : UIWindow
|
|||
{
|
||||
Text_RankLevel01.gameObject.SetActive(false);
|
||||
|
||||
Utils.CommonUtils.GetComponent<TMP_Text>(Text_RankLevel02.gameObject, "value02").text = Utils.CommonUtils.GetLocalizeText(oriCfg.Name);
|
||||
CommonUtils.GetComponent<TMP_Text>(Text_RankLevel02.gameObject, "value02").text = CommonUtils.GetLocalizeText(oriCfg.Name);
|
||||
return;
|
||||
}
|
||||
DataCharacterAwaking targetCfg = mCharacterAwakeCfg.Get((int)mCharacterDataInfo.ID, mTargetLevel);
|
||||
|
|
@ -391,11 +392,11 @@ public class UIAdvanceController : UIWindow
|
|||
if (mCharacterDataInfo.AwakeLevel == 0)
|
||||
{
|
||||
Text_RankLevel01.gameObject.SetActive(false);
|
||||
Utils.CommonUtils.GetComponent<TMP_Text>(Text_RankLevel02.gameObject, "value02").text = Utils.CommonUtils.GetLocalizeText(targetCfg.Name);
|
||||
CommonUtils.GetComponent<TMP_Text>(Text_RankLevel02.gameObject, "value02").text = CommonUtils.GetLocalizeText(targetCfg.Name);
|
||||
return;
|
||||
}
|
||||
Utils.CommonUtils.GetComponent<TMP_Text>(Text_RankLevel01.gameObject, "value01").text= Utils.CommonUtils.GetLocalizeText(oriCfg.Name);
|
||||
Utils.CommonUtils.GetComponent<TMP_Text>(Text_RankLevel02.gameObject, "value02").text = Utils.CommonUtils.GetLocalizeText(targetCfg.Name);
|
||||
CommonUtils.GetComponent<TMP_Text>(Text_RankLevel01.gameObject, "value01").text= CommonUtils.GetLocalizeText(oriCfg.Name);
|
||||
CommonUtils.GetComponent<TMP_Text>(Text_RankLevel02.gameObject, "value02").text = CommonUtils.GetLocalizeText(targetCfg.Name);
|
||||
|
||||
Text_RankLevel01.gameObject.SetActive(true);
|
||||
Text_RankLevel02.gameObject.SetActive(true);
|
||||
|
|
@ -444,8 +445,8 @@ public class UIAdvanceController : UIWindow
|
|||
maxSkill.SetActive(true);
|
||||
DataSkill skill = TableManager.Instance.Tables.SkillConfig.Get(mCharacterDataInfo.GetAwakePassiveId());
|
||||
|
||||
GetComponent<TMP_Text>("Image_BG/UI_SkillInfo/MaxSkill/Text_SkillName01").text = Utils.CommonUtils.GetLocalizeText(skill.Name);
|
||||
GetComponent<TMP_Text>("Image_BG/UI_SkillInfo/MaxSkill/Text_SkillInfo01").text = Utils.CommonUtils.GetLocalizeText(skill.SkillDesc);
|
||||
GetComponent<TMP_Text>("Image_BG/UI_SkillInfo/MaxSkill/Text_SkillName01").text = CommonUtils.GetLocalizeText(skill.Name);
|
||||
GetComponent<TMP_Text>("Image_BG/UI_SkillInfo/MaxSkill/Text_SkillInfo01").text = CommonUtils.GetLocalizeText(skill.SkillDesc);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -465,8 +466,8 @@ public class UIAdvanceController : UIWindow
|
|||
DataSkill skill = TableManager.Instance.Tables.SkillConfig.Get(mCharacterDataInfo.GetAwakePassiveId());
|
||||
Image_Skill_01.gameObject.SetActive(true);
|
||||
Image_Arrow.gameObject.SetActive(true);
|
||||
Text_SkillName01.text = Utils.CommonUtils.GetLocalizeText(skill.Name); ;
|
||||
Text_SkillInfo01.text = Utils.CommonUtils.GetLocalizeText(skill.SkillDesc);
|
||||
Text_SkillName01.text = CommonUtils.GetLocalizeText(skill.Name); ;
|
||||
Text_SkillInfo01.text = CommonUtils.GetLocalizeText(skill.SkillDesc);
|
||||
}
|
||||
|
||||
Image_Skill_02.gameObject.SetActive(true);
|
||||
|
|
@ -482,8 +483,8 @@ public class UIAdvanceController : UIWindow
|
|||
else
|
||||
{
|
||||
DataSkill afterSkill = TableManager.Instance.Tables.SkillConfig.Get(cbreak.PassiveSkillID);
|
||||
Text_SkillName02.text = Utils.CommonUtils.GetLocalizeText(afterSkill.Name);
|
||||
Text_SkillInfo02.text = Utils.CommonUtils.GetLocalizeText(afterSkill.SkillDesc);
|
||||
Text_SkillName02.text = CommonUtils.GetLocalizeText(afterSkill.Name);
|
||||
Text_SkillInfo02.text = CommonUtils.GetLocalizeText(afterSkill.SkillDesc);
|
||||
}
|
||||
Image_Arrow.gameObject.SetActive(isArrowExist1 && isArrowExist2);
|
||||
}
|
||||
|
|
@ -522,18 +523,18 @@ public class UIAdvanceController : UIWindow
|
|||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
GameObject itemParent = FindObj(string.Format("Image_BG/UI_Materals/{0}", (i + 1).ToString()));
|
||||
Utils.CommonUtils.DestoryAllChildGameObject(Utils.CommonUtils.GetGameObject(itemParent, "item"));
|
||||
CommonUtils.DestoryAllChildGameObject(CommonUtils.GetGameObject(itemParent, "item"));
|
||||
|
||||
if ((i + 1) <= awakeCfg.CostItems.Count)
|
||||
{
|
||||
itemParent.SetActive(true);
|
||||
|
||||
ItemObj itemObj = new ItemObj(awakeCfg.CostItems[i].Id, Utils.CommonUtils.GetGameObject(itemParent, "item"));
|
||||
Utils.CommonUtils.GetComponent<TMP_Text>(itemParent, "value").text = Actor.Instance.Item.GetItemCount(awakeCfg.CostItems[i].Id) + "/" + awakeCfg.CostItems[i].Count;
|
||||
ItemObj itemObj = new ItemObj(awakeCfg.CostItems[i].Id, CommonUtils.GetGameObject(itemParent, "item"));
|
||||
CommonUtils.GetComponent<TMP_Text>(itemParent, "value").text = Actor.Instance.Item.GetItemCount(awakeCfg.CostItems[i].Id) + "/" + awakeCfg.CostItems[i].Count;
|
||||
|
||||
bool isFull = Actor.Instance.Item.GetItemCount(awakeCfg.CostItems[i].Id) >= awakeCfg.CostItems[i].Count;
|
||||
Utils.CommonUtils.GetGameObject(itemParent, "Image_Red").SetActive(!(isFull));
|
||||
Utils.CommonUtils.GetGameObject(itemParent, "Image_Green02").SetActive(isFull);
|
||||
CommonUtils.GetGameObject(itemParent, "Image_Red").SetActive(!(isFull));
|
||||
CommonUtils.GetGameObject(itemParent, "Image_Green02").SetActive(isFull);
|
||||
if (!isFull) { IsMaterial = false; }
|
||||
}
|
||||
else
|
||||
|
|
@ -548,7 +549,7 @@ public class UIAdvanceController : UIWindow
|
|||
}
|
||||
private void RefreshBase()
|
||||
{
|
||||
Utils.CommonUtils.RefreshCharacter2DPic(Image_Poster, mCharacterDataInfo.Cfg.RoleID, Utils.CommonUtils.ECharacterPicPathType.LevelUp);
|
||||
CommonUtils.RefreshCharacter2DPic(Image_Poster, mCharacterDataInfo.Cfg.RoleID, CommonUtils.ECharacterPicPathType.LevelUp);
|
||||
Image_Poster.SetNativeSize();
|
||||
|
||||
}
|
||||
|
|
@ -612,27 +613,27 @@ public class UIAdvanceController : UIWindow
|
|||
void RefreshUpperAttri(GameObject obj, float value, float addValue)
|
||||
{
|
||||
|
||||
Utils.CommonUtils.GetGameObject(obj, "noChange").SetActive(addValue == 0);
|
||||
Utils.CommonUtils.GetGameObject(obj, "Change").SetActive(addValue != 0);
|
||||
Utils.CommonUtils.GetComponent<TMP_Text>(obj, "Change/changeValue").text = "+" + addValue;
|
||||
Utils.CommonUtils.GetComponent<TMP_Text>(obj, "noChange/value").text = "+" + value;
|
||||
Utils.CommonUtils.GetComponent<TMP_Text>(obj, "Change/value").text = "+" + value;
|
||||
CommonUtils.GetGameObject(obj, "noChange").SetActive(addValue == 0);
|
||||
CommonUtils.GetGameObject(obj, "Change").SetActive(addValue != 0);
|
||||
CommonUtils.GetComponent<TMP_Text>(obj, "Change/changeValue").text = "+" + addValue;
|
||||
CommonUtils.GetComponent<TMP_Text>(obj, "noChange/value").text = "+" + value;
|
||||
CommonUtils.GetComponent<TMP_Text>(obj, "Change/value").text = "+" + value;
|
||||
|
||||
}
|
||||
void RefreshDownnerAttrt(GameObject obj, float value, float addValue, bool isPercent = false)
|
||||
{
|
||||
|
||||
Utils.CommonUtils.GetGameObject(obj, "noChange").SetActive(addValue == 0);
|
||||
Utils.CommonUtils.GetGameObject(obj, "Change").SetActive(addValue != 0);
|
||||
CommonUtils.GetGameObject(obj, "noChange").SetActive(addValue == 0);
|
||||
CommonUtils.GetGameObject(obj, "Change").SetActive(addValue != 0);
|
||||
if (!isPercent)
|
||||
{
|
||||
Utils.CommonUtils.GetComponent<TMP_Text>(obj, "Change/changeValue").text = "+" + string.Format("{0:F2}", addValue);
|
||||
Utils.CommonUtils.GetComponent<TMP_Text>(obj, "value").text = string.Format("{0:F2}", value);
|
||||
CommonUtils.GetComponent<TMP_Text>(obj, "Change/changeValue").text = "+" + string.Format("{0:F2}", addValue);
|
||||
CommonUtils.GetComponent<TMP_Text>(obj, "value").text = string.Format("{0:F2}", value);
|
||||
}
|
||||
else
|
||||
{
|
||||
Utils.CommonUtils.GetComponent<TMP_Text>(obj, "Change/changeValue").text = "+" + string.Format("{0:P1}", addValue);
|
||||
Utils.CommonUtils.GetComponent<TMP_Text>(obj, "value").text = string.Format("{0:P1}", value);
|
||||
CommonUtils.GetComponent<TMP_Text>(obj, "Change/changeValue").text = "+" + string.Format("{0:P1}", addValue);
|
||||
CommonUtils.GetComponent<TMP_Text>(obj, "value").text = string.Format("{0:P1}", value);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
using cfg.CharacterCfg;
|
||||
using Framework;
|
||||
using System.Threading.Tasks;
|
||||
using Gameplay;
|
||||
using PhxhSDK;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
|
|
@ -68,7 +69,7 @@ public class UIFavorableController : UIWindow
|
|||
|
||||
private void Refresh2DPic()
|
||||
{
|
||||
Utils.CommonUtils.RefreshCharacter2DPic(Image_Poster00, mCharacterInfo.Cfg.RoleID, Utils.CommonUtils.ECharacterPicPathType.LevelUp);
|
||||
CommonUtils.RefreshCharacter2DPic(Image_Poster00, mCharacterInfo.Cfg.RoleID, CommonUtils.ECharacterPicPathType.LevelUp);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -91,7 +92,7 @@ public class UIFavorableController : UIWindow
|
|||
protected override void OnOpenWindow(object data = null)
|
||||
{
|
||||
SetCharacterInfoAsync(data as CharacterDataInfo);
|
||||
Utils.CommonUtils.SetImageBlur(GetComponent<Image>("blurObj"));
|
||||
CommonUtils.SetImageBlur(GetComponent<Image>("blurObj"));
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -120,7 +121,7 @@ public class UIFavorableController : UIWindow
|
|||
|
||||
private async Task RefreshUI()
|
||||
{
|
||||
Text_CharacterName.text = Utils.CommonUtils.GetLocalizeText(mCharacterInfo.Cfg.Name);
|
||||
Text_CharacterName.text = CommonUtils.GetLocalizeText(mCharacterInfo.Cfg.Name);
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
GameObject tempStar = FindObj(string.Format("Image_BG/Image_Favorable_BG_Black/Image_NameInfo/Stars/{0}", "Image_Star0" + (i + 2)));
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ using Gameplay.Net;
|
|||
using NLDPB;
|
||||
using System;
|
||||
using System.Numerics;
|
||||
using Gameplay;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
|
|
@ -96,7 +97,7 @@ public class UILevelUpController : UIWindow
|
|||
BindButton(Button_Cancel, OnButton_CancelClick);
|
||||
BindButton(Button_Confirm, OnButton_ConfirmClick);
|
||||
BindButton(Button_Home, OnClickHome);
|
||||
dragForUI = Utils.CommonUtils.GetComponent<DragForUI>(this.gameObject,"Drag");
|
||||
dragForUI = CommonUtils.GetComponent<DragForUI>(this.gameObject,"Drag");
|
||||
dragForUI.OnDragStarted += ondragStart;
|
||||
dragForUI.OnDraging += ondrag;
|
||||
dragForUI.OnDragCompleted += ondragend;
|
||||
|
|
@ -186,13 +187,13 @@ public class UILevelUpController : UIWindow
|
|||
}
|
||||
if (targetLevel >= expLast)
|
||||
{
|
||||
UIManager.Instance.ShowUITips(UINameConst.UIAirView, Utils.CommonUtils.GetLocalizeText("cultivate_expDontFull"));
|
||||
UIManager.Instance.ShowUITips(UINameConst.UIAirView, CommonUtils.GetLocalizeText("cultivate_expDontFull"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (Actor.Instance.Item.GetItemCount(GLConfig.Inst.data.HeroExpItem)< expLast)
|
||||
{
|
||||
UIManager.Instance.ShowUITips(UINameConst.UIAirView, Utils.CommonUtils.GetLocalizeText("cultivate_expDontFull"));
|
||||
UIManager.Instance.ShowUITips(UINameConst.UIAirView, CommonUtils.GetLocalizeText("cultivate_expDontFull"));
|
||||
return;
|
||||
}
|
||||
NetHelper.CharacterUpgrade(mCharacterDataInfo.ID,NLDPB.UpgradeType.UtLevel,(uint)targetLevel);
|
||||
|
|
@ -217,7 +218,7 @@ public class UILevelUpController : UIWindow
|
|||
}
|
||||
if (targetLevel >= mCharacterBreak.Get((int)mCharacterDataInfo.ID, (int)mCharacterDataInfo.BreakLevel).LevelLimit)
|
||||
{
|
||||
UIManager.Instance.ShowUITips(UINameConst.UIAirView, Utils.CommonUtils.GetLocalizeText("cultivate_LevelUpMAX"));
|
||||
UIManager.Instance.ShowUITips(UINameConst.UIAirView, CommonUtils.GetLocalizeText("cultivate_LevelUpMAX"));
|
||||
return;
|
||||
}
|
||||
targetLevel = mCharacterBreak.Get((int)mCharacterDataInfo.ID, (int)mCharacterDataInfo.BreakLevel).LevelLimit;
|
||||
|
|
@ -231,7 +232,7 @@ public class UILevelUpController : UIWindow
|
|||
{
|
||||
if (targetLevel <= mCharacterDataInfo.Level)
|
||||
{
|
||||
UIManager.Instance.ShowUITips(UINameConst.UIAirView, Utils.CommonUtils.GetLocalizeText("cultivate_LevelUpMIN"));
|
||||
UIManager.Instance.ShowUITips(UINameConst.UIAirView, CommonUtils.GetLocalizeText("cultivate_LevelUpMIN"));
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
@ -249,7 +250,7 @@ public class UILevelUpController : UIWindow
|
|||
}
|
||||
if(targetLevel>= mCharacterBreak.Get((int)mCharacterDataInfo.ID,(int)mCharacterDataInfo.BreakLevel).LevelLimit)
|
||||
{
|
||||
UIManager.Instance.ShowUITips(UINameConst.UIAirView, Utils.CommonUtils.GetLocalizeText("cultivate_LevelUpMAX"));
|
||||
UIManager.Instance.ShowUITips(UINameConst.UIAirView, CommonUtils.GetLocalizeText("cultivate_LevelUpMAX"));
|
||||
return;
|
||||
}
|
||||
targetLevel++;
|
||||
|
|
@ -284,7 +285,7 @@ public class UILevelUpController : UIWindow
|
|||
if (mCharacterDataInfo != null) targetLevel = (int)mCharacterDataInfo.Level;
|
||||
LoadCfg();
|
||||
expLast = 0;
|
||||
Utils.CommonUtils.SetImageBlur(GetComponent<Image>("blurObj"));
|
||||
CommonUtils.SetImageBlur(GetComponent<Image>("blurObj"));
|
||||
InputManager.Instance.OnFingersMove += OnFingersHover;
|
||||
RegisterEvent();
|
||||
|
||||
|
|
@ -298,7 +299,7 @@ public class UILevelUpController : UIWindow
|
|||
|
||||
private void RefreshUI()
|
||||
{
|
||||
Utils.CommonUtils.RefreshCharacter2DPic(Image_Poster,mCharacterDataInfo.Cfg.RoleID, Utils.CommonUtils.ECharacterPicPathType.LevelUp);
|
||||
CommonUtils.RefreshCharacter2DPic(Image_Poster,mCharacterDataInfo.Cfg.RoleID, CommonUtils.ECharacterPicPathType.LevelUp);
|
||||
RefresLevelUpBar(mCharacterDataInfo.Level);
|
||||
RefreshLevelUpBtn();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
using cfg.CharacterCfg;
|
||||
using Framework;
|
||||
using System.Collections.Generic;
|
||||
using Gameplay;
|
||||
using PhxhSDK;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
|
|
@ -271,7 +272,7 @@ public class UIPosterController : UIWindow
|
|||
_characterData = tempInfo as CharacterDataInfo;
|
||||
Image_Poster.gameObject.SetActive(false);
|
||||
LoadCfg();
|
||||
Utils.CommonUtils.SetImageBlur(GetComponent<Image>("blurObj"));
|
||||
CommonUtils.SetImageBlur(GetComponent<Image>("blurObj"));
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -298,7 +299,7 @@ public class UIPosterController : UIWindow
|
|||
|
||||
private void OnPicLoaded()
|
||||
{
|
||||
AssetManager.Instance.LoadAssetOnCallBack<Sprite>(Utils.CommonUtils.GetCharacterPicPath(_characterData.Cfg.RoleID, Utils.CommonUtils.ECharacterPicPathType.Poster),onLoadPic);
|
||||
AssetManager.Instance.LoadAssetOnCallBack<Sprite>(CommonUtils.GetCharacterPicPath(_characterData.Cfg.RoleID, CommonUtils.ECharacterPicPathType.Poster),onLoadPic);
|
||||
}
|
||||
|
||||
private void onLoadPic(Sprite sprite)
|
||||
|
|
@ -316,7 +317,7 @@ public class UIPosterController : UIWindow
|
|||
}
|
||||
private void UnLoad()
|
||||
{
|
||||
AssetManager.Instance.Unload(Utils.CommonUtils.GetCharacterPicPath(_characterData.Cfg.RoleID, Utils.CommonUtils.ECharacterPicPathType.Poster));
|
||||
AssetManager.Instance.Unload(CommonUtils.GetCharacterPicPath(_characterData.Cfg.RoleID, CommonUtils.ECharacterPicPathType.Poster));
|
||||
AssetManager.Instance.Unload(TableManager.Instance.Tables.SkinCfg.Get(Constants.DEFULT_SKINID,_characterData.Cfg.RoleID).DisplayPrefabPath);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ using Gameplay.Net;
|
|||
using NLDPB;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using Gameplay;
|
||||
using PhxhSDK;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
|
|
@ -85,7 +86,7 @@ public class UIRankController : UIWindow
|
|||
for (int i = 0; i < Constants.BREAK_FLAG_UI; i++)
|
||||
{
|
||||
GameObject tempFlagObj = FindObj(string.Format("Image_BG/Image_RankPic_Bg/{0}", (i + 1)));
|
||||
BindButton(Utils.CommonUtils.GetComponent<Button>(tempFlagObj, "Col"), OnClickFlag, i);
|
||||
BindButton(CommonUtils.GetComponent<Button>(tempFlagObj, "Col"), OnClickFlag, i);
|
||||
|
||||
}
|
||||
BindButton(Button_Back, OnButton_BackClick);
|
||||
|
|
@ -162,8 +163,8 @@ public class UIRankController : UIWindow
|
|||
if ((cbreak.PassiveSkillID != 0))
|
||||
{
|
||||
DataSkill afterSkill = TableManager.Instance.Tables.SkillConfig.Get(cbreak.PassiveSkillID);
|
||||
Text_SkillName03.text = Utils.CommonUtils.GetLocalizeText(afterSkill.Name);
|
||||
Text_SkillInfo03.text = Utils.CommonUtils.GetLocalizeText(afterSkill.SkillDesc);
|
||||
Text_SkillName03.text = CommonUtils.GetLocalizeText(afterSkill.Name);
|
||||
Text_SkillInfo03.text = CommonUtils.GetLocalizeText(afterSkill.SkillDesc);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -184,7 +185,7 @@ public class UIRankController : UIWindow
|
|||
mAnimator.speed = 1;
|
||||
|
||||
mAnimator.Play("RankInfo_Change",0,0f);
|
||||
float waitTime = Utils.CommonUtils.GetAnimatorLength(mAnimator, "RankInfo_Change");
|
||||
float waitTime = PhxhSDK.Utils.GetAnimatorLength(mAnimator, "RankInfo_Change");
|
||||
coroutine = WaitTimeRefresh(waitTime);
|
||||
StartCoroutine(coroutine);
|
||||
}
|
||||
|
|
@ -246,18 +247,18 @@ public class UIRankController : UIWindow
|
|||
|
||||
RefreshBreakLevelLvUpAbout();
|
||||
RegisterEvent();
|
||||
Utils.CommonUtils.SetImageBlur(GetComponent<Image>("blurObj"));
|
||||
CommonUtils.SetImageBlur(GetComponent<Image>("blurObj"));
|
||||
|
||||
}
|
||||
|
||||
private void RefreshFxValue()
|
||||
{
|
||||
DataCharacterBreak oriCfg = mCharacterBreakCfg.Get((int)mCharacterDataInfo.ID, (int)mCharacterDataInfo.BreakLevel);
|
||||
GetComponent<TMP_Text>("Image_BG/UI_RankLevel/Text_RankLevel01/fxValue01").text = Utils.CommonUtils.GetLocalizeText(oriCfg.Name);
|
||||
GetComponent<TMP_Text>("Image_BG/UI_RankLevel/Text_RankLevel01/fxValue01").text = CommonUtils.GetLocalizeText(oriCfg.Name);
|
||||
|
||||
if (IsMaxLevel()) return;
|
||||
DataCharacterBreak targetCfg = mCharacterBreakCfg.Get((int)mCharacterDataInfo.ID, mTargetLevel);
|
||||
GetComponent<TMP_Text>("Image_BG/UI_RankLevel/Text_RankLevel02/fxValue02").text = Utils.CommonUtils.GetLocalizeText(targetCfg.Name);
|
||||
GetComponent<TMP_Text>("Image_BG/UI_RankLevel/Text_RankLevel02/fxValue02").text = CommonUtils.GetLocalizeText(targetCfg.Name);
|
||||
|
||||
|
||||
|
||||
|
|
@ -275,7 +276,7 @@ public class UIRankController : UIWindow
|
|||
{
|
||||
Text_RankLevel01.gameObject.SetActive(false);
|
||||
|
||||
Utils.CommonUtils.GetComponent<TMP_Text>(Text_RankLevel02.gameObject, "value02").text = Utils.CommonUtils.GetLocalizeText(oriCfg.Name);
|
||||
CommonUtils.GetComponent<TMP_Text>(Text_RankLevel02.gameObject, "value02").text = CommonUtils.GetLocalizeText(oriCfg.Name);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -285,13 +286,13 @@ public class UIRankController : UIWindow
|
|||
{
|
||||
|
||||
Text_RankLevel01.gameObject.SetActive(false);
|
||||
Utils.CommonUtils.GetComponent<TMP_Text>(Text_RankLevel02.gameObject, "value02").text = Utils.CommonUtils.GetLocalizeText(targetCfg.Name);
|
||||
CommonUtils.GetComponent<TMP_Text>(Text_RankLevel02.gameObject, "value02").text = CommonUtils.GetLocalizeText(targetCfg.Name);
|
||||
return;
|
||||
}
|
||||
Text_RankLevel01.gameObject.SetActive(true);
|
||||
Text_RankLevel02.gameObject.SetActive(true);
|
||||
Utils.CommonUtils.GetComponent<TMP_Text>(Text_RankLevel01.gameObject, "value01").text = Utils.CommonUtils.GetLocalizeText(oriCfg.Name);
|
||||
Utils.CommonUtils.GetComponent<TMP_Text>(Text_RankLevel02.gameObject, "value02").text = Utils.CommonUtils.GetLocalizeText(targetCfg.Name);
|
||||
CommonUtils.GetComponent<TMP_Text>(Text_RankLevel01.gameObject, "value01").text = CommonUtils.GetLocalizeText(oriCfg.Name);
|
||||
CommonUtils.GetComponent<TMP_Text>(Text_RankLevel02.gameObject, "value02").text = CommonUtils.GetLocalizeText(targetCfg.Name);
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -305,7 +306,7 @@ public class UIRankController : UIWindow
|
|||
{
|
||||
AssetManager.Instance.LoadAssetOnCallBack<Sprite>(breakCfg.IconPathLight, spr =>
|
||||
{
|
||||
Utils.CommonUtils.GetComponent<Image>(flag, "Icon").sprite = spr;
|
||||
CommonUtils.GetComponent<Image>(flag, "Icon").sprite = spr;
|
||||
});
|
||||
|
||||
|
||||
|
|
@ -314,11 +315,11 @@ public class UIRankController : UIWindow
|
|||
{
|
||||
AssetManager.Instance.LoadAssetOnCallBack<Sprite>(breakCfg.IconPathDark, spr =>
|
||||
{
|
||||
Utils.CommonUtils.GetComponent<Image>(flag, "Icon").sprite = spr;
|
||||
CommonUtils.GetComponent<Image>(flag, "Icon").sprite = spr;
|
||||
})
|
||||
;
|
||||
}
|
||||
Utils.CommonUtils.GetGameObject(flag, "RankLevel").SetActive(false);
|
||||
CommonUtils.GetGameObject(flag, "RankLevel").SetActive(false);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -376,8 +377,8 @@ public class UIRankController : UIWindow
|
|||
{
|
||||
maxSkill.SetActive(true);
|
||||
DataSkill skill = TableManager.Instance.Tables.SkillConfig.Get(mCharacterDataInfo.GetBreakPassiveId());
|
||||
GetComponent<TMP_Text>("Image_BG/UI_SkillInfo/MaxSkill/Text_SkillName01").text = Utils.CommonUtils.GetLocalizeText(skill.Name);
|
||||
GetComponent<TMP_Text>("Image_BG/UI_SkillInfo/MaxSkill/Text_SkillInfo01").text = Utils.CommonUtils.GetLocalizeText(skill.SkillDesc);
|
||||
GetComponent<TMP_Text>("Image_BG/UI_SkillInfo/MaxSkill/Text_SkillName01").text = CommonUtils.GetLocalizeText(skill.Name);
|
||||
GetComponent<TMP_Text>("Image_BG/UI_SkillInfo/MaxSkill/Text_SkillInfo01").text = CommonUtils.GetLocalizeText(skill.SkillDesc);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -397,8 +398,8 @@ public class UIRankController : UIWindow
|
|||
DataSkill skill = TableManager.Instance.Tables.SkillConfig.Get(mCharacterDataInfo.GetBreakPassiveId());
|
||||
Image_Skill_01.gameObject.SetActive(true);
|
||||
Image_Arrow.gameObject.SetActive(true);
|
||||
Text_SkillName01.text = Utils.CommonUtils.GetLocalizeText(skill.Name);
|
||||
Text_SkillInfo01.text = Utils.CommonUtils.GetLocalizeText(skill.SkillDesc);
|
||||
Text_SkillName01.text = CommonUtils.GetLocalizeText(skill.Name);
|
||||
Text_SkillInfo01.text = CommonUtils.GetLocalizeText(skill.SkillDesc);
|
||||
}
|
||||
|
||||
Image_Skill_02.gameObject.SetActive(true);
|
||||
|
|
@ -413,8 +414,8 @@ public class UIRankController : UIWindow
|
|||
else
|
||||
{
|
||||
DataSkill afterSkill = TableManager.Instance.Tables.SkillConfig.Get(cbreak.PassiveSkillID);
|
||||
Text_SkillName02.text = Utils.CommonUtils.GetLocalizeText(afterSkill.Name);
|
||||
Text_SkillInfo02.text = Utils.CommonUtils.GetLocalizeText(afterSkill.SkillDesc);
|
||||
Text_SkillName02.text = CommonUtils.GetLocalizeText(afterSkill.Name);
|
||||
Text_SkillInfo02.text = CommonUtils.GetLocalizeText(afterSkill.SkillDesc);
|
||||
}
|
||||
Image_Arrow.gameObject.SetActive(isArrowExist1 && isArrowExist2);
|
||||
|
||||
|
|
@ -457,17 +458,17 @@ public class UIRankController : UIWindow
|
|||
{
|
||||
|
||||
GameObject itemParent = FindObj(string.Format("Image_BG/UI_Materals/{0}", (i + 1).ToString()));
|
||||
Utils.CommonUtils.DestoryAllChildGameObject(Utils.CommonUtils.GetGameObject(itemParent, "item"));
|
||||
CommonUtils.DestoryAllChildGameObject(CommonUtils.GetGameObject(itemParent, "item"));
|
||||
|
||||
if ((i + 1) <= breakCfg.CostItems.Count)
|
||||
{
|
||||
itemParent.SetActive(true);
|
||||
|
||||
ItemObj itemObj = new ItemObj(breakCfg.CostItems[i].Id, Utils.CommonUtils.GetGameObject(itemParent, "item"));
|
||||
Utils.CommonUtils.GetComponent<TMP_Text>(itemParent, "value").text = Actor.Instance.Item.GetItemCount(breakCfg.CostItems[i].Id) + "/" + breakCfg.CostItems[i].Count;
|
||||
ItemObj itemObj = new ItemObj(breakCfg.CostItems[i].Id, CommonUtils.GetGameObject(itemParent, "item"));
|
||||
CommonUtils.GetComponent<TMP_Text>(itemParent, "value").text = Actor.Instance.Item.GetItemCount(breakCfg.CostItems[i].Id) + "/" + breakCfg.CostItems[i].Count;
|
||||
|
||||
Utils.CommonUtils.GetGameObject(itemParent, "Image_Red").SetActive(!(Actor.Instance.Item.GetItemCount(breakCfg.CostItems[i].Id) >= breakCfg.CostItems[i].Count));
|
||||
Utils.CommonUtils.GetGameObject(itemParent, "Image_Green02").SetActive(Actor.Instance.Item.GetItemCount(breakCfg.CostItems[i].Id) >= breakCfg.CostItems[i].Count);
|
||||
CommonUtils.GetGameObject(itemParent, "Image_Red").SetActive(!(Actor.Instance.Item.GetItemCount(breakCfg.CostItems[i].Id) >= breakCfg.CostItems[i].Count));
|
||||
CommonUtils.GetGameObject(itemParent, "Image_Green02").SetActive(Actor.Instance.Item.GetItemCount(breakCfg.CostItems[i].Id) >= breakCfg.CostItems[i].Count);
|
||||
|
||||
}
|
||||
else
|
||||
|
|
@ -483,7 +484,7 @@ public class UIRankController : UIWindow
|
|||
}
|
||||
private void RefreshBase()
|
||||
{
|
||||
Utils.CommonUtils.RefreshCharacter2DPic(Image_Poster, mCharacterDataInfo.Cfg.RoleID, Utils.CommonUtils.ECharacterPicPathType.LevelUp);
|
||||
CommonUtils.RefreshCharacter2DPic(Image_Poster, mCharacterDataInfo.Cfg.RoleID, CommonUtils.ECharacterPicPathType.LevelUp);
|
||||
Image_Poster.SetNativeSize();
|
||||
}
|
||||
private void RefreshChangeAttri()
|
||||
|
|
@ -546,27 +547,27 @@ public class UIRankController : UIWindow
|
|||
void RefreshUpperAttri(GameObject obj, float value, float addValue)
|
||||
{
|
||||
|
||||
Utils.CommonUtils.GetGameObject(obj, "noChange").SetActive(addValue == 0);
|
||||
Utils.CommonUtils.GetGameObject(obj, "Change").SetActive(addValue != 0);
|
||||
Utils.CommonUtils.GetComponent<TMP_Text>(obj, "Change/changeValue").text = "+" + addValue;
|
||||
Utils.CommonUtils.GetComponent<TMP_Text>(obj, "noChange/value").text = "+" + value;
|
||||
Utils.CommonUtils.GetComponent<TMP_Text>(obj, "Change/value").text = "+" + value;
|
||||
CommonUtils.GetGameObject(obj, "noChange").SetActive(addValue == 0);
|
||||
CommonUtils.GetGameObject(obj, "Change").SetActive(addValue != 0);
|
||||
CommonUtils.GetComponent<TMP_Text>(obj, "Change/changeValue").text = "+" + addValue;
|
||||
CommonUtils.GetComponent<TMP_Text>(obj, "noChange/value").text = "+" + value;
|
||||
CommonUtils.GetComponent<TMP_Text>(obj, "Change/value").text = "+" + value;
|
||||
|
||||
}
|
||||
void RefreshDownnerAttrt(GameObject obj, float value, float addValue, bool isPercent = false)
|
||||
{
|
||||
|
||||
Utils.CommonUtils.GetGameObject(obj, "noChange").SetActive(addValue == 0);
|
||||
Utils.CommonUtils.GetGameObject(obj, "Change").SetActive(addValue != 0);
|
||||
CommonUtils.GetGameObject(obj, "noChange").SetActive(addValue == 0);
|
||||
CommonUtils.GetGameObject(obj, "Change").SetActive(addValue != 0);
|
||||
if (!isPercent)
|
||||
{
|
||||
Utils.CommonUtils.GetComponent<TMP_Text>(obj, "Change/changeValue").text = "+" + string.Format("{0:F2}", addValue);
|
||||
Utils.CommonUtils.GetComponent<TMP_Text>(obj, "value").text = string.Format("{0:F2}", value);
|
||||
CommonUtils.GetComponent<TMP_Text>(obj, "Change/changeValue").text = "+" + string.Format("{0:F2}", addValue);
|
||||
CommonUtils.GetComponent<TMP_Text>(obj, "value").text = string.Format("{0:F2}", value);
|
||||
}
|
||||
else
|
||||
{
|
||||
Utils.CommonUtils.GetComponent<TMP_Text>(obj, "Change/changeValue").text = "+" + string.Format("{0:P1}", addValue);
|
||||
Utils.CommonUtils.GetComponent<TMP_Text>(obj, "value").text = string.Format("{0:P1}", value);
|
||||
CommonUtils.GetComponent<TMP_Text>(obj, "Change/changeValue").text = "+" + string.Format("{0:P1}", addValue);
|
||||
CommonUtils.GetComponent<TMP_Text>(obj, "value").text = string.Format("{0:P1}", value);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ using Framework;
|
|||
using NLDPB;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Gameplay;
|
||||
using PhxhSDK;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
|
|
@ -13,7 +14,7 @@ public class UISelectCharacterController : UIWindow
|
|||
{
|
||||
GameObject mFenLeiYiJuItemAssetObj;
|
||||
GameObject mCharacterItemAssetObj;
|
||||
Framework.PhxhScrollView _mCurrentScrollView = null;
|
||||
PhxhScrollView _mCurrentScrollView = null;
|
||||
private int mCurrentFraction =0;
|
||||
private int mCurrentJob = 0;
|
||||
CharacterSortType mCurrentSortType = CharacterSortType.EAll;
|
||||
|
|
@ -85,7 +86,7 @@ public class UISelectCharacterController : UIWindow
|
|||
BindButton("Image_BG/Button_Home", OnClickHome);
|
||||
|
||||
mCurrentScrollViewContentObj = FindObj("ScrollView_SelectCharacter/Viewport/Content");
|
||||
_mCurrentScrollView = GetComponent< Framework.PhxhScrollView>("ScrollView_SelectCharacter");
|
||||
_mCurrentScrollView = GetComponent<PhxhScrollView>("ScrollView_SelectCharacter");
|
||||
mRarityBtnObj = FindObj("Image_BG/Image_Menu/Button_Rarity");
|
||||
mLevelBtnObj = FindObj("Image_BG/Image_Menu/Button_Level");
|
||||
mOtherBtnObj = FindObj("Image_BG/Image_Menu/Button_AdvanceLevel");
|
||||
|
|
@ -149,19 +150,19 @@ public class UISelectCharacterController : UIWindow
|
|||
}
|
||||
if (!IfHaveJob((Ejob)change.value)&&(change.value!=0))
|
||||
{
|
||||
UIManager.Instance.ShowUITips(UINameConst.UIAirView, Utils.CommonUtils.GetLocalizeText("cultivate_notHaveFractionJob"));
|
||||
UIManager.Instance.ShowUITips(UINameConst.UIAirView, CommonUtils.GetLocalizeText("cultivate_notHaveFractionJob"));
|
||||
return;
|
||||
}
|
||||
|
||||
mCurrentJob = change.value;
|
||||
if(change.value==0)
|
||||
{
|
||||
Utils.CommonUtils.GetComponent<TMP_Text>(Utils.CommonUtils.GetGameObject(mJobBtnObj, "Text_Profession")).text = Utils.CommonUtils.GetLocalizeText("cultivate_AllJob"); ;
|
||||
CommonUtils.GetComponent<TMP_Text>(CommonUtils.GetGameObject(mJobBtnObj, "Text_Profession")).text = CommonUtils.GetLocalizeText("cultivate_AllJob"); ;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
Utils.CommonUtils.GetComponent<TMP_Text>(Utils.CommonUtils.GetGameObject(mJobBtnObj, "Text_Profession")).text =Utils.CommonUtils.GetLocalizeText( jobAttriCfg.Get(mCurrentJob).DisplayName);
|
||||
CommonUtils.GetComponent<TMP_Text>(CommonUtils.GetGameObject(mJobBtnObj, "Text_Profession")).text =CommonUtils.GetLocalizeText( jobAttriCfg.Get(mCurrentJob).DisplayName);
|
||||
|
||||
}
|
||||
SortList(mCurrentSortType);
|
||||
|
|
@ -176,8 +177,8 @@ public class UISelectCharacterController : UIWindow
|
|||
return;
|
||||
}
|
||||
mCurOtherBtnState = (CharacterSortType)(change.value+3);
|
||||
Utils.CommonUtils.GetComponent<TMP_Text>(mOtherBtnObj, "Text_Default").text =GetCharactererSortTypeLocalize((CharacterSortType)(change.value + 3));
|
||||
Utils.CommonUtils.GetComponent<TMP_Text>(mOtherBtnObj, "Text_Clip").text = GetCharactererSortTypeLocalize((CharacterSortType)(change.value + 3));
|
||||
CommonUtils.GetComponent<TMP_Text>(mOtherBtnObj, "Text_Default").text =GetCharactererSortTypeLocalize((CharacterSortType)(change.value + 3));
|
||||
CommonUtils.GetComponent<TMP_Text>(mOtherBtnObj, "Text_Clip").text = GetCharactererSortTypeLocalize((CharacterSortType)(change.value + 3));
|
||||
|
||||
RefreshBtn(mOtherBtnObj,true,true);
|
||||
}
|
||||
|
|
@ -190,19 +191,19 @@ public class UISelectCharacterController : UIWindow
|
|||
}
|
||||
if(!IfHaveFraction((Efaction)change.value) && (change.value != 0))
|
||||
{
|
||||
UIManager.Instance.ShowUITips(UINameConst.UIAirView, Utils.CommonUtils.GetLocalizeText("cultivate_notHaveFractionJob"));
|
||||
UIManager.Instance.ShowUITips(UINameConst.UIAirView, CommonUtils.GetLocalizeText("cultivate_notHaveFractionJob"));
|
||||
return;
|
||||
}
|
||||
mCurrentFraction = change.value;
|
||||
|
||||
if (change.value==0)
|
||||
{
|
||||
Utils.CommonUtils.GetComponent<TMP_Text>(Utils.CommonUtils.GetGameObject(mFactionBtnObj, "Text_Group")).text =Utils.CommonUtils.GetLocalizeText("cultivate_AllFraction");
|
||||
CommonUtils.GetComponent<TMP_Text>(CommonUtils.GetGameObject(mFactionBtnObj, "Text_Group")).text =CommonUtils.GetLocalizeText("cultivate_AllFraction");
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
Utils.CommonUtils.GetComponent<TMP_Text>(Utils.CommonUtils.GetGameObject(mFactionBtnObj, "Text_Group")).text =Utils.CommonUtils.GetLocalizeText( factionAttriCfg.Get(mCurrentFraction).DisplayName);
|
||||
CommonUtils.GetComponent<TMP_Text>(CommonUtils.GetGameObject(mFactionBtnObj, "Text_Group")).text =CommonUtils.GetLocalizeText( factionAttriCfg.Get(mCurrentFraction).DisplayName);
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -223,7 +224,7 @@ public class UISelectCharacterController : UIWindow
|
|||
{
|
||||
factionDropDown.ClearOptions();
|
||||
TMP_Dropdown.OptionData m_NewData1 = new TMP_Dropdown.OptionData();
|
||||
m_NewData1.text = Utils.CommonUtils.GetLocalizeText("cultivate_AllFraction");
|
||||
m_NewData1.text = CommonUtils.GetLocalizeText("cultivate_AllFraction");
|
||||
|
||||
factionDropDown.options.Add(m_NewData1);
|
||||
|
||||
|
|
@ -231,7 +232,7 @@ public class UISelectCharacterController : UIWindow
|
|||
{
|
||||
|
||||
TMP_Dropdown.OptionData m_NewData = new TMP_Dropdown.OptionData();
|
||||
m_NewData.text = Utils.CommonUtils.GetLocalizeText( factionAttriCfg.Get((int)factionItem).DisplayName);
|
||||
m_NewData.text = CommonUtils.GetLocalizeText( factionAttriCfg.Get((int)factionItem).DisplayName);
|
||||
factionDropDown.options.Add(m_NewData);
|
||||
|
||||
}
|
||||
|
|
@ -255,11 +256,11 @@ public class UISelectCharacterController : UIWindow
|
|||
switch (sortType)
|
||||
{
|
||||
case CharacterSortType.EAwake:
|
||||
return Utils.CommonUtils.GetLocalizeText("culitivate_AwakeLevel");
|
||||
return CommonUtils.GetLocalizeText("culitivate_AwakeLevel");
|
||||
case CharacterSortType.EBreak:
|
||||
return Utils.CommonUtils.GetLocalizeText("culitivate_BreakLevel");
|
||||
return CommonUtils.GetLocalizeText("culitivate_BreakLevel");
|
||||
case CharacterSortType.ELikely:
|
||||
return Utils.CommonUtils.GetLocalizeText("culitivate_likely");
|
||||
return CommonUtils.GetLocalizeText("culitivate_likely");
|
||||
}
|
||||
return "";
|
||||
|
||||
|
|
@ -400,8 +401,8 @@ public class UISelectCharacterController : UIWindow
|
|||
RegisterEvent();
|
||||
RefreshUI();
|
||||
CreateScrollView();
|
||||
Utils.CommonUtils.GetComponent<TMP_Text>(mOtherBtnObj, "Text_Default").text = GetCharactererSortTypeLocalize(CharacterSortType.EAwake);
|
||||
Utils.CommonUtils.GetComponent<TMP_Text>(mOtherBtnObj, "Text_Clip").text = GetCharactererSortTypeLocalize(CharacterSortType.EAwake);
|
||||
CommonUtils.GetComponent<TMP_Text>(mOtherBtnObj, "Text_Default").text = GetCharactererSortTypeLocalize(CharacterSortType.EAwake);
|
||||
CommonUtils.GetComponent<TMP_Text>(mOtherBtnObj, "Text_Clip").text = GetCharactererSortTypeLocalize(CharacterSortType.EAwake);
|
||||
|
||||
}
|
||||
private void CreateScrollView()
|
||||
|
|
@ -416,8 +417,8 @@ public class UISelectCharacterController : UIWindow
|
|||
{
|
||||
for (int i = 0; i < mStorageCharacterInfo.Count; i++)
|
||||
{
|
||||
string path = Utils.CommonUtils.GetCharacterPicPath(mStorageCharacterInfo[i].Cfg.RoleID,
|
||||
Utils.CommonUtils.ECharacterPicPathType.SelectCharacter);
|
||||
string path = CommonUtils.GetCharacterPicPath(mStorageCharacterInfo[i].Cfg.RoleID,
|
||||
CommonUtils.ECharacterPicPathType.SelectCharacter);
|
||||
AssetManager.Instance.PostPreload<Sprite>(path);
|
||||
}
|
||||
}
|
||||
|
|
@ -433,25 +434,25 @@ public class UISelectCharacterController : UIWindow
|
|||
{
|
||||
if(IsSeleted)
|
||||
{
|
||||
Utils.CommonUtils.GetGameObject(btnObj, "Image_Default/Image_UP").SetActive(IsSmall2Big);
|
||||
Utils.CommonUtils.GetGameObject(btnObj, "Image_Default/Image_Down").SetActive(!IsSmall2Big);
|
||||
CommonUtils.GetGameObject(btnObj, "Image_Default/Image_UP").SetActive(IsSmall2Big);
|
||||
CommonUtils.GetGameObject(btnObj, "Image_Default/Image_Down").SetActive(!IsSmall2Big);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
Utils.CommonUtils.GetGameObject(btnObj, "Image_Default/Image_UP").SetActive(false);
|
||||
Utils.CommonUtils.GetGameObject(btnObj, "Image_Default/Image_Down").SetActive(!false);
|
||||
CommonUtils.GetGameObject(btnObj, "Image_Default/Image_UP").SetActive(false);
|
||||
CommonUtils.GetGameObject(btnObj, "Image_Default/Image_Down").SetActive(!false);
|
||||
|
||||
}
|
||||
if (!isLast)
|
||||
{
|
||||
Utils.CommonUtils.GetGameObject(btnObj, "Text_Default/Text_Clip").SetActive(IsSeleted);
|
||||
CommonUtils.GetGameObject(btnObj, "Text_Default/Text_Clip").SetActive(IsSeleted);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
Utils.CommonUtils.GetGameObject(btnObj, "Text_Clip").SetActive(IsSeleted);
|
||||
Utils.CommonUtils.GetGameObject(btnObj, "Text_Default").SetActive(!IsSeleted);
|
||||
CommonUtils.GetGameObject(btnObj, "Text_Clip").SetActive(IsSeleted);
|
||||
CommonUtils.GetGameObject(btnObj, "Text_Default").SetActive(!IsSeleted);
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -529,11 +530,11 @@ public class UISelectCharacterController : UIWindow
|
|||
{
|
||||
for (int i = 0; i < 6; i++)
|
||||
{
|
||||
GameObject singleObj = Utils.CommonUtils.GetGameObject(obj, (i + 1).ToString());
|
||||
GameObject singleObj = CommonUtils.GetGameObject(obj, (i + 1).ToString());
|
||||
if (singleObj != null)
|
||||
{
|
||||
ClearBind(Utils.CommonUtils.GetGameObject(singleObj, "Image_Poster"));
|
||||
BindButton<GameObject>(Utils.CommonUtils.GetGameObject(singleObj, "Image_Poster"), On2DPicClick, singleObj);
|
||||
ClearBind(CommonUtils.GetGameObject(singleObj, "Image_Poster"));
|
||||
BindButton<GameObject>(CommonUtils.GetGameObject(singleObj, "Image_Poster"), On2DPicClick, singleObj);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -561,7 +562,7 @@ public class UISelectCharacterController : UIWindow
|
|||
|
||||
if (null != mCurrentScrollViewContentObj)
|
||||
{
|
||||
Utils.CommonUtils.DestoryAllChildGameObject(mCurrentScrollViewContentObj);
|
||||
CommonUtils.DestoryAllChildGameObject(mCurrentScrollViewContentObj);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -697,7 +698,7 @@ public class UISelectCharacterController : UIWindow
|
|||
item.gameObject.SetActive(true);
|
||||
for (int i = 0; i < 6; i++)
|
||||
{
|
||||
GameObject singleItem = Utils.CommonUtils.GetGameObject(item.gameObject, (i + 1).ToString());
|
||||
GameObject singleItem = CommonUtils.GetGameObject(item.gameObject, (i + 1).ToString());
|
||||
if (index * 6 + i < mShowList.Count)
|
||||
{
|
||||
singleItem.SetActive(true);
|
||||
|
|
@ -731,20 +732,20 @@ public class UISelectCharacterController : UIWindow
|
|||
private async void RefreshSingleItem(GameObject go, CharacterDataInfo dataInfo)
|
||||
{
|
||||
|
||||
Utils.CommonUtils.GetComponent<Image>(go, "Image_Poster/Image_Rect/Image_LevelBar").fillAmount = (float)dataInfo.Level / characterBreakCfg.Get(dataInfo.Cfg.RoleID, (int)dataInfo.BreakLevel).LevelLimit;
|
||||
Utils.CommonUtils.GetComponent<TMP_Text>(go, "Image_Poster/Image_Rect/Image_LevelBar/Text_Level").text = dataInfo.Level.ToString();
|
||||
Utils.CommonUtils.GetComponent<Image>(go, "Image_Poster/Image_Rect/Image_ProfessionLogo").sprite = await AssetManager.GetSingleton().LoadAssetAsync<Sprite>(TableManager.Instance.Tables.JobAttri.GetOrDefault((int)dataInfo.Cfg.Job).IconPath);
|
||||
Utils.CommonUtils.GetComponent<TMP_Text>(go, "Image_Poster/Image_ColorCover/Image_CharacterName/Text_CharacterName").text =Utils.CommonUtils.GetLocalizeText( dataInfo.Cfg.Name);
|
||||
CommonUtils.GetComponent<Image>(go, "Image_Poster/Image_Rect/Image_LevelBar").fillAmount = (float)dataInfo.Level / characterBreakCfg.Get(dataInfo.Cfg.RoleID, (int)dataInfo.BreakLevel).LevelLimit;
|
||||
CommonUtils.GetComponent<TMP_Text>(go, "Image_Poster/Image_Rect/Image_LevelBar/Text_Level").text = dataInfo.Level.ToString();
|
||||
CommonUtils.GetComponent<Image>(go, "Image_Poster/Image_Rect/Image_ProfessionLogo").sprite = await AssetManager.GetSingleton().LoadAssetAsync<Sprite>(TableManager.Instance.Tables.JobAttri.GetOrDefault((int)dataInfo.Cfg.Job).IconPath);
|
||||
CommonUtils.GetComponent<TMP_Text>(go, "Image_Poster/Image_ColorCover/Image_CharacterName/Text_CharacterName").text =CommonUtils.GetLocalizeText( dataInfo.Cfg.Name);
|
||||
|
||||
Utils.CommonUtils.GetComponent<Image>(go, "Image_Mask").gameObject.SetActive(_curOpenType == OpenType.EditTeam && _curTeam.IsCharacterInTeam(dataInfo.Uid));
|
||||
CommonUtils.GetComponent<Image>(go, "Image_Mask").gameObject.SetActive(_curOpenType == OpenType.EditTeam && _curTeam.IsCharacterInTeam(dataInfo.Uid));
|
||||
|
||||
var cmp = Utils.CommonUtils.GetComponent<Image>(go, "Image_Poster");
|
||||
Utils.CommonUtils.RefreshCharacter2DPic(cmp,dataInfo.Cfg.RoleID, Utils.CommonUtils.ECharacterPicPathType.SelectCharacter);
|
||||
var cmp = CommonUtils.GetComponent<Image>(go, "Image_Poster");
|
||||
CommonUtils.RefreshCharacter2DPic(cmp,dataInfo.Cfg.RoleID, CommonUtils.ECharacterPicPathType.SelectCharacter);
|
||||
|
||||
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
GameObject starGo = Utils.CommonUtils.GetGameObject(go, string.Format("Image_Poster/Image_ColorCover/Image_CharacterName/Stars/{0}", i + 1));
|
||||
GameObject starGo = CommonUtils.GetGameObject(go, string.Format("Image_Poster/Image_ColorCover/Image_CharacterName/Stars/{0}", i + 1));
|
||||
if ((i + 1) < dataInfo.Cfg.StartStar)
|
||||
{
|
||||
starGo.SetActive(true);
|
||||
|
|
@ -785,7 +786,7 @@ public class UISelectCharacterController : UIWindow
|
|||
int count = mShowList.Count + 1;
|
||||
for (int i = 0; i < 6; i++)
|
||||
{
|
||||
GameObject singleItem = Utils.CommonUtils.GetGameObject(item.gameObject, (i + 1).ToString());
|
||||
GameObject singleItem = CommonUtils.GetGameObject(item.gameObject, (i + 1).ToString());
|
||||
if (index * 6 + i < count)
|
||||
{
|
||||
singleItem.SetActive(true);
|
||||
|
|
@ -814,9 +815,9 @@ public class UISelectCharacterController : UIWindow
|
|||
int realIdx = idx - 1;
|
||||
if (realIdx < 0)
|
||||
{
|
||||
Utils.CommonUtils.GetGameObject(go, "Image_Poster").SetActive(false);
|
||||
Utils.CommonUtils.GetGameObject(go, "Image_Mask").SetActive(false);
|
||||
Utils.CommonUtils.GetGameObject(go, "Image_Clear").SetActive(true);
|
||||
CommonUtils.GetGameObject(go, "Image_Poster").SetActive(false);
|
||||
CommonUtils.GetGameObject(go, "Image_Mask").SetActive(false);
|
||||
CommonUtils.GetGameObject(go, "Image_Clear").SetActive(true);
|
||||
var imgBg = go.GetComponent<Image>();
|
||||
if (imgBg)
|
||||
{
|
||||
|
|
@ -830,11 +831,11 @@ public class UISelectCharacterController : UIWindow
|
|||
RefreshSingleItem(go, charDataInfo);
|
||||
if (_curTeam.IsCharacterInTeam(charDataInfo.Uid))
|
||||
{
|
||||
Utils.CommonUtils.GetGameObject(go, "Image_Mask").SetActive(true);
|
||||
CommonUtils.GetGameObject(go, "Image_Mask").SetActive(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
Utils.CommonUtils.GetGameObject(go, "Image_Mask").SetActive(false);
|
||||
CommonUtils.GetGameObject(go, "Image_Mask").SetActive(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -859,19 +860,19 @@ public class UISelectCharacterController : UIWindow
|
|||
{
|
||||
for (int i = 0; i < 6; i++)
|
||||
{
|
||||
GameObject singleObj = Utils.CommonUtils.GetGameObject(obj, (i + 1).ToString());
|
||||
GameObject singleObj = CommonUtils.GetGameObject(obj, (i + 1).ToString());
|
||||
if (singleObj != null)
|
||||
{
|
||||
ClearBind(Utils.CommonUtils.GetGameObject(singleObj, "Image_Poster"));
|
||||
var go = Utils.CommonUtils.GetGameObject(singleObj, "Image_Clear");
|
||||
ClearBind(CommonUtils.GetGameObject(singleObj, "Image_Poster"));
|
||||
var go = CommonUtils.GetGameObject(singleObj, "Image_Clear");
|
||||
if (go != null)
|
||||
{
|
||||
ClearBind(Utils.CommonUtils.GetGameObject(singleObj, "Image_Clear"));
|
||||
BindButton<GameObject>(Utils.CommonUtils.GetGameObject(singleObj, "Image_Clear"), OnClickHeadClear, singleObj);
|
||||
ClearBind(CommonUtils.GetGameObject(singleObj, "Image_Clear"));
|
||||
BindButton<GameObject>(CommonUtils.GetGameObject(singleObj, "Image_Clear"), OnClickHeadClear, singleObj);
|
||||
}
|
||||
else
|
||||
{
|
||||
BindButton<GameObject>(Utils.CommonUtils.GetGameObject(singleObj, "Image_Poster"), OnClickHeadTeam_Edit, singleObj);
|
||||
BindButton<GameObject>(CommonUtils.GetGameObject(singleObj, "Image_Poster"), OnClickHeadTeam_Edit, singleObj);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ using Gameplay.Net;
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Gameplay;
|
||||
using PhxhSDK;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
|
|
@ -133,7 +134,7 @@ public class UISkill_LevelUpController : UIWindow
|
|||
RefreshSkillInfos();
|
||||
maxSkill.SetActive(true);
|
||||
PlayAnimation("Skill_LevelUp_Max");
|
||||
float waitTime = Utils.CommonUtils.GetAnimatorLength(mAnimatior, "Skill_LevelUp_Max");
|
||||
float waitTime = PhxhSDK.Utils.GetAnimatorLength(mAnimatior, "Skill_LevelUp_Max");
|
||||
coroutine = WaitTimeRefreshMax(waitTime);
|
||||
StartCoroutine(coroutine);
|
||||
|
||||
|
|
@ -142,7 +143,7 @@ public class UISkill_LevelUpController : UIWindow
|
|||
{
|
||||
RefresMaxSkill();
|
||||
PlayAnimation("Skill_LevelUp_01");
|
||||
float waitTime = Utils.CommonUtils.GetAnimatorLength(mAnimatior, "Skill_LevelUp_01");
|
||||
float waitTime = PhxhSDK.Utils.GetAnimatorLength(mAnimatior, "Skill_LevelUp_01");
|
||||
coroutine = WaitTimeRefresh(waitTime);
|
||||
StartCoroutine(coroutine);
|
||||
RefreshUI();
|
||||
|
|
@ -182,7 +183,7 @@ public class UISkill_LevelUpController : UIWindow
|
|||
yield return new WaitForSeconds(time);
|
||||
RefreshUI();
|
||||
PlayAnimation("Skill_LevelUp_02");
|
||||
float waitTime = Utils.CommonUtils.GetAnimatorLength(mAnimatior, "Skill_LevelUp_02");
|
||||
float waitTime = PhxhSDK.Utils.GetAnimatorLength(mAnimatior, "Skill_LevelUp_02");
|
||||
coroutine = WaitTimeRefresh2(waitTime);
|
||||
StartCoroutine(coroutine);
|
||||
|
||||
|
|
@ -225,7 +226,7 @@ public class UISkill_LevelUpController : UIWindow
|
|||
RefreshUI();
|
||||
RegisterEvent();
|
||||
ResetAnimator();
|
||||
Utils.CommonUtils.SetImageBlur(GetComponent<Image>("blurObj"));
|
||||
CommonUtils.SetImageBlur(GetComponent<Image>("blurObj"));
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -263,7 +264,7 @@ public class UISkill_LevelUpController : UIWindow
|
|||
|
||||
if (IsMaxSkillLevel())
|
||||
{
|
||||
RefreshSingleSkill(nowSkill, Utils.CommonUtils.GetGameObject(maxSkill, "UI_Max_SkillUp"), (int)mCharacterData.UltraSkillLevel);
|
||||
RefreshSingleSkill(nowSkill, CommonUtils.GetGameObject(maxSkill, "UI_Max_SkillUp"), (int)mCharacterData.UltraSkillLevel);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -301,17 +302,17 @@ public class UISkill_LevelUpController : UIWindow
|
|||
}
|
||||
void RefreshSingleSkill(DataSkill skillCfg, GameObject obj, int skillLv)
|
||||
{
|
||||
Utils.CommonUtils.GetComponent<TMP_Text>(obj, "Text_SkillName").text = Utils.CommonUtils.GetLocalizeText(skillCfg.Name);
|
||||
Utils.CommonUtils.GetComponent<TMP_Text>(obj, "Text_Second_Value").text = skillCfg.CDTime.ToString();
|
||||
Utils.CommonUtils.GetComponent<TMP_Text>(obj, "Text_SkillInfo").text = skillCfg.SkillDesc.ToString();
|
||||
Utils.CommonUtils.GetComponent<TMP_Text>(obj, "Text_Class_Value").text = Utils.CommonUtils.GetRomanCode(skillLv);
|
||||
CommonUtils.GetComponent<TMP_Text>(obj, "Text_SkillName").text = CommonUtils.GetLocalizeText(skillCfg.Name);
|
||||
CommonUtils.GetComponent<TMP_Text>(obj, "Text_Second_Value").text = skillCfg.CDTime.ToString();
|
||||
CommonUtils.GetComponent<TMP_Text>(obj, "Text_SkillInfo").text = skillCfg.SkillDesc.ToString();
|
||||
CommonUtils.GetComponent<TMP_Text>(obj, "Text_Class_Value").text = CommonUtils.GetRomanCode(skillLv);
|
||||
|
||||
|
||||
}
|
||||
void RefreshBaseInfo()
|
||||
{
|
||||
AssetManager.Instance.LoadAssetOnCallBack<Sprite>(nowSkill.IconPath, OnIconLoaded);
|
||||
Text_Logo_SkillName.text = Utils.CommonUtils.GetLocalizeText(nowSkill.Name);
|
||||
Text_Logo_SkillName.text = CommonUtils.GetLocalizeText(nowSkill.Name);
|
||||
}
|
||||
|
||||
private void OnIconLoaded(Sprite sprite)
|
||||
|
|
@ -358,17 +359,17 @@ public class UISkill_LevelUpController : UIWindow
|
|||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
GameObject itemParent = FindObj(string.Format("Image_BG/UI_Materals/{0}", (i + 1).ToString()));
|
||||
Utils.CommonUtils.DestoryAllChildGameObject( Utils.CommonUtils.GetGameObject( itemParent,"item"));
|
||||
CommonUtils.DestoryAllChildGameObject( CommonUtils.GetGameObject( itemParent,"item"));
|
||||
|
||||
if ((i + 1) <= tempUse.Count)
|
||||
{
|
||||
itemParent.SetActive(true);
|
||||
|
||||
ItemObj itemObj = new ItemObj(tempUse[i].Item1, Utils.CommonUtils.GetGameObject(itemParent, "item"));
|
||||
Utils.CommonUtils.GetComponent<TMP_Text>(itemParent, "value").text = Actor.Instance.Item.GetItemCount(tempUse[i].Item1) + "/" + tempUse[i].Item2;
|
||||
ItemObj itemObj = new ItemObj(tempUse[i].Item1, CommonUtils.GetGameObject(itemParent, "item"));
|
||||
CommonUtils.GetComponent<TMP_Text>(itemParent, "value").text = Actor.Instance.Item.GetItemCount(tempUse[i].Item1) + "/" + tempUse[i].Item2;
|
||||
|
||||
Utils.CommonUtils.GetGameObject(itemParent, "Image_Red").SetActive(!(Actor.Instance.Item.GetItemCount(tempUse[i].Item1) >= tempUse[i].Item2));
|
||||
Utils.CommonUtils.GetGameObject(itemParent, "Image_Green02").SetActive(Actor.Instance.Item.GetItemCount(tempUse[i].Item1) >= tempUse[i].Item2);
|
||||
CommonUtils.GetGameObject(itemParent, "Image_Red").SetActive(!(Actor.Instance.Item.GetItemCount(tempUse[i].Item1) >= tempUse[i].Item2));
|
||||
CommonUtils.GetGameObject(itemParent, "Image_Green02").SetActive(Actor.Instance.Item.GetItemCount(tempUse[i].Item1) >= tempUse[i].Item2);
|
||||
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ using NLDPB;
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Gameplay;
|
||||
using PhxhSDK;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
|
|
@ -234,10 +235,10 @@ public class UI_CultivateController : UIWindow
|
|||
{
|
||||
if (mCurCharaData.AwakeLevel >= mCurCharaData.GetMaxAwakeLevel())
|
||||
{
|
||||
UIManager.Instance.ShowUITips(UINameConst.UIAirView, Utils.CommonUtils.GetLocalizeText("cultivate_AwakePassiveSkill"));
|
||||
UIManager.Instance.ShowUITips(UINameConst.UIAirView, CommonUtils.GetLocalizeText("cultivate_AwakePassiveSkill"));
|
||||
return;
|
||||
}
|
||||
Utils.CommonUtils.CaptureScreenshot();
|
||||
CommonUtils.CaptureScreenshot();
|
||||
await UIManager.Instance.OpenWindow(UINameConst.UIAdvance, mCurCharaData);
|
||||
|
||||
ControllInput(false);
|
||||
|
|
@ -247,10 +248,10 @@ public class UI_CultivateController : UIWindow
|
|||
{
|
||||
if (mCurCharaData.BreakLevel >= mCurCharaData.GetMaxBreakLevel())
|
||||
{
|
||||
UIManager.Instance.ShowUITips(UINameConst.UIAirView, Utils.CommonUtils.GetLocalizeText("cultivate_BreakPassiveSkillMax"));
|
||||
UIManager.Instance.ShowUITips(UINameConst.UIAirView, CommonUtils.GetLocalizeText("cultivate_BreakPassiveSkillMax"));
|
||||
return;
|
||||
}
|
||||
Utils.CommonUtils.CaptureScreenshot();
|
||||
CommonUtils.CaptureScreenshot();
|
||||
await UIManager.Instance.OpenWindow(UINameConst.UIRank, mCurCharaData);
|
||||
ControllInput(false);
|
||||
}
|
||||
|
|
@ -405,7 +406,7 @@ public class UI_CultivateController : UIWindow
|
|||
|
||||
private async void OnRecvEventOpenFavorableUI()
|
||||
{
|
||||
Utils.CommonUtils.CaptureScreenshot();
|
||||
CommonUtils.CaptureScreenshot();
|
||||
await UIManager.Instance.OpenWindow(UINameConst.UIFavorable,mCurCharaData);
|
||||
ControllInput(false);
|
||||
}
|
||||
|
|
@ -447,10 +448,10 @@ public class UI_CultivateController : UIWindow
|
|||
|
||||
if (mCurCharaData.UltraSkillLevel >= GetSkillMaxLevel())
|
||||
{
|
||||
UIManager.Instance.ShowUITips(UINameConst.UIAirView, string.Format(Utils.CommonUtils.GetLocalizeText("cultivate_UltraSkillMax"), nowSkillCfg.Name));
|
||||
UIManager.Instance.ShowUITips(UINameConst.UIAirView, string.Format(CommonUtils.GetLocalizeText("cultivate_UltraSkillMax"), nowSkillCfg.Name));
|
||||
return;
|
||||
}
|
||||
Utils.CommonUtils.CaptureScreenshot();
|
||||
CommonUtils.CaptureScreenshot();
|
||||
await UIManager.Instance.OpenWindow(UINameConst.UISkill_LevelUp, mCurCharaData);
|
||||
ControllInput(false);
|
||||
}
|
||||
|
|
@ -490,7 +491,7 @@ public class UI_CultivateController : UIWindow
|
|||
|
||||
private async void OnButton_LookClick()
|
||||
{
|
||||
Utils.CommonUtils.CaptureScreenshot();
|
||||
CommonUtils.CaptureScreenshot();
|
||||
await UIManager.Instance.OpenWindow(UINameConst.UIPoster, mCurCharaData);
|
||||
|
||||
ControllInput(false);
|
||||
|
|
@ -529,8 +530,8 @@ public class UI_CultivateController : UIWindow
|
|||
|
||||
private void RefreshMiddle()
|
||||
{
|
||||
Utils.CommonUtils.RefreshCharacter2DPic(character2dPic, mCurCharaData.Cfg.RoleID, Utils.CommonUtils.ECharacterPicPathType.Cultivate);
|
||||
Text_CharacterName.text = Utils.CommonUtils.GetLocalizeText(mCurCharaData.Cfg.Name);
|
||||
CommonUtils.RefreshCharacter2DPic(character2dPic, mCurCharaData.Cfg.RoleID, CommonUtils.ECharacterPicPathType.Cultivate);
|
||||
Text_CharacterName.text = CommonUtils.GetLocalizeText(mCurCharaData.Cfg.Name);
|
||||
string fractionPath = factionAttriCfg.GetOrDefault((int)(characterAttriCfg.Get(mCurCharaData.Cfg.RoleID).Fraction)).IconPath;
|
||||
AssetManager.Instance.LoadAssetOnCallBack<Sprite>(fractionPath, fractionSpr =>
|
||||
{
|
||||
|
|
@ -595,7 +596,7 @@ public class UI_CultivateController : UIWindow
|
|||
|
||||
Text_CDTme.text = nowSkillCfg.CDTime.ToString();
|
||||
Image_Max.gameObject.SetActive(mCurCharaData.UltraSkillLevel >= mCurCharaData.GetMaxUltralSkillLevel());
|
||||
Text_ActiveSkillName.text = Utils.CommonUtils.GetLocalizeText(nowSkillCfg.Name);
|
||||
Text_ActiveSkillName.text = CommonUtils.GetLocalizeText(nowSkillCfg.Name);
|
||||
|
||||
AssetManager.Instance.LoadAssetOnCallBack<Sprite>(nowSkillCfg.IconPath, skillIcon =>
|
||||
{
|
||||
|
|
@ -609,7 +610,7 @@ public class UI_CultivateController : UIWindow
|
|||
if (i < showSkillBars.Count)
|
||||
{
|
||||
obj.SetActive(true);
|
||||
Utils.CommonUtils.GetComponent<TMP_Text>(obj, "skillName").text = Utils.CommonUtils.GetLocalizeText((showSkillBars[i].Cfg.Name));
|
||||
CommonUtils.GetComponent<TMP_Text>(obj, "skillName").text = CommonUtils.GetLocalizeText((showSkillBars[i].Cfg.Name));
|
||||
string colorSprStr;
|
||||
if (showSkillBars[i].IsBreak)
|
||||
{
|
||||
|
|
@ -626,38 +627,38 @@ public class UI_CultivateController : UIWindow
|
|||
}
|
||||
|
||||
}
|
||||
GetComponent<TMP_Text>("Image_BG/UI_Cultivate_ActSk/Image_UI_Cultivate_ActiveSkill/Text_Class/Text_Class_Value").text = Utils.CommonUtils.GetRomanCode((int)mCurCharaData.UltraSkillLevel);
|
||||
GetComponent<TMP_Text>("Image_BG/UI_Cultivate_ActSk/Image_UI_Cultivate_ActiveSkill/Text_Class/Text_Class_Value").text = CommonUtils.GetRomanCode((int)mCurCharaData.UltraSkillLevel);
|
||||
|
||||
|
||||
//不考虑被动技能没有的情况,后面加
|
||||
GameObject mainSkillOpenObj = FindObj("Image_BG/UI_Cultivate_ActSk/Image_UI_Cultivate_ActiveSkill_Open");
|
||||
Utils.CommonUtils.GetGameObject(mainSkillOpenObj, "Image_Max").SetActive(mCurCharaData.UltraSkillLevel >= mCurCharaData.GetMaxUltralSkillLevel());
|
||||
CommonUtils.GetGameObject(mainSkillOpenObj, "Image_Max").SetActive(mCurCharaData.UltraSkillLevel >= mCurCharaData.GetMaxUltralSkillLevel());
|
||||
AssetManager.Instance.LoadAssetOnCallBack<Sprite>(nowSkillCfg.IconPath, skillIcon =>
|
||||
{
|
||||
Image_SkillLogo_Open.sprite = skillIcon;
|
||||
});
|
||||
Text_CDTmeOpen.text = nowSkillCfg.CDTime.ToString();
|
||||
Text_ActiveSkillNameOpen.text = Utils.CommonUtils.GetLocalizeText(nowSkillCfg.Name);
|
||||
Text_ActiveSkill_InfoOpen.text = Utils.CommonUtils.GetLocalizeText(nowSkillCfg.SkillDesc);
|
||||
Text_ActiveSkillNameOpen.text = CommonUtils.GetLocalizeText(nowSkillCfg.Name);
|
||||
Text_ActiveSkill_InfoOpen.text = CommonUtils.GetLocalizeText(nowSkillCfg.SkillDesc);
|
||||
GameObject sumObj = FindObj("Image_BG/UI_Cultivate_ActSk/Image_UI_Cultivate_ActiveSkill_Open/Text_ActiveSkill_Info/Text_PassiveSkill");
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
GameObject obj =Utils.CommonUtils.GetGameObject(sumObj,(i+1).ToString());
|
||||
GameObject obj =CommonUtils.GetGameObject(sumObj,(i+1).ToString());
|
||||
if (i < showSkillBars.Count)
|
||||
{
|
||||
obj.SetActive(true);
|
||||
Utils.CommonUtils.GetComponent<TMP_Text>(obj, "skillName").text = Utils.CommonUtils.GetLocalizeText(Utils.CommonUtils.GetLocalizeText(showSkillBars[i].Cfg.Name));
|
||||
Utils.CommonUtils.GetComponent<TMP_Text>(obj, "skillinfo").text = Utils.CommonUtils.GetLocalizeText(Utils.CommonUtils.GetLocalizeText(showSkillBars[i].Cfg.SkillDesc));
|
||||
CommonUtils.GetComponent<TMP_Text>(obj, "skillName").text = CommonUtils.GetLocalizeText(CommonUtils.GetLocalizeText(showSkillBars[i].Cfg.Name));
|
||||
CommonUtils.GetComponent<TMP_Text>(obj, "skillinfo").text = CommonUtils.GetLocalizeText(CommonUtils.GetLocalizeText(showSkillBars[i].Cfg.SkillDesc));
|
||||
|
||||
string colorSprStr;
|
||||
if (showSkillBars[i].IsBreak)
|
||||
{
|
||||
Utils.CommonUtils.GetComponent<TMP_Text>(obj, "tip").text = Utils.CommonUtils.GetLocalizeText("cultivate_UpBreakLevelTips");
|
||||
CommonUtils.GetComponent<TMP_Text>(obj, "tip").text = CommonUtils.GetLocalizeText("cultivate_UpBreakLevelTips");
|
||||
colorSprStr = "Assets/Art/UI/Texture/UI_Pic_Main/UI_Pic_CultivateAll/UI_SkillLevelUp/UI_Blue.png";
|
||||
}
|
||||
else
|
||||
{
|
||||
Utils.CommonUtils.GetComponent<TMP_Text>(obj, "tip").text = Utils.CommonUtils.GetLocalizeText("cultivate_UpAwakeLevelTips");
|
||||
CommonUtils.GetComponent<TMP_Text>(obj, "tip").text = CommonUtils.GetLocalizeText("cultivate_UpAwakeLevelTips");
|
||||
colorSprStr = "Assets/Art/UI/Texture/UI_Pic_Main/UI_Pic_CultivateAll/UI_SkillLevelUp/UI_Brown.png";
|
||||
}
|
||||
obj.GetComponent<Image>().sprite = await AssetManager.Instance.LoadAssetAsync<Sprite>(colorSprStr);
|
||||
|
|
@ -697,7 +698,7 @@ public class UI_CultivateController : UIWindow
|
|||
FindObj(string.Format("Image_BG/UI_Cultivate_ActSk/Image_UI_Cultivate_ActiveSkill_Open")).GetComponent<RectTransform>().sizeDelta = new Vector2(598, wholeBarHeight);
|
||||
|
||||
|
||||
GetComponent<TMP_Text>("Image_BG/UI_Cultivate_ActSk/Image_UI_Cultivate_ActiveSkill_Open/Text_Class/Text_Class_Value").text = Utils.CommonUtils.GetRomanCode((int)mCurCharaData.UltraSkillLevel);
|
||||
GetComponent<TMP_Text>("Image_BG/UI_Cultivate_ActSk/Image_UI_Cultivate_ActiveSkill_Open/Text_Class/Text_Class_Value").text = CommonUtils.GetRomanCode((int)mCurCharaData.UltraSkillLevel);
|
||||
|
||||
|
||||
|
||||
|
|
@ -737,7 +738,7 @@ public class UI_CultivateController : UIWindow
|
|||
|
||||
private async void RefreshAwakeBtn()
|
||||
{
|
||||
Text_Advance.text = Utils.CommonUtils.GetLocalizeText("culitivate_AwakeLevel");
|
||||
Text_Advance.text = CommonUtils.GetLocalizeText("culitivate_AwakeLevel");
|
||||
|
||||
|
||||
for (int i = 0; i < Constants.ADVANCE_FLAG_UI; i++)
|
||||
|
|
@ -846,7 +847,7 @@ public class UI_CultivateController : UIWindow
|
|||
|
||||
private async void OnButton_LevelUpClick()
|
||||
{
|
||||
Utils.CommonUtils.CaptureScreenshot();
|
||||
CommonUtils.CaptureScreenshot();
|
||||
|
||||
await UIManager.Instance.OpenWindow(UINameConst.UILevelUp, mCurCharaData);
|
||||
ControllInput(false);
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
using NLDPB;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using Gameplay;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using Button = UnityEngine.UI.Button;
|
||||
|
|
@ -132,7 +133,7 @@ public class UI_Cultivate_DetailController : UIWindow
|
|||
SetCharacterInfo(data as CharacterDataInfo);
|
||||
RefreshInfos();
|
||||
PlayAnimation("DetailChangeOut");
|
||||
float waitTime = Utils.CommonUtils.GetAnimatorLength(mAnimator, "DetailChangeOut");
|
||||
float waitTime = PhxhSDK.Utils.GetAnimatorLength(mAnimator, "DetailChangeOut");
|
||||
_coroutine = WaitTimeRefresh(waitTime);
|
||||
StartCoroutine(_coroutine);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,8 +3,10 @@ using Framework;
|
|||
using NLDPB;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using Gameplay;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using PhxhSDK;
|
||||
using Button = UnityEngine.UI.Button;
|
||||
using Image = UnityEngine.UI.Image;
|
||||
|
||||
|
|
@ -114,7 +116,7 @@ public class UI_Cultivate_ProAndInfoController : UIWindow
|
|||
StopAllCoroutines();
|
||||
SetCharacterInfo(info as CharacterDataInfo);
|
||||
PlayAnimation("ProAndInfo_ChangeOut");
|
||||
float waitTime = Utils.CommonUtils.GetAnimatorLength(mAnimator, "ProAndInfo_ChangeOut");
|
||||
float waitTime = PhxhSDK.Utils.GetAnimatorLength(mAnimator, "ProAndInfo_ChangeOut");
|
||||
coroutine = WaitTimeRefresh(waitTime);
|
||||
StartCoroutine(coroutine);
|
||||
|
||||
|
|
@ -189,9 +191,9 @@ public class UI_Cultivate_ProAndInfoController : UIWindow
|
|||
Text_Defense_Value.text =mCharacterInfo.Defence().ToString();
|
||||
Text_Speed_Value.text =mCharacterInfo.MoveSpeed().ToString();
|
||||
Text_Morale_Value.text = mCharacterInfo.Cfg.MaxMorale.ToString();
|
||||
Text_Profession_Info.text =Utils.CommonUtils.GetLocalizeText( jobAttri.Get( (int)mCharacterInfo.Cfg.Job).DisplayName);
|
||||
Text_Group_Info.text = Utils.CommonUtils.GetLocalizeText(factionAttri.Get((int) mCharacterInfo.Cfg.Fraction).DisplayName);
|
||||
Text_Army_Info.text = Utils.CommonUtils.GetLocalizeText(armyAttri.Get((int) mCharacterInfo.Cfg.Army).DisplayName);
|
||||
Text_Profession_Info.text =CommonUtils.GetLocalizeText( jobAttri.Get( (int)mCharacterInfo.Cfg.Job).DisplayName);
|
||||
Text_Group_Info.text = CommonUtils.GetLocalizeText(factionAttri.Get((int) mCharacterInfo.Cfg.Fraction).DisplayName);
|
||||
Text_Army_Info.text = CommonUtils.GetLocalizeText(armyAttri.Get((int) mCharacterInfo.Cfg.Army).DisplayName);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
using System.Collections.Generic;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using Framework;
|
||||
using Gameplay;
|
||||
using Gameplay.Story;
|
||||
using Gameplay.Story.Cmp.Data;
|
||||
using Gameplay.Story.Cmp.Impl;
|
||||
|
|
@ -50,7 +51,7 @@ public class UIStoryMainController : UIWindow
|
|||
|
||||
///Auto Gen End///
|
||||
|
||||
private Framework.PhxhScrollView _scroll;
|
||||
private PhxhScrollView _scroll;
|
||||
private GameObject _uiSelectGo;
|
||||
private GameObject _goTalkLog; //剧情记录页面
|
||||
private GameObject _goBubble; //气泡框
|
||||
|
|
@ -95,14 +96,14 @@ public class UIStoryMainController : UIWindow
|
|||
{
|
||||
//bind UI GameObj
|
||||
UIStoryMainBinder.GetComponents(this);
|
||||
_scroll = GetComponent< Framework.PhxhScrollView>("UISelect/ImageSelect/ScrollView");
|
||||
_scroll = GetComponent<PhxhScrollView>("UISelect/ImageSelect/ScrollView");
|
||||
_uiSelectGo = FindObj("UISelect");
|
||||
_goTalkLog = FindObj("GoTalkLog");
|
||||
_goBubble = FindObj("Image_TalkBubble");
|
||||
_bubbleRootTrans = transform.Find("UI_Bubbles");
|
||||
_logItem = FindObj("UI_TalkItem");
|
||||
_scrollLogContent = FindObj("GoTalkLog/Image_ChapterTalkBG/Scroll View/Viewport/Content");
|
||||
_scrollLog = GetComponent< Framework.PhxhScrollView>("GoTalkLog/Image_ChapterTalkBG/Scroll View");
|
||||
_scrollLog = GetComponent<PhxhScrollView>("GoTalkLog/Image_ChapterTalkBG/Scroll View");
|
||||
_goAside = Image_TalkBG01.gameObject;
|
||||
|
||||
_talkLogs = new List<LogData>();
|
||||
|
|
@ -313,8 +314,8 @@ public class UIStoryMainController : UIWindow
|
|||
{
|
||||
if (_scroll)
|
||||
{
|
||||
var go = Utils.CommonUtils.GetGameObject(_scroll.gameObject, "Viewport/Content");
|
||||
Utils.CommonUtils.DestoryAllChildGameObject(go);
|
||||
var go = CommonUtils.GetGameObject(_scroll.gameObject, "Viewport/Content");
|
||||
CommonUtils.DestoryAllChildGameObject(go);
|
||||
}
|
||||
|
||||
RefreshScrollView();
|
||||
|
|
@ -334,7 +335,7 @@ public class UIStoryMainController : UIWindow
|
|||
var go = item.gameObject;
|
||||
go.SetActive(true);
|
||||
|
||||
var txt = Utils.CommonUtils.GetComponent<TMP_Text>(go, "TextContent");
|
||||
var txt = CommonUtils.GetComponent<TMP_Text>(go, "TextContent");
|
||||
var button = go.GetComponent<Button>();
|
||||
txt.text = data;
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
using System.Collections.Generic;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using Framework;
|
||||
using Gameplay;
|
||||
using PhxhSDK;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
|
|
@ -31,11 +32,11 @@ public class UI_TeamChooseController : UIWindow
|
|||
public Image Image_Fraction07;
|
||||
public TMP_Text Text_GroupNum;
|
||||
public Button Button_Edit;
|
||||
public Framework.PhxhScrollView ScrollView_AllTeam;
|
||||
public PhxhScrollView ScrollView_AllTeam;
|
||||
|
||||
///Auto Gen End///
|
||||
|
||||
private Framework.PhxhScrollView _scrollViewAllTeam;
|
||||
private PhxhScrollView _scrollViewAllTeam;
|
||||
private GameObject _scrollViewObj;
|
||||
|
||||
private Team[] _teams;
|
||||
|
|
@ -47,7 +48,7 @@ public class UI_TeamChooseController : UIWindow
|
|||
//bind UI GameObj
|
||||
UI_TeamChooseBinder.GetComponents(this);
|
||||
|
||||
_scrollViewAllTeam = GetComponent< Framework.PhxhScrollView>("ScrollView_AllTeam");
|
||||
_scrollViewAllTeam = GetComponent<PhxhScrollView>("ScrollView_AllTeam");
|
||||
_scrollViewObj = FindObj("ScrollView_AllTeam/Viewport/Content");
|
||||
|
||||
BindButton(Button_Back, OnBackClick);
|
||||
|
|
@ -91,7 +92,7 @@ public class UI_TeamChooseController : UIWindow
|
|||
{
|
||||
if (null != _scrollViewAllTeam)
|
||||
{
|
||||
Utils.CommonUtils.DestoryAllChildGameObject(_scrollViewObj);
|
||||
CommonUtils.DestoryAllChildGameObject(_scrollViewObj);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -118,10 +119,10 @@ public class UI_TeamChooseController : UIWindow
|
|||
var go = item.gameObject;
|
||||
go.SetActive(true);
|
||||
|
||||
var txtName = Utils.CommonUtils.GetComponent<TMP_Text>(go, "Text_TeamName");
|
||||
var imgTeamIcon = Utils.CommonUtils.GetComponent<Image>(go, "Image_ArmyIcon");
|
||||
var imgVehicleIcon = Utils.CommonUtils.GetComponent<Image>(go, "Image_VehicleHeadPic");
|
||||
var button = Utils.CommonUtils.GetComponent<Button>(go, "Button_Edit");
|
||||
var txtName = CommonUtils.GetComponent<TMP_Text>(go, "Text_TeamName");
|
||||
var imgTeamIcon = CommonUtils.GetComponent<Image>(go, "Image_ArmyIcon");
|
||||
var imgVehicleIcon = CommonUtils.GetComponent<Image>(go, "Image_VehicleHeadPic");
|
||||
var button = CommonUtils.GetComponent<Button>(go, "Button_Edit");
|
||||
|
||||
txtName.text = team.Name;
|
||||
var vehicleID = team.GetVehicleID();
|
||||
|
|
@ -130,7 +131,7 @@ public class UI_TeamChooseController : UIWindow
|
|||
if (vehicleID != Team.NONE_ID)
|
||||
{
|
||||
var vehicleData = TableManager.Instance.Tables.VehicleConfig.Get((int)vehicleID);
|
||||
//imgVehicleIcon.sprite = Utils.CommonUtils.GetVehicleHeadPath(vehicleData)
|
||||
//imgVehicleIcon.sprite = CommonUtils.GetVehicleHeadPath(vehicleData)
|
||||
vehicleImgStr =
|
||||
"Assets/Art/UI/Texture/UI_Pic_Level/UI_Pic_Battle/Battle_TeamQueue/UI_Battle_Vehicle_HeadPic_01.png";
|
||||
var txtVehicleLevel = CommonUtils.GetComponent<TMP_Text>(go, "Image_VehicleHeadPic/Content/TextVehicleLevel");
|
||||
|
|
@ -266,7 +267,7 @@ public class UI_TeamChooseController : UIWindow
|
|||
|
||||
private void SetScrollViewItemButton(GameObject obj)
|
||||
{
|
||||
var button = Utils.CommonUtils.GetGameObject(obj, "Button_Edit");
|
||||
var button = CommonUtils.GetGameObject(obj, "Button_Edit");
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using Framework;
|
||||
using Gameplay;
|
||||
using PhxhSDK;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
|
|
@ -83,7 +84,7 @@ public class UI_TeamInfoController : UIWindow
|
|||
private Team _team;
|
||||
|
||||
private Image[] _imgHeadsList;
|
||||
private Framework.PhxhScrollView _scrollViewBounds;
|
||||
private PhxhScrollView _scrollViewBounds;
|
||||
private Image[] _imgFractions;
|
||||
|
||||
private string _curName;
|
||||
|
|
@ -95,7 +96,7 @@ public class UI_TeamInfoController : UIWindow
|
|||
//bind UI GameObj
|
||||
UI_TeamInfoBinder.GetComponents(this);
|
||||
|
||||
_scrollViewBounds = GetComponent< Framework.PhxhScrollView>("ScrollView_Bounds");
|
||||
_scrollViewBounds = GetComponent<PhxhScrollView>("ScrollView_Bounds");
|
||||
_imgHeadsList = new Image[Team.MAX_CHARACTER_COUNT];
|
||||
_imgFractions = new Image[Team.MAX_CHARACTER_COUNT];
|
||||
for (int i = 0; i < Team.MAX_CHARACTER_COUNT; i++)
|
||||
|
|
@ -373,7 +374,7 @@ public class UI_TeamInfoController : UIWindow
|
|||
if (_scrollViewBounds != null)
|
||||
{
|
||||
var content = FindObj("ScrollView_Bounds/Viewport/Content");
|
||||
Utils.CommonUtils.DestoryAllChildGameObject(content);
|
||||
CommonUtils.DestoryAllChildGameObject(content);
|
||||
}
|
||||
|
||||
RefreshScrollView();
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using PhxhSDK;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
|
@ -29,7 +30,7 @@ public class UI_TeamChooseBinder
|
|||
window.Image_Fraction07 = window.GetComponent<Image>("UI_TeamItem/Image_Fraction07");
|
||||
window.Text_GroupNum = window.GetComponent<TMP_Text>("UI_TeamItem/Text_GroupNum");
|
||||
window.Button_Edit = window.GetComponent<Button>("UI_TeamItem/Button_Edit");
|
||||
window.ScrollView_AllTeam = window.GetComponent< Framework.PhxhScrollView>("ScrollView_AllTeam");
|
||||
window.ScrollView_AllTeam = window.GetComponent<PhxhScrollView>("ScrollView_AllTeam");
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Framework;
|
||||
using PhxhSDK;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
using Framework;
|
||||
using Gameplay;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using Button = UnityEngine.UI.Button;
|
||||
|
|
@ -50,14 +51,14 @@ public class UIGiftCodeAwardsController: UIWindow
|
|||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
GameObject itemParent = FindObj(string.Format("UI_Materals/{0}", (i + 1).ToString()));
|
||||
Utils.CommonUtils.DestoryAllChildGameObject(Utils.CommonUtils.GetGameObject(itemParent, "item"));
|
||||
CommonUtils.DestoryAllChildGameObject(CommonUtils.GetGameObject(itemParent, "item"));
|
||||
|
||||
if ((i + 1) <= mItems.Ids.Count)
|
||||
{
|
||||
itemParent.SetActive(true);
|
||||
|
||||
ItemObj itemObj = new ItemObj((int)mItems.Ids[i], Utils.CommonUtils.GetGameObject(itemParent, "item"));
|
||||
Utils.CommonUtils.GetComponent<TMP_Text>(itemParent, "value").text = mItems.Counts[i].ToString();
|
||||
ItemObj itemObj = new ItemObj((int)mItems.Ids[i], CommonUtils.GetGameObject(itemParent, "item"));
|
||||
CommonUtils.GetComponent<TMP_Text>(itemParent, "value").text = mItems.Counts[i].ToString();
|
||||
allName += TableManager.Instance.Tables.Item.Get((int)mItems.Ids[i]).ID+"X"+ mItems.Counts[i];
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ using PhxhSDK;
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Gameplay;
|
||||
using UnityEngine;
|
||||
|
||||
public class ShowModelPreviewNode
|
||||
|
|
@ -20,7 +21,7 @@ public class ShowModelPreviewNode
|
|||
|
||||
public void SetCameraParam(Camera ca)
|
||||
{
|
||||
Camera nowca = Utils.CommonUtils.GetComponent<Camera>(prefabNode,"pos/Camera");
|
||||
Camera nowca = CommonUtils.GetComponent<Camera>(prefabNode,"pos/Camera");
|
||||
nowca.transform.localPosition = ca.transform.localPosition;
|
||||
nowca.transform.localRotation = ca.transform.localRotation;
|
||||
nowca.farClipPlane = ca.farClipPlane;
|
||||
|
|
@ -31,7 +32,7 @@ public class ShowModelPreviewNode
|
|||
public async UniTask Show()
|
||||
{
|
||||
await CreatePreviewNode();
|
||||
contentObj = Utils.CommonUtils.GetGameObject(prefabNode, "pos/Content");
|
||||
contentObj = CommonUtils.GetGameObject(prefabNode, "pos/Content");
|
||||
|
||||
if (!_rTexture)
|
||||
{
|
||||
|
|
@ -41,7 +42,7 @@ public class ShowModelPreviewNode
|
|||
|
||||
}
|
||||
|
||||
var teamCamera = Utils.CommonUtils.GetComponent<Camera>(prefabNode,"pos/Camera");
|
||||
var teamCamera = CommonUtils.GetComponent<Camera>(prefabNode,"pos/Camera");
|
||||
teamCamera.targetTexture = _rTexture;
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
using System.Collections.Generic;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using Framework;
|
||||
using Gameplay;
|
||||
using Gameplay.Common;
|
||||
using PhxhSDK;
|
||||
using UnityEngine;
|
||||
|
|
@ -55,7 +56,7 @@ public class UI_InterfacePreviewNode : MonoBehaviour
|
|||
float val;
|
||||
public void Rotate(Vector2 delta)
|
||||
{
|
||||
val = Utils.CommonUtils.CheckAngle(delta.x);
|
||||
val = CommonUtils.CheckAngle(delta.x);
|
||||
if(val > 10)
|
||||
{
|
||||
val = 10;
|
||||
|
|
@ -175,7 +176,7 @@ public class UI_InterfacePreviewNode : MonoBehaviour
|
|||
{
|
||||
_characterDic.Add(idx, go);
|
||||
go.SetLayerEx(LayerDefine.TeamEdit);
|
||||
var anim = Utils.CommonUtils.GetChildComponent<Animator>(go);
|
||||
var anim = CommonUtils.GetChildComponent<Animator>(go);
|
||||
if (anim)
|
||||
{
|
||||
if (idx < 2)
|
||||
|
|
|
|||
|
|
@ -223,7 +223,7 @@ public class UI_MainPanelController: UIWindow
|
|||
{
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
cubeImages.Add(Utils.CommonUtils.GetComponent<Image>(parentGo, i.ToString()));
|
||||
cubeImages.Add(CommonUtils.GetComponent<Image>(parentGo, i.ToString()));
|
||||
}
|
||||
}
|
||||
public void ShowCube(float val)
|
||||
|
|
@ -293,8 +293,8 @@ public class UI_MainPanelController: UIWindow
|
|||
|
||||
for (int i = 0; i < bannerTiaoList.Count; i++)
|
||||
{
|
||||
Utils.CommonUtils.GetGameObject(bannerTiaoList[i], "Black").SetActive(index != i);
|
||||
Utils.CommonUtils.GetGameObject(bannerTiaoList[i], "White").SetActive(index == i);
|
||||
CommonUtils.GetGameObject(bannerTiaoList[i], "Black").SetActive(index != i);
|
||||
CommonUtils.GetGameObject(bannerTiaoList[i], "White").SetActive(index == i);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ using System.Threading;
|
|||
using cfg.LevelCfg;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using Framework;
|
||||
using Gameplay;
|
||||
using Gameplay.Level;
|
||||
using PhxhSDK;
|
||||
using TMPro;
|
||||
|
|
@ -79,8 +80,8 @@ public class UI_LevelSelectController : UIWindow
|
|||
private RectTransform UI_LevelGroupChoose;
|
||||
private RectTransform UI_LevelChoose;
|
||||
private RectTransform _modeParent;
|
||||
private Framework.PhxhScrollView _levelGroupScrollView;
|
||||
private Framework.PhxhScrollView _levelScrollView;
|
||||
private PhxhScrollView _levelGroupScrollView;
|
||||
private PhxhScrollView _levelScrollView;
|
||||
private RectTransform _starRewardsParent;
|
||||
private RedPointUIController _easyChapterRedPointUI;
|
||||
private RedPointUIController _hardChapterRedPointUI;
|
||||
|
|
@ -109,8 +110,8 @@ public class UI_LevelSelectController : UIWindow
|
|||
UI_LevelChoose = transform.Find("UI_LevelChoose") as RectTransform;
|
||||
_modeParent = UI_ModeChoose.Find("Scroll View/Viewport/Content") as RectTransform;
|
||||
_levelGroupScrollView = UI_LevelGroupChoose.Find("Image_ChapterBG/Scroll View")
|
||||
.GetComponent<Framework.PhxhScrollView>();
|
||||
_levelScrollView = UI_LevelChoose.Find("Image_LevelBG/Scroll View").GetComponent<Framework.PhxhScrollView>();
|
||||
.GetComponent<PhxhScrollView>();
|
||||
_levelScrollView = UI_LevelChoose.Find("Image_LevelBG/Scroll View").GetComponent<PhxhScrollView>();
|
||||
_starRewardsParent = Image_LevelProcess.transform.Find("StarRewardProgress/starRewards") as RectTransform;
|
||||
|
||||
_levelGroupScrollView.SetUpdateFunc(OnRenderLevelGroup);
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ using Button = UnityEngine.UI.Button;
|
|||
using Image = UnityEngine.UI.Image;
|
||||
using Framework;
|
||||
using System.Collections;
|
||||
using Gameplay;
|
||||
|
||||
public class UI_LogInController : UIWindow
|
||||
{
|
||||
|
|
@ -101,7 +102,7 @@ public class UI_LogInController : UIWindow
|
|||
private void OnRecvNewLoginTips(string obj)
|
||||
{
|
||||
TipsObj.SetActive(true);
|
||||
Utils.CommonUtils.GetComponent<TMP_Text>(TipsObj, "label").text = obj;
|
||||
CommonUtils.GetComponent<TMP_Text>(TipsObj, "label").text = obj;
|
||||
|
||||
IEnumerator coroutine = waitTime();
|
||||
StartCoroutine(coroutine);
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ public class UI_VehicleChooseController : UIWindow
|
|||
|
||||
Dictionary<GameObject, VehicleCultivateData> mUIHeadGoDic;
|
||||
|
||||
Framework.PhxhScrollView _mCurrentScrollView = null;
|
||||
PhxhScrollView _mCurrentScrollView = null;
|
||||
|
||||
List<VehicleCultivateData> mSortedCInfoList = new List<VehicleCultivateData>();
|
||||
|
||||
|
|
@ -88,7 +88,7 @@ public class UI_VehicleChooseController : UIWindow
|
|||
strengthDropDown = GetComponent<TMP_Dropdown>("Image_BG/Button_AllType");
|
||||
|
||||
mCurrentScrollViewContentObj = FindObj("Image_BG/UI_Vehicle/ScrollView/Viewport/Content");
|
||||
_mCurrentScrollView = GetComponent<Framework.PhxhScrollView>("Image_BG/UI_Vehicle/ScrollView");
|
||||
_mCurrentScrollView = GetComponent<PhxhScrollView>("Image_BG/UI_Vehicle/ScrollView");
|
||||
mCurrentScrollViewContentObj = FindObj("Image_BG/UI_Vehicle/ScrollView/Viewport/Content");
|
||||
|
||||
mTerrainBtnObj = FindObj("Image_BG/Button_AllTerrian");
|
||||
|
|
@ -126,8 +126,8 @@ public class UI_VehicleChooseController : UIWindow
|
|||
|
||||
private void RefreshLevelUpSortBtn()
|
||||
{
|
||||
Utils.CommonUtils.GetGameObject(mLevelBtnObj, "Image_Default/Image_UP").SetActive(IsSmall2Big);
|
||||
Utils.CommonUtils.GetGameObject(mLevelBtnObj, "Image_Default/Image_Down").SetActive(!IsSmall2Big);
|
||||
CommonUtils.GetGameObject(mLevelBtnObj, "Image_Default/Image_UP").SetActive(IsSmall2Big);
|
||||
CommonUtils.GetGameObject(mLevelBtnObj, "Image_Default/Image_Down").SetActive(!IsSmall2Big);
|
||||
}
|
||||
|
||||
private void TerrainDropdownValueChanged(TMP_Dropdown change)
|
||||
|
|
@ -140,13 +140,13 @@ public class UI_VehicleChooseController : UIWindow
|
|||
|
||||
if (change.value == 0)
|
||||
{
|
||||
Utils.CommonUtils.GetComponent<TMP_Text>(Utils.CommonUtils.GetGameObject(mTerrainBtnObj, "Text_AllTerrian")).text = Utils.CommonUtils.GetLocalizeText("vehicleCultivate_AllTerrain");
|
||||
CommonUtils.GetComponent<TMP_Text>(CommonUtils.GetGameObject(mTerrainBtnObj, "Text_AllTerrian")).text = CommonUtils.GetLocalizeText("vehicleCultivate_AllTerrain");
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
DataTerrianProp dataTerrianProp = disPlayTerrianTypeList[change.value-1];
|
||||
Utils.CommonUtils.GetComponent<TMP_Text>(Utils.CommonUtils.GetGameObject(mTerrainBtnObj, "Text_AllTerrian")).text = Utils.CommonUtils.GetLocalizeText(dataTerrianProp.DisplayName);
|
||||
CommonUtils.GetComponent<TMP_Text>(CommonUtils.GetGameObject(mTerrainBtnObj, "Text_AllTerrian")).text = CommonUtils.GetLocalizeText(dataTerrianProp.DisplayName);
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -166,11 +166,11 @@ public class UI_VehicleChooseController : UIWindow
|
|||
|
||||
if (change.value == 0)
|
||||
{
|
||||
Utils.CommonUtils.GetComponent<TMP_Text>(Utils.CommonUtils.GetGameObject(mStrengthBtnObj, "Text_AllType")).text = Utils.CommonUtils.GetLocalizeText("vehicleCultivate_AllType");
|
||||
CommonUtils.GetComponent<TMP_Text>(CommonUtils.GetGameObject(mStrengthBtnObj, "Text_AllType")).text = CommonUtils.GetLocalizeText("vehicleCultivate_AllType");
|
||||
}
|
||||
else
|
||||
{
|
||||
Utils.CommonUtils.GetComponent<TMP_Text>(Utils.CommonUtils.GetGameObject(mStrengthBtnObj, "Text_AllType")).text = GetStrenthSortTypeLocalize(mCurStrengthSortType);
|
||||
CommonUtils.GetComponent<TMP_Text>(CommonUtils.GetGameObject(mStrengthBtnObj, "Text_AllType")).text = GetStrenthSortTypeLocalize(mCurStrengthSortType);
|
||||
}
|
||||
|
||||
SortListByTerrainAdapt(mCurTerrainId);
|
||||
|
|
@ -262,7 +262,7 @@ public class UI_VehicleChooseController : UIWindow
|
|||
{
|
||||
terrainDropDown.ClearOptions();
|
||||
TMP_Dropdown.OptionData m_NewData1 = new TMP_Dropdown.OptionData();
|
||||
m_NewData1.text = Utils.CommonUtils.GetLocalizeText("vehicleCultivate_AllTerrain");
|
||||
m_NewData1.text = CommonUtils.GetLocalizeText("vehicleCultivate_AllTerrain");
|
||||
|
||||
terrainDropDown.options.Add(m_NewData1);
|
||||
disPlayTerrianTypeList.Clear();
|
||||
|
|
@ -271,7 +271,7 @@ public class UI_VehicleChooseController : UIWindow
|
|||
DataTerrianProp terrianProp = TableManager.Instance.Tables.TerrianProp.DataList[i];
|
||||
disPlayTerrianTypeList.Add(terrianProp);
|
||||
TMP_Dropdown.OptionData m_NewData2 = new TMP_Dropdown.OptionData();
|
||||
m_NewData2.text =Utils.CommonUtils.GetLocalizeText( terrianProp.DisplayName);
|
||||
m_NewData2.text =CommonUtils.GetLocalizeText( terrianProp.DisplayName);
|
||||
terrainDropDown.options.Add(m_NewData2);
|
||||
}
|
||||
|
||||
|
|
@ -297,13 +297,13 @@ public class UI_VehicleChooseController : UIWindow
|
|||
switch (strenthSortType)
|
||||
{
|
||||
case EStrenthSortType.EAll:
|
||||
return Utils.CommonUtils.GetLocalizeText("vehicleCultivate_AllType");
|
||||
return CommonUtils.GetLocalizeText("vehicleCultivate_AllType");
|
||||
case EStrenthSortType.EAttack:
|
||||
return Utils.CommonUtils.GetLocalizeText("cultivate_Attack");
|
||||
return CommonUtils.GetLocalizeText("cultivate_Attack");
|
||||
case EStrenthSortType.EHP:
|
||||
return Utils.CommonUtils.GetLocalizeText("cultivate_Hp");
|
||||
return CommonUtils.GetLocalizeText("cultivate_Hp");
|
||||
case EStrenthSortType.EDenfense:
|
||||
return Utils.CommonUtils.GetLocalizeText("cultivate_Defense");
|
||||
return CommonUtils.GetLocalizeText("cultivate_Defense");
|
||||
|
||||
}
|
||||
return "";
|
||||
|
|
@ -340,7 +340,7 @@ public class UI_VehicleChooseController : UIWindow
|
|||
{
|
||||
if (null != mCurrentScrollViewContentObj)
|
||||
{
|
||||
Utils.CommonUtils.DestoryAllChildGameObject(mCurrentScrollViewContentObj);
|
||||
CommonUtils.DestoryAllChildGameObject(mCurrentScrollViewContentObj);
|
||||
}
|
||||
_mCurrentScrollView.SetUpdateFunc(RefreshItem);
|
||||
_mCurrentScrollView.SetItemCountFunc(GetCountFunc);
|
||||
|
|
@ -352,7 +352,7 @@ public class UI_VehicleChooseController : UIWindow
|
|||
{
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
GameObject singleObj = Utils.CommonUtils.GetGameObject(obj, (i + 1).ToString());
|
||||
GameObject singleObj = CommonUtils.GetGameObject(obj, (i + 1).ToString());
|
||||
if (singleObj != null)
|
||||
{
|
||||
ClearBind(singleObj);
|
||||
|
|
@ -393,7 +393,7 @@ public class UI_VehicleChooseController : UIWindow
|
|||
item.gameObject.SetActive(true);
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
GameObject singleItem = Utils.CommonUtils.GetGameObject(item.gameObject, (i + 1).ToString());
|
||||
GameObject singleItem = CommonUtils.GetGameObject(item.gameObject, (i + 1).ToString());
|
||||
if (index * 4 + i < mShowList.Count)
|
||||
{
|
||||
singleItem.SetActive(true);
|
||||
|
|
@ -411,9 +411,9 @@ public class UI_VehicleChooseController : UIWindow
|
|||
|
||||
private void RefreshSingleItem(GameObject singleItem, VehicleCultivateData tempVehcile)
|
||||
{
|
||||
Utils.CommonUtils.GetComponent<TMP_Text>(singleItem, "Image_BlackDown/Text_Lv").text = tempVehcile.SumPowerLevel().ToString();
|
||||
Utils.CommonUtils.GetComponent<TMP_Text>(singleItem, "Image_BlackDown/Text_Name").text = tempVehcile.Cfg.Name.ToString();
|
||||
Image img = Utils.CommonUtils.GetComponent<Image>(singleItem, "Image_HeadPic");
|
||||
CommonUtils.GetComponent<TMP_Text>(singleItem, "Image_BlackDown/Text_Lv").text = tempVehcile.SumPowerLevel().ToString();
|
||||
CommonUtils.GetComponent<TMP_Text>(singleItem, "Image_BlackDown/Text_Name").text = tempVehcile.Cfg.Name.ToString();
|
||||
Image img = CommonUtils.GetComponent<Image>(singleItem, "Image_HeadPic");
|
||||
string imgPath = VehicleDataHelper.GetVehiclePicPath(tempVehcile.Cfg.ID);
|
||||
|
||||
if (imgPath != null)
|
||||
|
|
@ -440,7 +440,7 @@ public class UI_VehicleChooseController : UIWindow
|
|||
break;
|
||||
}
|
||||
|
||||
Utils.CommonUtils.GetComponent<TMP_Text>(singleItem, "Image_BlackDown/Text_PropertyValue").text = strengthPoint;
|
||||
CommonUtils.GetComponent<TMP_Text>(singleItem, "Image_BlackDown/Text_PropertyValue").text = strengthPoint;
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ using Framework;
|
|||
using PhxhSDK;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Gameplay;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
|
@ -105,7 +106,7 @@ public class UI_VehicleCultivateController : UIWindow
|
|||
|
||||
private void RefreshModel()
|
||||
{
|
||||
Utils.CommonUtils.DestoryAllChildGameObject(modelParent);
|
||||
CommonUtils.DestoryAllChildGameObject(modelParent);
|
||||
viewModel=null;
|
||||
viewModel = GameObject.Instantiate(showModel);
|
||||
viewModel.transform.SetParent(modelParent.transform);
|
||||
|
|
@ -145,7 +146,7 @@ public class UI_VehicleCultivateController : UIWindow
|
|||
|
||||
private async void OnLevelPlusClick()
|
||||
{
|
||||
Utils.CommonUtils.CaptureScreenshot();
|
||||
CommonUtils.CaptureScreenshot();
|
||||
await UIManager.Instance.OpenWindow(UINameConst.UI_VehicleLevelUp, mVehicleData);
|
||||
ControllInput(false);
|
||||
|
||||
|
|
@ -331,16 +332,16 @@ public class UI_VehicleCultivateController : UIWindow
|
|||
}
|
||||
|
||||
Text_CDTme.text = nowSkillCfg.CDTime.ToString();
|
||||
Text_ActiveSkillName.text = Utils.CommonUtils.GetLocalizeText(nowSkillCfg.Name);
|
||||
Text_ActiveSkillName.text = CommonUtils.GetLocalizeText(nowSkillCfg.Name);
|
||||
|
||||
AssetManager.Instance.LoadAssetOnCallBack<Sprite>(nowSkillCfg.IconPath, skillIcon =>
|
||||
{
|
||||
Image_SkillLogo.sprite = skillIcon;
|
||||
});
|
||||
|
||||
Text_Class_Value.text = Utils.CommonUtils.GetRomanCode((int)mVehicleData.SumBonus(BonusType.SkillLv));
|
||||
Text_Class_Value.text = CommonUtils.GetRomanCode((int)mVehicleData.SumBonus(BonusType.SkillLv));
|
||||
|
||||
Text_SkillInfo.text =Utils.CommonUtils.GetLocalizeText( nowSkillCfg.SkillDesc);
|
||||
Text_SkillInfo.text =CommonUtils.GetLocalizeText( nowSkillCfg.SkillDesc);
|
||||
}
|
||||
|
||||
private void RefreshLevel()
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@ using cfg.VihecleCultivateCfg;
|
|||
using Framework;
|
||||
using Gameplay.Net;
|
||||
using System.Collections.Generic;
|
||||
using Gameplay;
|
||||
using PhxhSDK;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
|
@ -173,7 +175,7 @@ public class UI_VehicleLevelUpController : UIWindow
|
|||
{
|
||||
if(attackLvUpTime<=0)
|
||||
{
|
||||
UITipsManager.ShowTips(Utils.CommonUtils.GetLocalizeText("vehicleCultivate_AttackLevelminTip"));
|
||||
UITipsManager.ShowTips(CommonUtils.GetLocalizeText("vehicleCultivate_AttackLevelminTip"));
|
||||
return;
|
||||
}
|
||||
attackLvUpTime--;
|
||||
|
|
@ -229,7 +231,7 @@ public class UI_VehicleLevelUpController : UIWindow
|
|||
{
|
||||
if (IsPowMaxAttack())
|
||||
{
|
||||
UITipsManager.ShowTips(Utils.CommonUtils.GetLocalizeText("vehicleCultivate_AttackLevelmaxTip"));
|
||||
UITipsManager.ShowTips(CommonUtils.GetLocalizeText("vehicleCultivate_AttackLevelmaxTip"));
|
||||
return;
|
||||
}
|
||||
attackLvUpTime++;
|
||||
|
|
@ -242,7 +244,7 @@ public class UI_VehicleLevelUpController : UIWindow
|
|||
{
|
||||
if (defenseLvUpTime<=0)
|
||||
{
|
||||
UITipsManager.ShowTips(Utils.CommonUtils.GetLocalizeText("vehicleCultivate_DefenseLevelminTip"));
|
||||
UITipsManager.ShowTips(CommonUtils.GetLocalizeText("vehicleCultivate_DefenseLevelminTip"));
|
||||
return;
|
||||
}
|
||||
defenseLvUpTime--;
|
||||
|
|
@ -256,7 +258,7 @@ public class UI_VehicleLevelUpController : UIWindow
|
|||
{
|
||||
if (IsPowMaxDefense())
|
||||
{
|
||||
UITipsManager.ShowTips(Utils.CommonUtils.GetLocalizeText("vehicleCultivate_DefenseLevelminTip"));
|
||||
UITipsManager.ShowTips(CommonUtils.GetLocalizeText("vehicleCultivate_DefenseLevelminTip"));
|
||||
return;
|
||||
}
|
||||
defenseLvUpTime++;
|
||||
|
|
@ -271,7 +273,7 @@ public class UI_VehicleLevelUpController : UIWindow
|
|||
{
|
||||
if (hpLvUpTime <= 0)
|
||||
{
|
||||
UITipsManager.ShowTips(Utils.CommonUtils.GetLocalizeText("vehicleCultivate_hpLevelminTip"));
|
||||
UITipsManager.ShowTips(CommonUtils.GetLocalizeText("vehicleCultivate_hpLevelminTip"));
|
||||
return;
|
||||
}
|
||||
hpLvUpTime--;
|
||||
|
|
@ -286,7 +288,7 @@ public class UI_VehicleLevelUpController : UIWindow
|
|||
{
|
||||
if (IsPowMaxHp())
|
||||
{
|
||||
UITipsManager.ShowTips(Utils.CommonUtils.GetLocalizeText("vehicleCultivate_hpLevelmaxTip"));
|
||||
UITipsManager.ShowTips(CommonUtils.GetLocalizeText("vehicleCultivate_hpLevelmaxTip"));
|
||||
return;
|
||||
}
|
||||
hpLvUpTime++;
|
||||
|
|
@ -358,7 +360,7 @@ public class UI_VehicleLevelUpController : UIWindow
|
|||
SetScrollView();
|
||||
RegisterEvent();
|
||||
RefreshBtn();
|
||||
Utils.CommonUtils.SetImageBlur(GetComponent<Image>("blurObj"));
|
||||
CommonUtils.SetImageBlur(GetComponent<Image>("blurObj"));
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -457,17 +459,17 @@ public class UI_VehicleLevelUpController : UIWindow
|
|||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
GameObject itemParent = FindObj(string.Format("Image_BG/UI_Materals/{0}", (i + 1).ToString()));
|
||||
Utils.CommonUtils.DestoryAllChildGameObject(Utils.CommonUtils.GetGameObject(itemParent, "item"));
|
||||
CommonUtils.DestoryAllChildGameObject(CommonUtils.GetGameObject(itemParent, "item"));
|
||||
|
||||
if ((i + 1) <= costItems.Count)
|
||||
{
|
||||
itemParent.SetActive(true);
|
||||
|
||||
ItemObj itemObj = new ItemObj(costItems[i].Id, Utils.CommonUtils.GetGameObject(itemParent, "item"));
|
||||
Utils.CommonUtils.GetComponent<TMP_Text>(itemParent, "value").text = Actor.Instance.Item.GetItemCount(costItems[i].Id) + "/" + costItems[i].Count;
|
||||
ItemObj itemObj = new ItemObj(costItems[i].Id, CommonUtils.GetGameObject(itemParent, "item"));
|
||||
CommonUtils.GetComponent<TMP_Text>(itemParent, "value").text = Actor.Instance.Item.GetItemCount(costItems[i].Id) + "/" + costItems[i].Count;
|
||||
bool isFUll = Actor.Instance.Item.GetItemCount(costItems[i].Id) >= costItems[i].Count;
|
||||
Utils.CommonUtils.GetGameObject(itemParent, "Image_Red").SetActive(!isFUll);
|
||||
Utils.CommonUtils.GetGameObject(itemParent, "Image_Green02").SetActive(isFUll);
|
||||
CommonUtils.GetGameObject(itemParent, "Image_Red").SetActive(!isFUll);
|
||||
CommonUtils.GetGameObject(itemParent, "Image_Green02").SetActive(isFUll);
|
||||
|
||||
}
|
||||
else
|
||||
|
|
@ -488,14 +490,14 @@ public class UI_VehicleLevelUpController : UIWindow
|
|||
DataVehicleUpgrade dataVehicleUpgrade = VehicleUpgradeTableHelper.Get(mVehicleData.Cfg.ID, VihecleUpgradeType.HP);
|
||||
for (int i = 0; i < dataVehicleUpgrade.CostItems.Count;i++)
|
||||
{
|
||||
Utils.CommonUtils.AddItem(ref costItems,Utils.CommonUtils.ItemXNumber(dataVehicleUpgrade.CostItems[i],hpLvUpTime));
|
||||
CommonUtils.AddItem(ref costItems,CommonUtils.ItemXNumber(dataVehicleUpgrade.CostItems[i],hpLvUpTime));
|
||||
}
|
||||
//加伤害升级材料
|
||||
DataVehicleUpgrade dataVehicleUpgradeDamege = VehicleUpgradeTableHelper.Get(mVehicleData.Cfg.ID, VihecleUpgradeType.Damage);
|
||||
|
||||
for (int i = 0; i < dataVehicleUpgrade.CostItems.Count; i++)
|
||||
{
|
||||
Utils.CommonUtils.AddItem(ref costItems, Utils.CommonUtils.ItemXNumber(dataVehicleUpgradeDamege.CostItems[i], attackLvUpTime));
|
||||
CommonUtils.AddItem(ref costItems, CommonUtils.ItemXNumber(dataVehicleUpgradeDamege.CostItems[i], attackLvUpTime));
|
||||
}
|
||||
|
||||
//加防御力升级材料
|
||||
|
|
@ -503,7 +505,7 @@ public class UI_VehicleLevelUpController : UIWindow
|
|||
|
||||
for (int i = 0; i < dataVehicleUpgrade.CostItems.Count; i++)
|
||||
{
|
||||
Utils.CommonUtils.AddItem(ref costItems, Utils.CommonUtils.ItemXNumber(dataVehicleUpgradeDamege.CostItems[i],defenseLvUpTime));
|
||||
CommonUtils.AddItem(ref costItems, CommonUtils.ItemXNumber(dataVehicleUpgradeDamege.CostItems[i],defenseLvUpTime));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -534,17 +536,17 @@ public class UI_VehicleLevelUpController : UIWindow
|
|||
{
|
||||
DataVehicleUpgradeBonus tempDataInfo = mBonusTabList[index];
|
||||
|
||||
GameObject unlockObj = Utils.CommonUtils.GetGameObject(item.gameObject, "1/Text_Unlock");
|
||||
TMP_Text intensifyText = Utils.CommonUtils.GetComponent<TMP_Text>(item.gameObject, "1/Text_Level");
|
||||
TMP_Text descText = Utils.CommonUtils.GetComponent<TMP_Text>(item.gameObject, "1/Text_Level");
|
||||
GameObject triObj = Utils.CommonUtils.GetGameObject(item.gameObject, "1/Text_Info/Image_Triangle");
|
||||
CommonUtils.GetComponent<TMP_Text>(item.gameObject,"1/Text_Info").text = Utils.CommonUtils.GetVehicleBonusStr(tempDataInfo.BonusType) + "+" + tempDataInfo.BonusPropertyCount; ;
|
||||
GameObject unlockObj = CommonUtils.GetGameObject(item.gameObject, "1/Text_Unlock");
|
||||
TMP_Text intensifyText = CommonUtils.GetComponent<TMP_Text>(item.gameObject, "1/Text_Level");
|
||||
TMP_Text descText = CommonUtils.GetComponent<TMP_Text>(item.gameObject, "1/Text_Level");
|
||||
GameObject triObj = CommonUtils.GetGameObject(item.gameObject, "1/Text_Info/Image_Triangle");
|
||||
CommonUtils.GetComponent<TMP_Text>(item.gameObject,"1/Text_Info").text = CommonUtils.GetVehicleBonusStr(tempDataInfo.BonusType) + "+" + tempDataInfo.BonusPropertyCount; ;
|
||||
Color unLiveCol = new Color(1, 1, 1, (float)150 / (float)255);
|
||||
Color LiveCol = new Color((float)250/(float)255, 1, 0, (float)155 / (float)255);
|
||||
intensifyText.text =string.Format( Utils.CommonUtils.GetLocalizeText("vehicleCultivate_levelstr"),tempDataInfo.SumCount);
|
||||
descText.text = Utils.CommonUtils.GetVehicleBonusStr(tempDataInfo.BonusType)+tempDataInfo.BonusPropertyCount;
|
||||
intensifyText.text =string.Format( CommonUtils.GetLocalizeText("vehicleCultivate_levelstr"),tempDataInfo.SumCount);
|
||||
descText.text = CommonUtils.GetVehicleBonusStr(tempDataInfo.BonusType)+tempDataInfo.BonusPropertyCount;
|
||||
|
||||
Image parentImg = Utils.CommonUtils.GetComponent<Image>(item.gameObject,"1");
|
||||
Image parentImg = CommonUtils.GetComponent<Image>(item.gameObject,"1");
|
||||
int nextLv = GetNextLv();
|
||||
if (mVehicleData.SumPowerLevel()>tempDataInfo.SumCount)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
using cfg.VihecleCultivateCfg;
|
||||
using Framework;
|
||||
using Gameplay;
|
||||
|
||||
public static class VehicleDataHelper
|
||||
{
|
||||
|
|
@ -42,11 +43,11 @@ public static class VehicleDataHelper
|
|||
switch (terrainAdaptVal)
|
||||
{
|
||||
case NotAdapt:
|
||||
return Utils.CommonUtils. GetLocalizeText("vehicleCultivate_NotAdapt");
|
||||
return CommonUtils. GetLocalizeText("vehicleCultivate_NotAdapt");
|
||||
case Adapt:
|
||||
return Utils.CommonUtils.GetLocalizeText("vehicleCultivate_Adapt");
|
||||
return CommonUtils.GetLocalizeText("vehicleCultivate_Adapt");
|
||||
case VeryAdapt:
|
||||
return Utils.CommonUtils.GetLocalizeText("vehicleCultivate_TeHua");
|
||||
return CommonUtils.GetLocalizeText("vehicleCultivate_TeHua");
|
||||
}
|
||||
DebugUtil.LogError("载具的地形适应配置错了:载具upbonus表");
|
||||
return "拉取中";
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ using UnityEngine.Rendering.Universal;
|
|||
using UnityEngine.UI;
|
||||
using Constants = Framework.Constants;
|
||||
|
||||
namespace Utils
|
||||
namespace Gameplay
|
||||
{
|
||||
public partial class CommonUtils
|
||||
{
|
||||
|
|
@ -245,25 +245,25 @@ namespace Utils
|
|||
|
||||
|
||||
case OpResult.GiftCodeCountLimit:
|
||||
str = Utils.CommonUtils.GetLocalizeText("OpResult100006");
|
||||
str = GetLocalizeText("OpResult100006");
|
||||
break;
|
||||
case OpResult.GiftCodeOutOfDate:
|
||||
str = Utils.CommonUtils.GetLocalizeText("OpResult100008");
|
||||
str = GetLocalizeText("OpResult100008");
|
||||
break;
|
||||
case OpResult.GiftCodeNotOpen:
|
||||
str = Utils.CommonUtils.GetLocalizeText("OpResult100009");
|
||||
str = GetLocalizeText("OpResult100009");
|
||||
break;
|
||||
case OpResult.GiftCodeTooFast:
|
||||
str = Utils.CommonUtils.GetLocalizeText("OpResult100011");
|
||||
str = GetLocalizeText("OpResult100011");
|
||||
break;
|
||||
case OpResult.GiftCodeBusy:
|
||||
str = Utils.CommonUtils.GetLocalizeText("OpResult100014");
|
||||
str = GetLocalizeText("OpResult100014");
|
||||
break;
|
||||
case OpResult.GiftCodeNotEnough:
|
||||
str = Utils.CommonUtils.GetLocalizeText("OpResult100012");
|
||||
str = GetLocalizeText("OpResult100012");
|
||||
break;
|
||||
case OpResult.GiftCodeCountLimit2:
|
||||
str = Utils.CommonUtils.GetLocalizeText("OpResult100017");
|
||||
str = GetLocalizeText("OpResult100017");
|
||||
break;
|
||||
|
||||
|
||||
|
|
@ -300,25 +300,7 @@ namespace Utils
|
|||
}
|
||||
|
||||
|
||||
public static float GetAnimatorLength(Animator animator, string name)
|
||||
{
|
||||
//动画片段时间长度
|
||||
float length = 0;
|
||||
AnimationClip[] clips = animator.runtimeAnimatorController.animationClips;
|
||||
Debug.Log(clips.Length);
|
||||
foreach (AnimationClip clip in clips)
|
||||
{
|
||||
Debug.Log(clip.name);
|
||||
if (clip.name.Equals(name))
|
||||
{
|
||||
length = clip.length;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return length;
|
||||
|
||||
|
||||
}
|
||||
|
||||
private static async UniTask OpenImageBlur(Image image)
|
||||
{
|
||||
var mat = await AssetManager.Instance.LoadAssetAsync<Material>("Assets/Art/UI/Material/NLD_URP_NLD_UI_Blur.mat");
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
using Gameplay.Level;
|
||||
namespace Gameplay.Utils
|
||||
namespace Gameplay
|
||||
{
|
||||
using UnityEngine;
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ using System.Collections;
|
|||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Gameplay.Utils
|
||||
namespace Gameplay
|
||||
{
|
||||
/// <summary>
|
||||
/// 更新类型
|
||||
|
|
|
|||
|
|
@ -1,8 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: adaa92c2f64f0ab41960c723dc8eedf5
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -1,269 +0,0 @@
|
|||
// -----------------------------------------------------------------------
|
||||
// <copyright file="ScrollViewEditor.cs" company="AillieoTech">
|
||||
// Copyright (c) AillieoTech. All rights reserved.
|
||||
// </copyright>
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
namespace Framework
|
||||
{
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using UnityEditor;
|
||||
using UnityEditor.UI;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
[CustomEditor(typeof(PhxhScrollView))]
|
||||
public class PhxhScrollViewEditor : ScrollRectEditor
|
||||
{
|
||||
private const string bgPath = "UI/Skin/Background.psd";
|
||||
private const string spritePath = "UI/Skin/UISprite.psd";
|
||||
private const string maskPath = "UI/Skin/UIMask.psd";
|
||||
private static Color panelColor = new Color(1f, 1f, 1f, 0.392f);
|
||||
private static Color defaultSelectableColor = new Color(1f, 1f, 1f, 1f);
|
||||
private static Vector2 thinElementSize = new Vector2(160f, 20f);
|
||||
private static Action<GameObject, MenuCommand> PlaceUIElementRoot;
|
||||
|
||||
private SerializedProperty itemTemplate;
|
||||
private SerializedProperty poolSize;
|
||||
private SerializedProperty defaultItemSize;
|
||||
private SerializedProperty layoutType;
|
||||
|
||||
private GUIStyle cachedCaption;
|
||||
|
||||
private GUIStyle caption
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this.cachedCaption == null)
|
||||
{
|
||||
this.cachedCaption = new GUIStyle { richText = true, alignment = TextAnchor.MiddleCenter };
|
||||
}
|
||||
|
||||
return this.cachedCaption;
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
this.serializedObject.Update();
|
||||
|
||||
EditorGUILayout.BeginVertical("box");
|
||||
EditorGUILayout.LabelField("<b>Additional configs</b>", this.caption);
|
||||
EditorGUILayout.Space();
|
||||
this.DrawConfigInfo();
|
||||
this.serializedObject.ApplyModifiedProperties();
|
||||
EditorGUILayout.EndVertical();
|
||||
|
||||
EditorGUILayout.BeginVertical("box");
|
||||
EditorGUILayout.LabelField("<b>For original ScrollRect</b>", this.caption);
|
||||
EditorGUILayout.Space();
|
||||
base.OnInspectorGUI();
|
||||
EditorGUILayout.EndVertical();
|
||||
}
|
||||
|
||||
protected static void InternalAddScrollView<T>(MenuCommand menuCommand)
|
||||
where T : PhxhScrollView
|
||||
{
|
||||
GetPrivateMethodByReflection();
|
||||
|
||||
GameObject root = CreateUIElementRoot(typeof(T).Name, new Vector2(200, 200));
|
||||
PlaceUIElementRoot?.Invoke(root, menuCommand);
|
||||
|
||||
GameObject viewport = CreateUIObject("Viewport", root);
|
||||
GameObject content = CreateUIObject("Content", viewport);
|
||||
|
||||
var parent = menuCommand.context as GameObject;
|
||||
if (parent != null)
|
||||
{
|
||||
root.transform.SetParent(parent.transform, false);
|
||||
}
|
||||
|
||||
Selection.activeGameObject = root;
|
||||
|
||||
GameObject hScrollbar = CreateScrollbar();
|
||||
hScrollbar.name = "Scrollbar Horizontal";
|
||||
hScrollbar.transform.SetParent(root.transform, false);
|
||||
RectTransform hScrollbarRT = hScrollbar.GetComponent<RectTransform>();
|
||||
hScrollbarRT.anchorMin = Vector2.zero;
|
||||
hScrollbarRT.anchorMax = Vector2.right;
|
||||
hScrollbarRT.pivot = Vector2.zero;
|
||||
hScrollbarRT.sizeDelta = new Vector2(0, hScrollbarRT.sizeDelta.y);
|
||||
|
||||
GameObject vScrollbar = CreateScrollbar();
|
||||
vScrollbar.name = "Scrollbar Vertical";
|
||||
vScrollbar.transform.SetParent(root.transform, false);
|
||||
vScrollbar.GetComponent<Scrollbar>().SetDirection(Scrollbar.Direction.BottomToTop, true);
|
||||
RectTransform vScrollbarRT = vScrollbar.GetComponent<RectTransform>();
|
||||
vScrollbarRT.anchorMin = Vector2.right;
|
||||
vScrollbarRT.anchorMax = Vector2.one;
|
||||
vScrollbarRT.pivot = Vector2.one;
|
||||
vScrollbarRT.sizeDelta = new Vector2(vScrollbarRT.sizeDelta.x, 0);
|
||||
|
||||
RectTransform viewportRect = viewport.GetComponent<RectTransform>();
|
||||
viewportRect.anchorMin = Vector2.zero;
|
||||
viewportRect.anchorMax = Vector2.one;
|
||||
viewportRect.sizeDelta = Vector2.zero;
|
||||
viewportRect.pivot = Vector2.up;
|
||||
|
||||
RectTransform contentRect = content.GetComponent<RectTransform>();
|
||||
contentRect.anchorMin = Vector2.up;
|
||||
contentRect.anchorMax = Vector2.one;
|
||||
contentRect.sizeDelta = new Vector2(0, 300);
|
||||
contentRect.pivot = Vector2.up;
|
||||
|
||||
Framework.PhxhScrollView scrollRect = root.AddComponent<T>();
|
||||
scrollRect.content = contentRect;
|
||||
scrollRect.viewport = viewportRect;
|
||||
scrollRect.horizontalScrollbar = hScrollbar.GetComponent<Scrollbar>();
|
||||
scrollRect.verticalScrollbar = vScrollbar.GetComponent<Scrollbar>();
|
||||
scrollRect.horizontalScrollbarVisibility = ScrollRect.ScrollbarVisibility.AutoHideAndExpandViewport;
|
||||
scrollRect.verticalScrollbarVisibility = ScrollRect.ScrollbarVisibility.AutoHideAndExpandViewport;
|
||||
scrollRect.horizontalScrollbarSpacing = -3;
|
||||
scrollRect.verticalScrollbarSpacing = -3;
|
||||
|
||||
Image rootImage = root.AddComponent<Image>();
|
||||
rootImage.sprite = AssetDatabase.GetBuiltinExtraResource<Sprite>(bgPath);
|
||||
rootImage.type = Image.Type.Sliced;
|
||||
rootImage.color = panelColor;
|
||||
|
||||
Mask viewportMask = viewport.AddComponent<Mask>();
|
||||
viewportMask.showMaskGraphic = false;
|
||||
|
||||
Image viewportImage = viewport.AddComponent<Image>();
|
||||
viewportImage.sprite = AssetDatabase.GetBuiltinExtraResource<Sprite>(maskPath);
|
||||
viewportImage.type = Image.Type.Sliced;
|
||||
}
|
||||
|
||||
protected override void OnEnable()
|
||||
{
|
||||
base.OnEnable();
|
||||
|
||||
this.itemTemplate = this.serializedObject.FindProperty("itemTemplate");
|
||||
this.poolSize = this.serializedObject.FindProperty("poolSize");
|
||||
this.defaultItemSize = this.serializedObject.FindProperty("defaultItemSize");
|
||||
this.layoutType = this.serializedObject.FindProperty("layoutType");
|
||||
}
|
||||
|
||||
protected virtual void DrawConfigInfo()
|
||||
{
|
||||
EditorGUILayout.PropertyField(this.itemTemplate);
|
||||
EditorGUILayout.PropertyField(this.poolSize);
|
||||
EditorGUILayout.PropertyField(this.defaultItemSize);
|
||||
this.layoutType.intValue = (int)( Framework.PhxhScrollView.ItemLayoutType)EditorGUILayout.EnumPopup("layoutType", ( Framework.PhxhScrollView.ItemLayoutType)this.layoutType.intValue);
|
||||
}
|
||||
|
||||
[MenuItem("GameObject/UI/DynamicScrollView", false, 90)]
|
||||
private static void AddScrollView(MenuCommand menuCommand)
|
||||
{
|
||||
InternalAddScrollView< Framework.PhxhScrollView>(menuCommand);
|
||||
}
|
||||
|
||||
private static GameObject CreateScrollbar()
|
||||
{
|
||||
// Create GOs Hierarchy
|
||||
GameObject scrollbarRoot = CreateUIElementRoot("Scrollbar", thinElementSize);
|
||||
GameObject sliderArea = CreateUIObject("Sliding Area", scrollbarRoot);
|
||||
GameObject handle = CreateUIObject("Handle", sliderArea);
|
||||
|
||||
Image bgImage = scrollbarRoot.AddComponent<Image>();
|
||||
bgImage.sprite = AssetDatabase.GetBuiltinExtraResource<Sprite>(bgPath);
|
||||
bgImage.type = Image.Type.Sliced;
|
||||
bgImage.color = defaultSelectableColor;
|
||||
|
||||
Image handleImage = handle.AddComponent<Image>();
|
||||
handleImage.sprite = AssetDatabase.GetBuiltinExtraResource<Sprite>(spritePath);
|
||||
handleImage.type = Image.Type.Sliced;
|
||||
handleImage.color = defaultSelectableColor;
|
||||
|
||||
RectTransform sliderAreaRect = sliderArea.GetComponent<RectTransform>();
|
||||
sliderAreaRect.sizeDelta = new Vector2(-20, -20);
|
||||
sliderAreaRect.anchorMin = Vector2.zero;
|
||||
sliderAreaRect.anchorMax = Vector2.one;
|
||||
|
||||
RectTransform handleRect = handle.GetComponent<RectTransform>();
|
||||
handleRect.sizeDelta = new Vector2(20, 20);
|
||||
|
||||
Scrollbar scrollbar = scrollbarRoot.AddComponent<Scrollbar>();
|
||||
scrollbar.handleRect = handleRect;
|
||||
scrollbar.targetGraphic = handleImage;
|
||||
SetDefaultColorTransitionValues(scrollbar);
|
||||
|
||||
return scrollbarRoot;
|
||||
}
|
||||
|
||||
private static GameObject CreateUIElementRoot(string name, Vector2 size)
|
||||
{
|
||||
var child = new GameObject(name);
|
||||
RectTransform rectTransform = child.AddComponent<RectTransform>();
|
||||
rectTransform.sizeDelta = size;
|
||||
return child;
|
||||
}
|
||||
|
||||
private static GameObject CreateUIObject(string name, GameObject parent)
|
||||
{
|
||||
var go = new GameObject(name);
|
||||
go.AddComponent<RectTransform>();
|
||||
SetParentAndAlign(go, parent);
|
||||
return go;
|
||||
}
|
||||
|
||||
private static void SetParentAndAlign(GameObject child, GameObject parent)
|
||||
{
|
||||
if (parent == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
child.transform.SetParent(parent.transform, false);
|
||||
SetLayerRecursively(child, parent.layer);
|
||||
}
|
||||
|
||||
private static void SetLayerRecursively(GameObject go, int layer)
|
||||
{
|
||||
go.layer = layer;
|
||||
Transform t = go.transform;
|
||||
for (var i = 0; i < t.childCount; i++)
|
||||
{
|
||||
SetLayerRecursively(t.GetChild(i).gameObject, layer);
|
||||
}
|
||||
}
|
||||
|
||||
private static void SetDefaultColorTransitionValues(Selectable slider)
|
||||
{
|
||||
ColorBlock colors = slider.colors;
|
||||
colors.highlightedColor = new Color(0.882f, 0.882f, 0.882f);
|
||||
colors.pressedColor = new Color(0.698f, 0.698f, 0.698f);
|
||||
colors.disabledColor = new Color(0.521f, 0.521f, 0.521f);
|
||||
}
|
||||
|
||||
private static void GetPrivateMethodByReflection()
|
||||
{
|
||||
if (PlaceUIElementRoot == null)
|
||||
{
|
||||
Assembly uiEditorAssembly = AppDomain.CurrentDomain.GetAssemblies()
|
||||
.FirstOrDefault(asm => asm.GetName().Name == "UnityEditor.UI");
|
||||
if (uiEditorAssembly != null)
|
||||
{
|
||||
Type menuOptionType = uiEditorAssembly.GetType("UnityEditor.UI.MenuOptions");
|
||||
if (menuOptionType != null)
|
||||
{
|
||||
MethodInfo miPlaceUIElementRoot = menuOptionType.GetMethod(
|
||||
"PlaceUIElementRoot",
|
||||
BindingFlags.NonPublic | BindingFlags.Static);
|
||||
if (miPlaceUIElementRoot != null)
|
||||
{
|
||||
PlaceUIElementRoot = Delegate.CreateDelegate(
|
||||
typeof(Action<GameObject, MenuCommand>),
|
||||
miPlaceUIElementRoot)
|
||||
as Action<GameObject, MenuCommand>;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: e29cfb1f37b2946bab6e55856dc160cc
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
// -----------------------------------------------------------------------
|
||||
// <copyright file="ScrollViewExEditor.cs" company="AillieoTech">
|
||||
// Copyright (c) AillieoTech. All rights reserved.
|
||||
// </copyright>
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
namespace Framework
|
||||
{
|
||||
using UnityEditor;
|
||||
|
||||
[CustomEditor(typeof(PhxhScrollViewEx))]
|
||||
public class PhxhScrollViewExEditor : PhxhScrollViewEditor
|
||||
{
|
||||
private SerializedProperty pageSize;
|
||||
|
||||
protected override void OnEnable()
|
||||
{
|
||||
base.OnEnable();
|
||||
this.pageSize = this.serializedObject.FindProperty("pageSize");
|
||||
}
|
||||
|
||||
protected override void DrawConfigInfo()
|
||||
{
|
||||
base.DrawConfigInfo();
|
||||
EditorGUILayout.PropertyField(this.pageSize);
|
||||
}
|
||||
|
||||
[MenuItem("GameObject/UI/DynamicScrollViewEx", false, 90)]
|
||||
private static void AddScrollViewEx(MenuCommand menuCommand)
|
||||
{
|
||||
InternalAddScrollView<PhxhScrollViewEx>(menuCommand);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 8712942f108f8440f8c2e28a682b7982
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -1,8 +1,6 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using Microsoft.CSharp.RuntimeBinder;
|
||||
using PhxhSDK;
|
||||
using TMPro;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
|
@ -38,7 +36,7 @@ public class GetUIPath :Editor
|
|||
{"RawImage_",typeof(RawImage).Name },
|
||||
{"Slider_", typeof(Slider).Name },
|
||||
{"Scrollbar_", typeof(Scrollbar).Name },
|
||||
{"ScrollView_", typeof( Framework.PhxhScrollView).Name },
|
||||
{"ScrollView_", typeof(PhxhScrollView).Name },
|
||||
{"ScrollRect_", typeof(ScrollRect).Name },
|
||||
{"Toggle_", typeof(Toggle).Name },
|
||||
{"Dropdown_", typeof(Dropdown).Name },
|
||||
|
|
|
|||
|
|
@ -133,11 +133,11 @@ public class AOTGenericReferences : UnityEngine.MonoBehaviour
|
|||
// Cysharp.Threading.Tasks.CompilerServices.AsyncUniTask.<>c<UI_InterfacePreviewNode.<LoadNode>d__17,object>
|
||||
// Cysharp.Threading.Tasks.CompilerServices.AsyncUniTask.<>c<UI_InterfacePreviewNode.<LoadVehicleModel>d__26>
|
||||
// Cysharp.Threading.Tasks.CompilerServices.AsyncUniTask.<>c<UI_LevelSelectController.<GetAStarReward>d__80,object>
|
||||
// Cysharp.Threading.Tasks.CompilerServices.AsyncUniTask.<>c<Utils.CommonUtils.<GetDayNightIcon>d__85,object>
|
||||
// Cysharp.Threading.Tasks.CompilerServices.AsyncUniTask.<>c<Utils.CommonUtils.<GetEnvironmentIcon>d__84,object>
|
||||
// Cysharp.Threading.Tasks.CompilerServices.AsyncUniTask.<>c<Utils.CommonUtils.<GetWeatherIcon>d__83,object>
|
||||
// Cysharp.Threading.Tasks.CompilerServices.AsyncUniTask.<>c<Utils.CommonUtils.<OpenImageBlur>d__26>
|
||||
// Cysharp.Threading.Tasks.CompilerServices.AsyncUniTask.<>c<Utils.CommonUtils.<OpenImageGray>d__21>
|
||||
// Cysharp.Threading.Tasks.CompilerServices.AsyncUniTask.<>c<CommonUtils.<GetDayNightIcon>d__85,object>
|
||||
// Cysharp.Threading.Tasks.CompilerServices.AsyncUniTask.<>c<CommonUtils.<GetEnvironmentIcon>d__84,object>
|
||||
// Cysharp.Threading.Tasks.CompilerServices.AsyncUniTask.<>c<CommonUtils.<GetWeatherIcon>d__83,object>
|
||||
// Cysharp.Threading.Tasks.CompilerServices.AsyncUniTask.<>c<CommonUtils.<OpenImageBlur>d__26>
|
||||
// Cysharp.Threading.Tasks.CompilerServices.AsyncUniTask.<>c<CommonUtils.<OpenImageGray>d__21>
|
||||
// Cysharp.Threading.Tasks.CompilerServices.AsyncUniTask<Code.Scripts.Gameplay.Game.GameStateStory.<_LoadScene>d__6>
|
||||
// Cysharp.Threading.Tasks.CompilerServices.AsyncUniTask<Framework.JsonHelper.<LoadFromAddressble>d__0<object>,object>
|
||||
// Cysharp.Threading.Tasks.CompilerServices.AsyncUniTask<Framework.TableManager.<Load>d__7>
|
||||
|
|
@ -242,11 +242,11 @@ public class AOTGenericReferences : UnityEngine.MonoBehaviour
|
|||
// Cysharp.Threading.Tasks.CompilerServices.AsyncUniTask<UI_InterfacePreviewNode.<LoadNode>d__17,object>
|
||||
// Cysharp.Threading.Tasks.CompilerServices.AsyncUniTask<UI_InterfacePreviewNode.<LoadVehicleModel>d__26>
|
||||
// Cysharp.Threading.Tasks.CompilerServices.AsyncUniTask<UI_LevelSelectController.<GetAStarReward>d__80,object>
|
||||
// Cysharp.Threading.Tasks.CompilerServices.AsyncUniTask<Utils.CommonUtils.<GetDayNightIcon>d__85,object>
|
||||
// Cysharp.Threading.Tasks.CompilerServices.AsyncUniTask<Utils.CommonUtils.<GetEnvironmentIcon>d__84,object>
|
||||
// Cysharp.Threading.Tasks.CompilerServices.AsyncUniTask<Utils.CommonUtils.<GetWeatherIcon>d__83,object>
|
||||
// Cysharp.Threading.Tasks.CompilerServices.AsyncUniTask<Utils.CommonUtils.<OpenImageBlur>d__26>
|
||||
// Cysharp.Threading.Tasks.CompilerServices.AsyncUniTask<Utils.CommonUtils.<OpenImageGray>d__21>
|
||||
// Cysharp.Threading.Tasks.CompilerServices.AsyncUniTask<CommonUtils.<GetDayNightIcon>d__85,object>
|
||||
// Cysharp.Threading.Tasks.CompilerServices.AsyncUniTask<CommonUtils.<GetEnvironmentIcon>d__84,object>
|
||||
// Cysharp.Threading.Tasks.CompilerServices.AsyncUniTask<CommonUtils.<GetWeatherIcon>d__83,object>
|
||||
// Cysharp.Threading.Tasks.CompilerServices.AsyncUniTask<CommonUtils.<OpenImageBlur>d__26>
|
||||
// Cysharp.Threading.Tasks.CompilerServices.AsyncUniTask<CommonUtils.<OpenImageGray>d__21>
|
||||
// Cysharp.Threading.Tasks.CompilerServices.AsyncUniTaskMethodBuilder<byte>
|
||||
// Cysharp.Threading.Tasks.CompilerServices.AsyncUniTaskMethodBuilder<int>
|
||||
// Cysharp.Threading.Tasks.CompilerServices.AsyncUniTaskMethodBuilder<object>
|
||||
|
|
@ -1820,8 +1820,8 @@ public class AOTGenericReferences : UnityEngine.MonoBehaviour
|
|||
// System.Void Cysharp.Threading.Tasks.CompilerServices.AsyncUniTaskMethodBuilder.AwaitUnsafeOnCompleted<Cysharp.Threading.Tasks.UniTask.Awaiter<object>,UI_InterfacePreviewManager.<LoadPreviewNode>d__8>(Cysharp.Threading.Tasks.UniTask.Awaiter<object>&,UI_InterfacePreviewManager.<LoadPreviewNode>d__8&)
|
||||
// System.Void Cysharp.Threading.Tasks.CompilerServices.AsyncUniTaskMethodBuilder.AwaitUnsafeOnCompleted<Cysharp.Threading.Tasks.UniTask.Awaiter<object>,UI_InterfacePreviewNode.<AddCharacterGo>d__29>(Cysharp.Threading.Tasks.UniTask.Awaiter<object>&,UI_InterfacePreviewNode.<AddCharacterGo>d__29&)
|
||||
// System.Void Cysharp.Threading.Tasks.CompilerServices.AsyncUniTaskMethodBuilder.AwaitUnsafeOnCompleted<Cysharp.Threading.Tasks.UniTask.Awaiter<object>,UI_InterfacePreviewNode.<AddVehicleGo>d__31>(Cysharp.Threading.Tasks.UniTask.Awaiter<object>&,UI_InterfacePreviewNode.<AddVehicleGo>d__31&)
|
||||
// System.Void Cysharp.Threading.Tasks.CompilerServices.AsyncUniTaskMethodBuilder.AwaitUnsafeOnCompleted<Cysharp.Threading.Tasks.UniTask.Awaiter<object>,Utils.CommonUtils.<OpenImageBlur>d__26>(Cysharp.Threading.Tasks.UniTask.Awaiter<object>&,Utils.CommonUtils.<OpenImageBlur>d__26&)
|
||||
// System.Void Cysharp.Threading.Tasks.CompilerServices.AsyncUniTaskMethodBuilder.AwaitUnsafeOnCompleted<Cysharp.Threading.Tasks.UniTask.Awaiter<object>,Utils.CommonUtils.<OpenImageGray>d__21>(Cysharp.Threading.Tasks.UniTask.Awaiter<object>&,Utils.CommonUtils.<OpenImageGray>d__21&)
|
||||
// System.Void Cysharp.Threading.Tasks.CompilerServices.AsyncUniTaskMethodBuilder.AwaitUnsafeOnCompleted<Cysharp.Threading.Tasks.UniTask.Awaiter<object>,CommonUtils.<OpenImageBlur>d__26>(Cysharp.Threading.Tasks.UniTask.Awaiter<object>&,CommonUtils.<OpenImageBlur>d__26&)
|
||||
// System.Void Cysharp.Threading.Tasks.CompilerServices.AsyncUniTaskMethodBuilder.AwaitUnsafeOnCompleted<Cysharp.Threading.Tasks.UniTask.Awaiter<object>,CommonUtils.<OpenImageGray>d__21>(Cysharp.Threading.Tasks.UniTask.Awaiter<object>&,CommonUtils.<OpenImageGray>d__21&)
|
||||
// System.Void Cysharp.Threading.Tasks.CompilerServices.AsyncUniTaskMethodBuilder<byte>.AwaitUnsafeOnCompleted<Cysharp.Threading.Tasks.UniTask.Awaiter<object>,Gameplay.Skill.UnitSkillManager.<AddSkill>d__5>(Cysharp.Threading.Tasks.UniTask.Awaiter<object>&,Gameplay.Skill.UnitSkillManager.<AddSkill>d__5&)
|
||||
// System.Void Cysharp.Threading.Tasks.CompilerServices.AsyncUniTaskMethodBuilder<byte>.AwaitUnsafeOnCompleted<System.Runtime.CompilerServices.TaskAwaiter<object>,PhxhSDK.AssetManager.<CheckAssetInPack>d__11>(System.Runtime.CompilerServices.TaskAwaiter<object>&,PhxhSDK.AssetManager.<CheckAssetInPack>d__11&)
|
||||
// System.Void Cysharp.Threading.Tasks.CompilerServices.AsyncUniTaskMethodBuilder<int>.AwaitUnsafeOnCompleted<Cysharp.Threading.Tasks.UniTask.Awaiter,PhxhSDK.AudioManager.<PlayMusicCommon>d__53>(Cysharp.Threading.Tasks.UniTask.Awaiter&,PhxhSDK.AudioManager.<PlayMusicCommon>d__53&)
|
||||
|
|
@ -1865,9 +1865,9 @@ public class AOTGenericReferences : UnityEngine.MonoBehaviour
|
|||
// System.Void Cysharp.Threading.Tasks.CompilerServices.AsyncUniTaskMethodBuilder<object>.AwaitUnsafeOnCompleted<Cysharp.Threading.Tasks.UniTask.Awaiter<object>,UIRoot.<LoadPrefab>d__10>(Cysharp.Threading.Tasks.UniTask.Awaiter<object>&,UIRoot.<LoadPrefab>d__10&)
|
||||
// System.Void Cysharp.Threading.Tasks.CompilerServices.AsyncUniTaskMethodBuilder<object>.AwaitUnsafeOnCompleted<Cysharp.Threading.Tasks.UniTask.Awaiter<object>,UI_InterfacePreviewNode.<LoadNode>d__17>(Cysharp.Threading.Tasks.UniTask.Awaiter<object>&,UI_InterfacePreviewNode.<LoadNode>d__17&)
|
||||
// System.Void Cysharp.Threading.Tasks.CompilerServices.AsyncUniTaskMethodBuilder<object>.AwaitUnsafeOnCompleted<Cysharp.Threading.Tasks.UniTask.Awaiter<object>,UI_LevelSelectController.<GetAStarReward>d__80>(Cysharp.Threading.Tasks.UniTask.Awaiter<object>&,UI_LevelSelectController.<GetAStarReward>d__80&)
|
||||
// System.Void Cysharp.Threading.Tasks.CompilerServices.AsyncUniTaskMethodBuilder<object>.AwaitUnsafeOnCompleted<Cysharp.Threading.Tasks.UniTask.Awaiter<object>,Utils.CommonUtils.<GetDayNightIcon>d__85>(Cysharp.Threading.Tasks.UniTask.Awaiter<object>&,Utils.CommonUtils.<GetDayNightIcon>d__85&)
|
||||
// System.Void Cysharp.Threading.Tasks.CompilerServices.AsyncUniTaskMethodBuilder<object>.AwaitUnsafeOnCompleted<Cysharp.Threading.Tasks.UniTask.Awaiter<object>,Utils.CommonUtils.<GetEnvironmentIcon>d__84>(Cysharp.Threading.Tasks.UniTask.Awaiter<object>&,Utils.CommonUtils.<GetEnvironmentIcon>d__84&)
|
||||
// System.Void Cysharp.Threading.Tasks.CompilerServices.AsyncUniTaskMethodBuilder<object>.AwaitUnsafeOnCompleted<Cysharp.Threading.Tasks.UniTask.Awaiter<object>,Utils.CommonUtils.<GetWeatherIcon>d__83>(Cysharp.Threading.Tasks.UniTask.Awaiter<object>&,Utils.CommonUtils.<GetWeatherIcon>d__83&)
|
||||
// System.Void Cysharp.Threading.Tasks.CompilerServices.AsyncUniTaskMethodBuilder<object>.AwaitUnsafeOnCompleted<Cysharp.Threading.Tasks.UniTask.Awaiter<object>,CommonUtils.<GetDayNightIcon>d__85>(Cysharp.Threading.Tasks.UniTask.Awaiter<object>&,CommonUtils.<GetDayNightIcon>d__85&)
|
||||
// System.Void Cysharp.Threading.Tasks.CompilerServices.AsyncUniTaskMethodBuilder<object>.AwaitUnsafeOnCompleted<Cysharp.Threading.Tasks.UniTask.Awaiter<object>,CommonUtils.<GetEnvironmentIcon>d__84>(Cysharp.Threading.Tasks.UniTask.Awaiter<object>&,CommonUtils.<GetEnvironmentIcon>d__84&)
|
||||
// System.Void Cysharp.Threading.Tasks.CompilerServices.AsyncUniTaskMethodBuilder<object>.AwaitUnsafeOnCompleted<Cysharp.Threading.Tasks.UniTask.Awaiter<object>,CommonUtils.<GetWeatherIcon>d__83>(Cysharp.Threading.Tasks.UniTask.Awaiter<object>&,CommonUtils.<GetWeatherIcon>d__83&)
|
||||
// System.Void Cysharp.Threading.Tasks.CompilerServices.AsyncUniTaskMethodBuilder<object>.AwaitUnsafeOnCompleted<System.Runtime.CompilerServices.TaskAwaiter<object>,PhxhSDK.AssetManager.<InstanceAsync>d__8<object>>(System.Runtime.CompilerServices.TaskAwaiter<object>&,PhxhSDK.AssetManager.<InstanceAsync>d__8<object>&)
|
||||
// System.Void Cysharp.Threading.Tasks.CompilerServices.AsyncUniTaskMethodBuilder<object>.AwaitUnsafeOnCompleted<System.Runtime.CompilerServices.TaskAwaiter<object>,PhxhSDK.AssetManager.<LoadAssetAsync>d__6<object>>(System.Runtime.CompilerServices.TaskAwaiter<object>&,PhxhSDK.AssetManager.<LoadAssetAsync>d__6<object>&)
|
||||
// System.Void Cysharp.Threading.Tasks.CompilerServices.AsyncUniTaskMethodBuilder.Start<Code.Scripts.Gameplay.Game.GameStateStory.<_LoadScene>d__6>(Code.Scripts.Gameplay.Game.GameStateStory.<_LoadScene>d__6&)
|
||||
|
|
@ -1933,8 +1933,8 @@ public class AOTGenericReferences : UnityEngine.MonoBehaviour
|
|||
// System.Void Cysharp.Threading.Tasks.CompilerServices.AsyncUniTaskMethodBuilder.Start<UI_InterfacePreviewNode.<AddVehicleGo>d__31>(UI_InterfacePreviewNode.<AddVehicleGo>d__31&)
|
||||
// System.Void Cysharp.Threading.Tasks.CompilerServices.AsyncUniTaskMethodBuilder.Start<UI_InterfacePreviewNode.<LoadCharacterModel>d__25>(UI_InterfacePreviewNode.<LoadCharacterModel>d__25&)
|
||||
// System.Void Cysharp.Threading.Tasks.CompilerServices.AsyncUniTaskMethodBuilder.Start<UI_InterfacePreviewNode.<LoadVehicleModel>d__26>(UI_InterfacePreviewNode.<LoadVehicleModel>d__26&)
|
||||
// System.Void Cysharp.Threading.Tasks.CompilerServices.AsyncUniTaskMethodBuilder.Start<Utils.CommonUtils.<OpenImageBlur>d__26>(Utils.CommonUtils.<OpenImageBlur>d__26&)
|
||||
// System.Void Cysharp.Threading.Tasks.CompilerServices.AsyncUniTaskMethodBuilder.Start<Utils.CommonUtils.<OpenImageGray>d__21>(Utils.CommonUtils.<OpenImageGray>d__21&)
|
||||
// System.Void Cysharp.Threading.Tasks.CompilerServices.AsyncUniTaskMethodBuilder.Start<CommonUtils.<OpenImageBlur>d__26>(CommonUtils.<OpenImageBlur>d__26&)
|
||||
// System.Void Cysharp.Threading.Tasks.CompilerServices.AsyncUniTaskMethodBuilder.Start<CommonUtils.<OpenImageGray>d__21>(CommonUtils.<OpenImageGray>d__21&)
|
||||
// System.Void Cysharp.Threading.Tasks.CompilerServices.AsyncUniTaskMethodBuilder<byte>.Start<Gameplay.Skill.UnitSkillManager.<AddSkill>d__5>(Gameplay.Skill.UnitSkillManager.<AddSkill>d__5&)
|
||||
// System.Void Cysharp.Threading.Tasks.CompilerServices.AsyncUniTaskMethodBuilder<byte>.Start<PhxhSDK.AssetManager.<CheckAssetInPack>d__11>(PhxhSDK.AssetManager.<CheckAssetInPack>d__11&)
|
||||
// System.Void Cysharp.Threading.Tasks.CompilerServices.AsyncUniTaskMethodBuilder<int>.Start<PhxhSDK.AudioManager.<PlayAudio>d__69>(PhxhSDK.AudioManager.<PlayAudio>d__69&)
|
||||
|
|
@ -1980,9 +1980,9 @@ public class AOTGenericReferences : UnityEngine.MonoBehaviour
|
|||
// System.Void Cysharp.Threading.Tasks.CompilerServices.AsyncUniTaskMethodBuilder<object>.Start<UIRoot.<LoadPrefab>d__10>(UIRoot.<LoadPrefab>d__10&)
|
||||
// System.Void Cysharp.Threading.Tasks.CompilerServices.AsyncUniTaskMethodBuilder<object>.Start<UI_InterfacePreviewNode.<LoadNode>d__17>(UI_InterfacePreviewNode.<LoadNode>d__17&)
|
||||
// System.Void Cysharp.Threading.Tasks.CompilerServices.AsyncUniTaskMethodBuilder<object>.Start<UI_LevelSelectController.<GetAStarReward>d__80>(UI_LevelSelectController.<GetAStarReward>d__80&)
|
||||
// System.Void Cysharp.Threading.Tasks.CompilerServices.AsyncUniTaskMethodBuilder<object>.Start<Utils.CommonUtils.<GetDayNightIcon>d__85>(Utils.CommonUtils.<GetDayNightIcon>d__85&)
|
||||
// System.Void Cysharp.Threading.Tasks.CompilerServices.AsyncUniTaskMethodBuilder<object>.Start<Utils.CommonUtils.<GetEnvironmentIcon>d__84>(Utils.CommonUtils.<GetEnvironmentIcon>d__84&)
|
||||
// System.Void Cysharp.Threading.Tasks.CompilerServices.AsyncUniTaskMethodBuilder<object>.Start<Utils.CommonUtils.<GetWeatherIcon>d__83>(Utils.CommonUtils.<GetWeatherIcon>d__83&)
|
||||
// System.Void Cysharp.Threading.Tasks.CompilerServices.AsyncUniTaskMethodBuilder<object>.Start<CommonUtils.<GetDayNightIcon>d__85>(CommonUtils.<GetDayNightIcon>d__85&)
|
||||
// System.Void Cysharp.Threading.Tasks.CompilerServices.AsyncUniTaskMethodBuilder<object>.Start<CommonUtils.<GetEnvironmentIcon>d__84>(CommonUtils.<GetEnvironmentIcon>d__84&)
|
||||
// System.Void Cysharp.Threading.Tasks.CompilerServices.AsyncUniTaskMethodBuilder<object>.Start<CommonUtils.<GetWeatherIcon>d__83>(CommonUtils.<GetWeatherIcon>d__83&)
|
||||
// DG.Tweening.Core.TweenerCore<UnityEngine.Color,UnityEngine.Color,DG.Tweening.Plugins.Options.ColorOptions> DG.Tweening.Core.Extensions.Blendable<UnityEngine.Color,UnityEngine.Color,DG.Tweening.Plugins.Options.ColorOptions>(DG.Tweening.Core.TweenerCore<UnityEngine.Color,UnityEngine.Color,DG.Tweening.Plugins.Options.ColorOptions>)
|
||||
// object DG.Tweening.Core.Extensions.SetSpecialStartupMode<object>(object,DG.Tweening.Core.Enums.SpecialStartupMode)
|
||||
// DG.Tweening.Core.TweenerCore<UnityEngine.Vector2,UnityEngine.Vector2,DG.Tweening.Plugins.CircleOptions> DG.Tweening.Core.TweenManager.GetTweener<UnityEngine.Vector2,UnityEngine.Vector2,DG.Tweening.Plugins.CircleOptions>()
|
||||
|
|
@ -2133,8 +2133,8 @@ public class AOTGenericReferences : UnityEngine.MonoBehaviour
|
|||
// System.Void System.Runtime.CompilerServices.AsyncVoidMethodBuilder.AwaitUnsafeOnCompleted<Cysharp.Threading.Tasks.UniTask.Awaiter,UI_MainPanelController.<OnOpenWindow>d__82>(Cysharp.Threading.Tasks.UniTask.Awaiter&,UI_MainPanelController.<OnOpenWindow>d__82&)
|
||||
// System.Void System.Runtime.CompilerServices.AsyncVoidMethodBuilder.AwaitUnsafeOnCompleted<Cysharp.Threading.Tasks.UniTask.Awaiter,UI_TeamChooseController.<OnClickItem>d__36>(Cysharp.Threading.Tasks.UniTask.Awaiter&,UI_TeamChooseController.<OnClickItem>d__36&)
|
||||
// System.Void System.Runtime.CompilerServices.AsyncVoidMethodBuilder.AwaitUnsafeOnCompleted<Cysharp.Threading.Tasks.UniTask.Awaiter,UI_TeamInfoController.<OnClickVehicle>d__75>(Cysharp.Threading.Tasks.UniTask.Awaiter&,UI_TeamInfoController.<OnClickVehicle>d__75&)
|
||||
// System.Void System.Runtime.CompilerServices.AsyncVoidMethodBuilder.AwaitUnsafeOnCompleted<Cysharp.Threading.Tasks.UniTask.Awaiter,Utils.CommonUtils.<SetImageBlur>d__28>(Cysharp.Threading.Tasks.UniTask.Awaiter&,Utils.CommonUtils.<SetImageBlur>d__28&)
|
||||
// System.Void System.Runtime.CompilerServices.AsyncVoidMethodBuilder.AwaitUnsafeOnCompleted<Cysharp.Threading.Tasks.UniTask.Awaiter,Utils.CommonUtils.<SetImageGray>d__22>(Cysharp.Threading.Tasks.UniTask.Awaiter&,Utils.CommonUtils.<SetImageGray>d__22&)
|
||||
// System.Void System.Runtime.CompilerServices.AsyncVoidMethodBuilder.AwaitUnsafeOnCompleted<Cysharp.Threading.Tasks.UniTask.Awaiter,CommonUtils.<SetImageBlur>d__28>(Cysharp.Threading.Tasks.UniTask.Awaiter&,CommonUtils.<SetImageBlur>d__28&)
|
||||
// System.Void System.Runtime.CompilerServices.AsyncVoidMethodBuilder.AwaitUnsafeOnCompleted<Cysharp.Threading.Tasks.UniTask.Awaiter,CommonUtils.<SetImageGray>d__22>(Cysharp.Threading.Tasks.UniTask.Awaiter&,CommonUtils.<SetImageGray>d__22&)
|
||||
// System.Void System.Runtime.CompilerServices.AsyncVoidMethodBuilder.AwaitUnsafeOnCompleted<Cysharp.Threading.Tasks.UniTask.Awaiter<byte>,UI_LevelSelectController.<PlayProgressAnimation>d__79>(Cysharp.Threading.Tasks.UniTask.Awaiter<byte>&,UI_LevelSelectController.<PlayProgressAnimation>d__79&)
|
||||
// System.Void System.Runtime.CompilerServices.AsyncVoidMethodBuilder.AwaitUnsafeOnCompleted<Cysharp.Threading.Tasks.UniTask.Awaiter<int>,Gameplay.Common.GameUnit.<PlayAudio>d__37>(Cysharp.Threading.Tasks.UniTask.Awaiter<int>&,Gameplay.Common.GameUnit.<PlayAudio>d__37&)
|
||||
// System.Void System.Runtime.CompilerServices.AsyncVoidMethodBuilder.AwaitUnsafeOnCompleted<Cysharp.Threading.Tasks.UniTask.Awaiter<int>,UI_MainPanelController.<OnOpenWindow>d__82>(Cysharp.Threading.Tasks.UniTask.Awaiter<int>&,UI_MainPanelController.<OnOpenWindow>d__82&)
|
||||
|
|
@ -2294,8 +2294,8 @@ public class AOTGenericReferences : UnityEngine.MonoBehaviour
|
|||
// System.Void System.Runtime.CompilerServices.AsyncVoidMethodBuilder.Start<UI_TeamInfoController.<RefreshVehicle>d__83>(UI_TeamInfoController.<RefreshVehicle>d__83&)
|
||||
// System.Void System.Runtime.CompilerServices.AsyncVoidMethodBuilder.Start<UI_VehicleChooseController.<On2DPicClick>d__33>(UI_VehicleChooseController.<On2DPicClick>d__33&)
|
||||
// System.Void System.Runtime.CompilerServices.AsyncVoidMethodBuilder.Start<UI_VehicleCultivateController.<OnLevelPlusClick>d__58>(UI_VehicleCultivateController.<OnLevelPlusClick>d__58&)
|
||||
// System.Void System.Runtime.CompilerServices.AsyncVoidMethodBuilder.Start<Utils.CommonUtils.<SetImageBlur>d__28>(Utils.CommonUtils.<SetImageBlur>d__28&)
|
||||
// System.Void System.Runtime.CompilerServices.AsyncVoidMethodBuilder.Start<Utils.CommonUtils.<SetImageGray>d__22>(Utils.CommonUtils.<SetImageGray>d__22&)
|
||||
// System.Void System.Runtime.CompilerServices.AsyncVoidMethodBuilder.Start<CommonUtils.<SetImageBlur>d__28>(CommonUtils.<SetImageBlur>d__28&)
|
||||
// System.Void System.Runtime.CompilerServices.AsyncVoidMethodBuilder.Start<CommonUtils.<SetImageGray>d__22>(CommonUtils.<SetImageGray>d__22&)
|
||||
// byte& System.Runtime.CompilerServices.Unsafe.Add<byte>(byte&,int)
|
||||
// object& System.Runtime.CompilerServices.Unsafe.Add<object>(object&,int)
|
||||
// ushort& System.Runtime.CompilerServices.Unsafe.Add<ushort>(ushort&,int)
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit 514e0198c06b033da52f181db3550fd5ad34c726
|
||||
Subproject commit 1272fadce3f2dba21baac069dcf259e8a9dc174b
|
||||
Loading…
Reference in New Issue