fix:1、添加H5
This commit is contained in:
@@ -35,7 +35,8 @@ namespace RedHotRoast
|
||||
public static uint PlayUI_Close = ++cursor_OpenClose;
|
||||
public static uint NewTaskUI_Close = ++cursor_OpenClose;
|
||||
|
||||
|
||||
public static uint H5UI_Open = ++cursor_OpenClose;
|
||||
public static uint H5UI_Close = ++cursor_OpenClose;
|
||||
public static uint PrivacyUI_Open = ++cursor_OpenClose;
|
||||
public static uint PrivacyUI_Close = ++cursor_OpenClose;
|
||||
public static uint PlayUIFX = ++cursor_OpenClose;
|
||||
|
||||
@@ -66,5 +66,21 @@ namespace RedHotRoast
|
||||
public int eggCD;
|
||||
public string ResVersion1;
|
||||
public int IsOrganic;
|
||||
|
||||
public int propswitch;
|
||||
public int flyswitch;
|
||||
public int[] WVOffset;
|
||||
public int[] darkWVRefreshtime2;
|
||||
public int[] darkWVRefreshtime;
|
||||
public int[] propCoord;
|
||||
public int[] darkWVDailyrefreshtimes;
|
||||
public int WVswitch;
|
||||
public int[] WVClickAddTime;
|
||||
public int flyCtRate;
|
||||
public int otherH5switch;
|
||||
public int H5Refreshtime;
|
||||
public int darkThoughProbability;
|
||||
public int Dailyrefreshtimes;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Newtonsoft.Json;
|
||||
using SGModule.ConfigLoader;
|
||||
|
||||
namespace RedHotRoast
|
||||
{
|
||||
public class GameUrlsModel
|
||||
{
|
||||
public static GameUrls GetData(int id) {
|
||||
return ConfigSystem.GetConfig<GameUrls>().FirstOrDefault(makeup => makeup.id == id);
|
||||
}
|
||||
}
|
||||
|
||||
[ConfigKey("GameUrls")]
|
||||
public class GameUrls
|
||||
{
|
||||
[JsonProperty("id")]
|
||||
public int id;
|
||||
[JsonProperty("webLink")]
|
||||
public string webLink;
|
||||
[JsonProperty("webType")]
|
||||
public int webType;
|
||||
[JsonProperty("probability")]
|
||||
public int probability;
|
||||
[JsonProperty("refreshMax")]
|
||||
public int refreshMax;
|
||||
[JsonProperty("darkWebTimesCT")]
|
||||
public int darkWebTimesCT;
|
||||
[JsonProperty("wvType")]
|
||||
public int wvType;
|
||||
[JsonProperty("wvthrough")]
|
||||
public int wvthrough;
|
||||
[JsonProperty("isMagic")]
|
||||
public int isMagic;
|
||||
[JsonProperty("darkWebTimesCT2")]
|
||||
public int darkWebTimesCT2;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 05307e911b8f647ba99a5902a28e66e7
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -30,6 +30,7 @@ namespace FGUI.ZM_Game_04
|
||||
public btn_prop btn_remove;
|
||||
public btn_prop btn_refresh;
|
||||
public btn_look_ad btn_look_ad;
|
||||
public GButton btn_wv;
|
||||
public const string URL = "ui://g3iqdlgcopwgw";
|
||||
|
||||
public static com_game CreateInstance()
|
||||
@@ -64,6 +65,7 @@ namespace FGUI.ZM_Game_04
|
||||
btn_remove = (btn_prop)GetChildAt(20);
|
||||
btn_refresh = (btn_prop)GetChildAt(21);
|
||||
btn_look_ad = (btn_look_ad)GetChildAt(22);
|
||||
btn_wv = (GButton)GetChildAt(23);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0391d97afad1e4638b88c50317bb5750
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,17 @@
|
||||
/** This is an automatically generated class by FairyGUI. Please do not modify it. **/
|
||||
|
||||
using FairyGUI;
|
||||
|
||||
namespace FGUI.ZM_H5_15
|
||||
{
|
||||
public class ZM_H5_15Binder
|
||||
{
|
||||
public static void BindAll()
|
||||
{
|
||||
UIObjectFactory.SetPackageItemExtension(com_top.URL, typeof(com_top));
|
||||
UIObjectFactory.SetPackageItemExtension(btn_icon.URL, typeof(btn_icon));
|
||||
UIObjectFactory.SetPackageItemExtension(com_webview.URL, typeof(com_webview));
|
||||
UIObjectFactory.SetPackageItemExtension(btn_fly.URL, typeof(btn_fly));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bcb4e539c9f2843baa2120ee4710b6dc
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,27 @@
|
||||
/** This is an automatically generated class by FairyGUI. Please do not modify it. **/
|
||||
|
||||
using FairyGUI;
|
||||
using FairyGUI.Utils;
|
||||
|
||||
namespace FGUI.ZM_H5_15
|
||||
{
|
||||
public partial class btn_fly : GButton
|
||||
{
|
||||
public Transition t0;
|
||||
public Transition t1;
|
||||
public const string URL = "ui://ldxlghf7j4a21";
|
||||
|
||||
public static btn_fly CreateInstance()
|
||||
{
|
||||
return (btn_fly)UIPackage.CreateObject("ZM_H5_15", "btn_fly");
|
||||
}
|
||||
|
||||
public override void ConstructFromXML(XML xml)
|
||||
{
|
||||
base.ConstructFromXML(xml);
|
||||
|
||||
t0 = GetTransitionAt(0);
|
||||
t1 = GetTransitionAt(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 55666a23a2825455a936d440bb6efadc
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,29 @@
|
||||
/** This is an automatically generated class by FairyGUI. Please do not modify it. **/
|
||||
|
||||
using FairyGUI;
|
||||
using FairyGUI.Utils;
|
||||
|
||||
namespace FGUI.ZM_H5_15
|
||||
{
|
||||
public partial class btn_icon : GButton
|
||||
{
|
||||
public Controller cont_state;
|
||||
public GImage pb_time;
|
||||
public Transition fx_ready;
|
||||
public const string URL = "ui://ldxlghf7d3a97";
|
||||
|
||||
public static btn_icon CreateInstance()
|
||||
{
|
||||
return (btn_icon)UIPackage.CreateObject("ZM_H5_15", "btn_icon");
|
||||
}
|
||||
|
||||
public override void ConstructFromXML(XML xml)
|
||||
{
|
||||
base.ConstructFromXML(xml);
|
||||
|
||||
cont_state = GetControllerAt(0);
|
||||
pb_time = (GImage)GetChildAt(2);
|
||||
fx_ready = GetTransitionAt(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cbe6a36fdfd8d43d386ffd2b78e6b8e6
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,31 @@
|
||||
/** This is an automatically generated class by FairyGUI. Please do not modify it. **/
|
||||
|
||||
using FairyGUI;
|
||||
using FairyGUI.Utils;
|
||||
|
||||
namespace FGUI.ZM_H5_15
|
||||
{
|
||||
public partial class com_top : GComponent
|
||||
{
|
||||
public GTextField text_num;
|
||||
public GTextField text_more;
|
||||
public GProgressBar pb_num;
|
||||
public GGroup conect;
|
||||
public const string URL = "ui://ldxlghf7d3a95";
|
||||
|
||||
public static com_top CreateInstance()
|
||||
{
|
||||
return (com_top)UIPackage.CreateObject("ZM_H5_15", "com_top");
|
||||
}
|
||||
|
||||
public override void ConstructFromXML(XML xml)
|
||||
{
|
||||
base.ConstructFromXML(xml);
|
||||
|
||||
text_num = (GTextField)GetChildAt(2);
|
||||
text_more = (GTextField)GetChildAt(3);
|
||||
pb_num = (GProgressBar)GetChildAt(4);
|
||||
conect = (GGroup)GetChildAt(6);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4828f4b850a3a44ad834da640ba0e4f1
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,37 @@
|
||||
/** This is an automatically generated class by FairyGUI. Please do not modify it. **/
|
||||
|
||||
using FairyGUI;
|
||||
using FairyGUI.Utils;
|
||||
|
||||
namespace FGUI.ZM_H5_15
|
||||
{
|
||||
public partial class com_webview : GComponent
|
||||
{
|
||||
public GComponent com_fly;
|
||||
public GGraph fly_area;
|
||||
public GImage top_bg;
|
||||
public GButton btn_close;
|
||||
public com_top com_top;
|
||||
public btn_icon btn_icon;
|
||||
public GButton btn_out;
|
||||
public const string URL = "ui://ldxlghf7j4a20";
|
||||
|
||||
public static com_webview CreateInstance()
|
||||
{
|
||||
return (com_webview)UIPackage.CreateObject("ZM_H5_15", "com_webview");
|
||||
}
|
||||
|
||||
public override void ConstructFromXML(XML xml)
|
||||
{
|
||||
base.ConstructFromXML(xml);
|
||||
|
||||
com_fly = (GComponent)GetChildAt(0);
|
||||
fly_area = (GGraph)GetChildAt(2);
|
||||
top_bg = (GImage)GetChildAt(3);
|
||||
btn_close = (GButton)GetChildAt(4);
|
||||
com_top = (com_top)GetChildAt(5);
|
||||
btn_icon = (btn_icon)GetChildAt(6);
|
||||
btn_out = (GButton)GetChildAt(7);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3c72bed406f1846fc98d91d9025f57df
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -33,6 +33,7 @@ namespace FGUI.ZM_Lobby_03
|
||||
public GButton btn_live;
|
||||
public GButton btn_wheel;
|
||||
public btn_sign btn_sign;
|
||||
public GButton btn_wv;
|
||||
public GButton btn_shop;
|
||||
public btn_task_pass btn_pass;
|
||||
public GButton btn_three_day;
|
||||
@@ -80,16 +81,17 @@ namespace FGUI.ZM_Lobby_03
|
||||
btn_live = (GButton)GetChildAt(26);
|
||||
btn_wheel = (GButton)GetChildAt(27);
|
||||
btn_sign = (btn_sign)GetChildAt(28);
|
||||
btn_shop = (GButton)GetChildAt(29);
|
||||
btn_pass = (btn_task_pass)GetChildAt(30);
|
||||
btn_three_day = (GButton)GetChildAt(31);
|
||||
btn_task = (GButton)GetChildAt(32);
|
||||
btn_noads = (GButton)GetChildAt(33);
|
||||
btn_record = (GButton)GetChildAt(34);
|
||||
btn_restore = (GButton)GetChildAt(35);
|
||||
btn_egg = (btn_egg)GetChildAt(36);
|
||||
top_panel = (GGroup)GetChildAt(37);
|
||||
btn_chat = (GButton)GetChildAt(38);
|
||||
btn_wv = (GButton)GetChildAt(29);
|
||||
btn_shop = (GButton)GetChildAt(30);
|
||||
btn_pass = (btn_task_pass)GetChildAt(31);
|
||||
btn_three_day = (GButton)GetChildAt(32);
|
||||
btn_task = (GButton)GetChildAt(33);
|
||||
btn_noads = (GButton)GetChildAt(34);
|
||||
btn_record = (GButton)GetChildAt(35);
|
||||
btn_restore = (GButton)GetChildAt(36);
|
||||
btn_egg = (btn_egg)GetChildAt(37);
|
||||
top_panel = (GGroup)GetChildAt(38);
|
||||
btn_chat = (GButton)GetChildAt(39);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -796,52 +796,52 @@ public static IEnumerator LoadTexture(string fileName, GLoader loader, Action<NT
|
||||
}
|
||||
|
||||
// 调用统一的 SetImgLoader,不需要再自己写下载逻辑
|
||||
SetImgLoader(null, fileName, nTex =>
|
||||
{
|
||||
if (nTex != null && nTex.nativeTexture != null)
|
||||
{
|
||||
Debug.Log("背景图片加载成功!");
|
||||
|
||||
var tex2D = nTex.nativeTexture as Texture2D;
|
||||
if (tex2D == null)
|
||||
{
|
||||
Debug.LogError("NTexture 转换失败!");
|
||||
return;
|
||||
}
|
||||
tex2D.name = fileName;
|
||||
// 创建 Sprite
|
||||
var sprite = Sprite.Create(
|
||||
tex2D,
|
||||
new Rect(0, 0, tex2D.width, tex2D.height),
|
||||
new Vector2(0.5f, 0.5f)
|
||||
);
|
||||
_spriteRenderer.sprite = sprite;
|
||||
|
||||
if (_currentNTexture != null)
|
||||
{
|
||||
_currentNTexture.Dispose();
|
||||
_currentNTexture = null;
|
||||
}
|
||||
if (_currentBackgroundSprite != null)
|
||||
{
|
||||
Object.Destroy(_currentBackgroundSprite);
|
||||
_currentBackgroundSprite = null;
|
||||
}
|
||||
|
||||
_currentNTexture = nTex;
|
||||
_currentBackgroundSprite = sprite;
|
||||
|
||||
var currentWidth = _spriteRenderer.sprite.bounds.size.x;
|
||||
var scaleFactor = 64f / currentWidth;
|
||||
|
||||
// 等比缩放
|
||||
_spriteRenderer.transform.localScale = new Vector3(scaleFactor, scaleFactor, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogError("背景图片加载失败!");
|
||||
}
|
||||
}, "LevelAlbums/", FolderNames.AlbumName, true, false, true); // ✅ 背景一般是立刻需要的,走优先下载
|
||||
// SetImgLoader(null, fileName, nTex =>
|
||||
// {
|
||||
// if (nTex != null && nTex.nativeTexture != null)
|
||||
// {
|
||||
// Debug.Log("背景图片加载成功!");
|
||||
//
|
||||
// var tex2D = nTex.nativeTexture as Texture2D;
|
||||
// if (tex2D == null)
|
||||
// {
|
||||
// Debug.LogError("NTexture 转换失败!");
|
||||
// return;
|
||||
// }
|
||||
// tex2D.name = fileName;
|
||||
// // 创建 Sprite
|
||||
// var sprite = Sprite.Create(
|
||||
// tex2D,
|
||||
// new Rect(0, 0, tex2D.width, tex2D.height),
|
||||
// new Vector2(0.5f, 0.5f)
|
||||
// );
|
||||
// _spriteRenderer.sprite = sprite;
|
||||
//
|
||||
// if (_currentNTexture != null)
|
||||
// {
|
||||
// _currentNTexture.Dispose();
|
||||
// _currentNTexture = null;
|
||||
// }
|
||||
// if (_currentBackgroundSprite != null)
|
||||
// {
|
||||
// Object.Destroy(_currentBackgroundSprite);
|
||||
// _currentBackgroundSprite = null;
|
||||
// }
|
||||
//
|
||||
// _currentNTexture = nTex;
|
||||
// _currentBackgroundSprite = sprite;
|
||||
//
|
||||
// var currentWidth = _spriteRenderer.sprite.bounds.size.x;
|
||||
// var scaleFactor = 64f / currentWidth;
|
||||
//
|
||||
// // 等比缩放
|
||||
// _spriteRenderer.transform.localScale = new Vector3(scaleFactor, scaleFactor, 1);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// Debug.LogError("背景图片加载失败!");
|
||||
// }
|
||||
// }, "LevelAlbums/", FolderNames.AlbumName, true, false, true); // ✅ 背景一般是立刻需要的,走优先下载
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using DontConfuse;
|
||||
using SGModule.NetKit;
|
||||
|
||||
namespace RedHotRoast
|
||||
@@ -60,6 +61,20 @@ namespace RedHotRoast
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.PayloadingUI_Close);
|
||||
MaxPayManager.Instance.PaySuccess();
|
||||
}
|
||||
|
||||
var last_time = PlayerPrefs.GetInt("Dayreftimes", 0);
|
||||
DateTime newDate = TimeZone.CurrentTimeZone.ToLocalTime(new DateTime(1970, 1, 1));
|
||||
newDate = newDate.AddSeconds(GameHelper.GetNowTime(true));
|
||||
// Debug.Log($"barry newdate==== {newDate}");
|
||||
var newDays = newDate.Day;
|
||||
if (last_time != newDays)
|
||||
{
|
||||
var configs = GameHelper.GetCommonModel();
|
||||
// Debug.Log($"barry hall-----{configs != null}");
|
||||
if (configs != null) {
|
||||
WebviewManager.Instance.RefreshUrl();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
private void OnGameStart(object obj)
|
||||
|
||||
Reference in New Issue
Block a user