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:
79
SVSim.BattleEngine/Engine/MyPageSubBanner.cs
Normal file
79
SVSim.BattleEngine/Engine/MyPageSubBanner.cs
Normal file
@@ -0,0 +1,79 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using Wizard;
|
||||
|
||||
public class MyPageSubBanner : MyPageBannerBase
|
||||
{
|
||||
private const int BANNER_VERTICAL_SPACING = 73;
|
||||
|
||||
[SerializeField]
|
||||
private GameObject _bannerRoot;
|
||||
|
||||
[SerializeField]
|
||||
private GameObject _roomCampaignBadge;
|
||||
|
||||
public void HideAndRepositionBanner(string click)
|
||||
{
|
||||
if (_bannerList == null || _bannerList.Count <= 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
foreach (BannerInfo banner in _bannerList)
|
||||
{
|
||||
if (banner.Click == click)
|
||||
{
|
||||
banner.BannerGameObject.SetActive(value: false);
|
||||
}
|
||||
}
|
||||
RepositionBannerObject();
|
||||
}
|
||||
|
||||
protected override IEnumerator CreateBannerImage()
|
||||
{
|
||||
_roomCampaignBadge.SetActive(value: false);
|
||||
if (Data.MyPage.data._subBannerInfoList != null)
|
||||
{
|
||||
_bannerList = new List<BannerInfo>(Data.MyPage.data._subBannerInfoList);
|
||||
}
|
||||
if (_bannerList == null || _bannerList.Count <= 0)
|
||||
{
|
||||
base.gameObject.SetActive(value: false);
|
||||
yield break;
|
||||
}
|
||||
yield return LoadBannerImage();
|
||||
while (!base.gameObject.activeInHierarchy)
|
||||
{
|
||||
yield return null;
|
||||
}
|
||||
for (int i = 0; i < _bannerList.Count; i++)
|
||||
{
|
||||
GameObject gameObject = NGUITools.AddChild(_bannerRoot, _bannerImagePrefab);
|
||||
InitializeEventHandler(gameObject, _bannerList[i]);
|
||||
if (_bannerList[i].NeedBadge)
|
||||
{
|
||||
GameObject obj = NGUITools.AddChild(gameObject, _roomCampaignBadge);
|
||||
obj.transform.localPosition = _roomCampaignBadge.transform.localPosition;
|
||||
obj.SetActive(value: true);
|
||||
}
|
||||
_bannerList[i].BannerGameObject = gameObject;
|
||||
}
|
||||
RepositionBannerObject();
|
||||
}
|
||||
|
||||
private void RepositionBannerObject()
|
||||
{
|
||||
int num = 0;
|
||||
foreach (BannerInfo banner in _bannerList)
|
||||
{
|
||||
GameObject bannerGameObject = banner.BannerGameObject;
|
||||
if (bannerGameObject.activeSelf)
|
||||
{
|
||||
Vector3 zero = Vector3.zero;
|
||||
zero += Vector3.down * num * 73f;
|
||||
bannerGameObject.transform.localPosition = zero;
|
||||
num++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user