Merge branch 'xma/dev' of http://60.1.1.230/gaoxin/JL_Client into xma/dev

dev_chengFeng
ZhangBiao 2021-03-02 14:45:52 +08:00
commit e6a076afa8
6 changed files with 96 additions and 75 deletions

View File

@ -1132,8 +1132,14 @@ namespace GameLogic
return App.ResMgr.LoadAsset<Sprite>(spriteStr);
}
public static Font LoadFont()
public static Font LoadFont(string fontName = null)
{
if (!string.IsNullOrEmpty(fontName))
{
var go = App.ResMgr.LoadAsset<Font>(fontName);
if (go != null)
return go;
}
Font BuildInFont = Resources.GetBuiltinResource<Font>("Arial.ttf");
return BuildInFont;
}

View File

@ -150,10 +150,10 @@ RectTransform:
m_Father: {fileID: 136085602}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 31, y: -31}
m_SizeDelta: {x: 62, y: 62}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &95245974
CanvasRenderer:
@ -15274,10 +15274,10 @@ RectTransform:
m_Father: {fileID: 136085602}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 97.52, y: -31}
m_SizeDelta: {x: 62, y: 62}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &506673911
CanvasRenderer:
@ -59880,7 +59880,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
m_IsActive: 1
--- !u!224 &3414655680617284804
RectTransform:
m_ObjectHideFlags: 0
@ -83298,9 +83298,9 @@ RectTransform:
m_Father: {fileID: 4026116261534551149}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 475.09, y: -55}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &4026116261139886263
@ -83375,9 +83375,9 @@ RectTransform:
m_Father: {fileID: 4026116263152147740}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 475.09, y: -55}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &4026116261196340906
@ -83963,9 +83963,9 @@ RectTransform:
m_Father: {fileID: 4026116261534551149}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 55, y: -55}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &4026116261390384789
@ -84147,7 +84147,7 @@ MonoBehaviour:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_Sprite: {fileID: 21300000, guid: 1a2ed3d281da42944b13b7a4c6a5d205, type: 3}
m_Sprite: {fileID: 21300000, guid: af35ae40293e26b41b46837f7ad59918, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
@ -84556,7 +84556,7 @@ MonoBehaviour:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_Sprite: {fileID: 21300000, guid: 7305dd25ffb0c7a45a745288ff547cc5, type: 3}
m_Sprite: {fileID: 21300000, guid: 5e6dd4cae84f4dd46958013a6f282fc7, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
@ -84630,7 +84630,7 @@ MonoBehaviour:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_Sprite: {fileID: 21300000, guid: 7305dd25ffb0c7a45a745288ff547cc5, type: 3}
m_Sprite: {fileID: 21300000, guid: 5e6dd4cae84f4dd46958013a6f282fc7, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
@ -85400,9 +85400,9 @@ RectTransform:
m_Father: {fileID: 4026116261534551149}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 195.03, y: -55}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &4026116261777695568
@ -85778,9 +85778,9 @@ RectTransform:
m_Father: {fileID: 4026116263152147740}
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 615.12, y: -55}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &4026116261844073132
@ -86173,7 +86173,7 @@ MonoBehaviour:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_Sprite: {fileID: 21300000, guid: 58b67c9752798ab4fb8a76f3dbcbc9d4, type: 3}
m_Sprite: {fileID: 21300000, guid: f088797d2a26ab24abe877e97eba98bd, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
@ -86333,9 +86333,9 @@ RectTransform:
m_Father: {fileID: 4026116261534551149}
m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 755.15, y: -55}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &4026116262002252256
@ -86478,7 +86478,7 @@ MonoBehaviour:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_Sprite: {fileID: 21300000, guid: 0f2cc64e40e26e645b9f4ab0e3f793b8, type: 3}
m_Sprite: {fileID: 21300000, guid: e5f390065e8d312419f17562e8250e91, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
@ -86952,7 +86952,7 @@ MonoBehaviour:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_Sprite: {fileID: 21300000, guid: cd2ca249349cd094d933065a76dd9f73, type: 3}
m_Sprite: {fileID: 21300000, guid: 29430791031a92643b0afc46b730abe5, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
@ -87026,7 +87026,7 @@ MonoBehaviour:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_Sprite: {fileID: 21300000, guid: cd2ca249349cd094d933065a76dd9f73, type: 3}
m_Sprite: {fileID: 21300000, guid: 29430791031a92643b0afc46b730abe5, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
@ -87068,9 +87068,9 @@ RectTransform:
m_Father: {fileID: 4026116261534551149}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 335.06, y: -55}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &4026116262256548568
@ -87282,9 +87282,9 @@ RectTransform:
m_Father: {fileID: 4026116261534551149}
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 615.12, y: -55}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &4026116262325622925
@ -87619,7 +87619,7 @@ MonoBehaviour:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_Sprite: {fileID: 21300000, guid: 0f2cc64e40e26e645b9f4ab0e3f793b8, type: 3}
m_Sprite: {fileID: 21300000, guid: e5f390065e8d312419f17562e8250e91, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
@ -87810,7 +87810,7 @@ MonoBehaviour:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_Sprite: {fileID: 21300000, guid: 9f24cdeec6201014a8771ad4417a383e, type: 3}
m_Sprite: {fileID: 21300000, guid: b582673e3da23f44fbae9ec0521af1f1, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
@ -87997,7 +87997,7 @@ MonoBehaviour:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_Sprite: {fileID: 21300000, guid: 9f24cdeec6201014a8771ad4417a383e, type: 3}
m_Sprite: {fileID: 21300000, guid: b582673e3da23f44fbae9ec0521af1f1, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
@ -89100,9 +89100,9 @@ RectTransform:
m_Father: {fileID: 4026116263152147740}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 335.06, y: -55}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &4026116262791904998
@ -89170,7 +89170,7 @@ MonoBehaviour:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_Sprite: {fileID: 21300000, guid: 1a2ed3d281da42944b13b7a4c6a5d205, type: 3}
m_Sprite: {fileID: 21300000, guid: af35ae40293e26b41b46837f7ad59918, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
@ -89318,7 +89318,7 @@ MonoBehaviour:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_Sprite: {fileID: 21300000, guid: 58b67c9752798ab4fb8a76f3dbcbc9d4, type: 3}
m_Sprite: {fileID: 21300000, guid: f088797d2a26ab24abe877e97eba98bd, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
@ -89766,9 +89766,9 @@ RectTransform:
m_Father: {fileID: 4026116263152147740}
m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 755.15, y: -55}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &4026116262916179914
@ -90189,9 +90189,9 @@ RectTransform:
m_Father: {fileID: 4026116263152147740}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 195.03, y: -55}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &4026116263129528938
@ -90504,9 +90504,9 @@ RectTransform:
m_Father: {fileID: 4026116263152147740}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 55, y: -55}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &4026116263232579479
@ -105961,10 +105961,10 @@ RectTransform:
m_Father: {fileID: 410237481221277589}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 221.4, y: -31}
m_SizeDelta: {x: 62, y: 62}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &2414242672251041193
CanvasRenderer:
@ -111921,10 +111921,10 @@ RectTransform:
m_Father: {fileID: 410237481221277589}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 154.87999, y: -31}
m_SizeDelta: {x: 62, y: 62}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &79708565718575260
CanvasRenderer:

View File

@ -24,7 +24,7 @@ local function createPanel(uiConfig, parent)
recTransform.sizeDelta = Vector2.New(0, 0)
transform.localRotation = Quaternion.identity
if GetCurLanguage()~=0 then
local textArr=gameObject:GetComponentsInChildren(typeof(LanguageText),true);
local textArr=gameObject:GetComponentsInChildren(typeof(UnityEngine.UI.Text),true);
for i = 0, textArr.Length-1 do
local textStr=textArr[i].text
textArr[i].text=GetLanguageStrById(textStr)

View File

@ -592,7 +592,7 @@ function UIManager.CreatePanel(uiConfig, parent)
recTransform.sizeDelta = Vector2.New(0, 0)
transform.localRotation = Quaternion.identity
if GetCurLanguage()~=0 then
local textArr=gameObject:GetComponentsInChildren(typeof(LanguageText),true);
local textArr=gameObject:GetComponentsInChildren(typeof(UnityEngine.UI.Text),true);
for i = 0, textArr.Length-1 do
local textStr=textArr[i].text
textArr[i].text=GetLanguageStrById(textStr)

View File

@ -227,14 +227,14 @@ function this.RefreshBaseShow()
if IsBeted or not isCanGuessByBattleEndState then
local isBetRed = myBetTarget == betBattleInfo.enemyInfo.uid
local isBetBlue = myBetTarget == betBattleInfo.myInfo.uid
this.redBtn:GetComponent("Image").sprite = Util.LoadSprite(isBetRed and "r_jingjichang_jingcai" or "r_jingjichang_jingcai_01")
this.blueBtn:GetComponent("Image").sprite = Util.LoadSprite(isBetBlue and "r_jingjichang_jingcai" or "r_jingjichang_jingcai_01")
this.redBtn:GetComponent("Image").sprite = Util.LoadSprite(isBetRed and "r_jingjichang_jingcai_zh" or "r_jingjichang_jingcai_01_zh")
this.blueBtn:GetComponent("Image").sprite = Util.LoadSprite(isBetBlue and "r_jingjichang_jingcai_zh" or "r_jingjichang_jingcai_01_zh")
this.redGuess:SetActive(isBetRed)
this.blueGuess:SetActive(isBetBlue)
elseif isCanGuessByBattleEndState then
local baseInfo = ArenaTopMatchManager.GetBaseData()
local isInGuess = baseInfo.battleState == TOP_MATCH_TIME_STATE.OPEN_IN_GUESS
local imgName = isInGuess and "r_jingjichang_jingcai" or "r_jingjichang_jingcai_01"
local imgName = isInGuess and "r_jingjichang_jingcai_zh" or "r_jingjichang_jingcai_01_zh"
this.redBtn:GetComponent("Image").sprite = Util.LoadSprite(imgName)
this.blueBtn:GetComponent("Image").sprite = Util.LoadSprite(imgName)
this.redGuess:SetActive(false)

View File

@ -1560,10 +1560,25 @@ public class GameLogic_UtilWrap
{
try
{
ToLua.CheckArgsCount(L, 0);
UnityEngine.Font o = GameLogic.Util.LoadFont();
ToLua.PushSealed(L, o);
return 1;
int count = LuaDLL.lua_gettop(L);
if (count == 0)
{
UnityEngine.Font o = GameLogic.Util.LoadFont();
ToLua.PushSealed(L, o);
return 1;
}
else if (count == 1)
{
string arg0 = ToLua.CheckString(L, 1);
UnityEngine.Font o = GameLogic.Util.LoadFont(arg0);
ToLua.PushSealed(L, o);
return 1;
}
else
{
return LuaDLL.luaL_throw(L, "invalid arguments to method: GameLogic.Util.LoadFont");
}
}
catch (Exception e)
{