feat(battle-engine): full Unity/VFX/god-object shims + expanded copy closure (2570 files)

Authored Unity primitive/object-model shim, VFX layer (control-flow-preserving, InstantVfx never invokes its action -- headless suppression), god-object stubs (GameMgr/EffectMgr/UIManager with faithfully-extracted nested enums), View/UI/Touch tree, LitJson+BetterList+Tuple copied, third-party stubs. Discovered Roslyn header-error masking: fixing class-header type errors unmasks body references, so the true copy closure is ~2570 files (was 782 under masking). Errors: masked-25720 -> 268; our shim files compile clean. Remaining: ~50 residual shim/external types, 24 NGUI UI-base overrides, static-type fixes, plus likely 1-2 more unmask waves.
This commit is contained in:
gamer147
2026-06-05 17:22:20 -04:00
parent 0d9d8acae0
commit 957af3d1ec
1795 changed files with 166536 additions and 0 deletions

View File

@@ -0,0 +1,44 @@
using Cute;
using UnityEngine;
namespace Wizard.Lottery;
public class LotteryApplyDialog : MonoBehaviour
{
private const float DIALOG_AUTO_CLOSE_TIME = 5f;
[SerializeField]
private UITexture _banner;
[SerializeField]
private UILabel _label;
private LotteryApplyData _data;
public static string GetLotteryTexturePath(LotteryApplyData data, bool isFetch)
{
return Toolbox.ResourcesManager.GetAssetTypePath(data.BannerFileName, ResourcesManager.AssetLoadPathType.Lottery, isFetch);
}
public static DialogBase Create(LotteryApplyData data, bool autoClose = true)
{
DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose();
dialogBase.SetSize(DialogBase.Size.M);
dialogBase.SetTitleLabel(data.DialogTitle);
dialogBase.SetButtonLayout(DialogBase.ButtonLayout.OkBtn);
if (autoClose)
{
dialogBase.AutoClose(5f);
}
GameObject gameObject = Object.Instantiate(UIManager.GetInstance()._lotteryApplyPrefab);
gameObject.GetComponent<LotteryApplyDialog>()._data = data;
dialogBase.SetObj(gameObject);
return dialogBase;
}
private void Start()
{
_banner.mainTexture = Toolbox.ResourcesManager.LoadObject<Texture>(GetLotteryTexturePath(_data, isFetch: true));
_label.text = _data.DialogMessage;
}
}

View File

@@ -0,0 +1,78 @@
using System;
using LitJson;
using UnityEngine;
namespace Wizard.Lottery;
public class LotteryLoadTaskData
{
private bool IsEnable { get; set; }
private DateTime StartTime { get; set; }
private DateTime EndTime { get; set; }
private DateTime CloseTime { get; set; }
private int ReceiveServerTime { get; set; }
private double ReceiveSinceStartUpTime { get; set; }
public bool IsExistReward { get; private set; }
public static LotteryLoadTaskData Parse(JsonData json)
{
LotteryLoadTaskData lotteryLoadTaskData = new LotteryLoadTaskData();
if (json["data"].Keys.Contains("lottery_period_info"))
{
JsonData jsonData = json["data"]["lottery_period_info"];
if (jsonData != null)
{
DateTime startTime = DateTime.Parse(jsonData["start_time"].ToString());
DateTime endTime = DateTime.Parse(jsonData["end_time"].ToString());
lotteryLoadTaskData.IsEnable = true;
lotteryLoadTaskData.StartTime = startTime;
lotteryLoadTaskData.EndTime = endTime;
lotteryLoadTaskData.CloseTime = DateTime.Parse(jsonData["close_time"].ToString());
lotteryLoadTaskData.ReceiveServerTime = json["data_headers"]["servertime"].ToInt();
lotteryLoadTaskData.ReceiveSinceStartUpTime = Time.realtimeSinceStartup;
lotteryLoadTaskData.IsExistReward = jsonData["has_reward"].ToBoolean();
}
else
{
lotteryLoadTaskData.IsEnable = false;
}
}
else
{
lotteryLoadTaskData.IsEnable = false;
}
return lotteryLoadTaskData;
}
public bool IsCampaignTimeNow()
{
return IsTimeEnablePeriod(StartTime, EndTime);
}
public bool IsReceiveTimeNow()
{
return IsTimeEnablePeriod(StartTime, CloseTime);
}
private bool IsTimeEnablePeriod(DateTime start, DateTime end)
{
if (!IsEnable)
{
return false;
}
double num = ConvertTime.DateTimeToUnixTime(start);
double num2 = ConvertTime.DateTimeToUnixTime(end);
double num3 = (double)((float)ReceiveServerTime + Time.realtimeSinceStartup) - ReceiveSinceStartUpTime;
if (num3 < num || num3 >= num2)
{
return false;
}
return true;
}
}

View File

@@ -0,0 +1,57 @@
using LitJson;
namespace Wizard.Lottery;
public class LotteryMissionData
{
public int MissionId { get; private set; }
public string MissionTitle { get; private set; }
public UserGoods.Type UserGoodsType { get; private set; }
public int ItemId { get; private set; }
public int ItemCount { get; private set; }
public RemainTime StartTime { get; private set; }
public RemainTime EndTime { get; private set; }
public int MissionCurrent { get; private set; }
public int MissionMax { get; private set; }
public bool IsCleared { get; private set; }
public bool IsTimeOver { get; private set; }
public float MissionRatio
{
get
{
if (MissionMax == 0)
{
return 0f;
}
return (float)MissionCurrent / (float)MissionMax;
}
}
public LotteryMissionData(JsonData json, double serverTime)
{
MissionId = json["mission_id"].ToInt();
ItemId = json["reward_detail_id"].ToInt();
UserGoodsType = (UserGoods.Type)json["reward_type"].ToInt();
ItemCount = json["reward_number"].ToInt();
MissionTitle = json["mission_name"].ToString();
MissionCurrent = json["total_count"].ToInt();
MissionMax = json["require_number"].ToInt();
IsCleared = json["is_achieved"].ToInt() == 1;
IsTimeOver = json["is_failed"].ToInt() == 1;
string endTime = ConvertTime.UnixTimeToDateTime(json["start_time"].ToInt()).ToString();
string endTime2 = ConvertTime.UnixTimeToDateTime(json["end_time"].ToInt()).ToString();
StartTime = new RemainTime(endTime, serverTime);
EndTime = new RemainTime(endTime2, serverTime);
}
}