feat(battle-engine): EffectType full enum + collection/card/vfx extension copies
Replaces partial EffectMgr.EffectType with all 226 decomp values; copies the IsNotNullOrEmpty/EquelsID/FindFromCardId/GetAllFuncVfxResults extension files + UI extensions; adds Renderer/MeshFilter shared-material/mesh/sortingOrder. Compile loop then closed the revealed deps (3242 files). 9.1k -> 18 errors.
This commit is contained in:
51
SVSim.BattleEngine/Engine/Wizard/UserRegionUpdater.cs
Normal file
51
SVSim.BattleEngine/Engine/Wizard/UserRegionUpdater.cs
Normal file
@@ -0,0 +1,51 @@
|
||||
using System;
|
||||
using Cute;
|
||||
|
||||
namespace Wizard;
|
||||
|
||||
public class UserRegionUpdater
|
||||
{
|
||||
private enum UpdateRegionType
|
||||
{
|
||||
CURRENT,
|
||||
INSTALL
|
||||
}
|
||||
|
||||
private RegionCodeUpdateTask _regionUpdateTask;
|
||||
|
||||
private UpdateRegionType _updateType = UpdateRegionType.INSTALL;
|
||||
|
||||
private bool _isUpdateRegion;
|
||||
|
||||
public UserRegionUpdater()
|
||||
{
|
||||
_regionUpdateTask = new RegionCodeUpdateTask();
|
||||
}
|
||||
|
||||
public void UpDateRegion(Action callback)
|
||||
{
|
||||
string value = PlayerPrefsWrapper.GetValue(PlayerPrefsWrapper.INSTALL_REGION_CODE);
|
||||
string currentRegionStr = PlayerPrefsWrapper.GetValue(PlayerPrefsWrapper.CURRENT_REGION_CODE);
|
||||
if (string.IsNullOrEmpty(value) && !string.IsNullOrEmpty(currentRegionStr))
|
||||
{
|
||||
_isUpdateRegion = true;
|
||||
_updateType = UpdateRegionType.INSTALL;
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(currentRegionStr) && value != currentRegionStr)
|
||||
{
|
||||
_isUpdateRegion = true;
|
||||
_updateType = UpdateRegionType.CURRENT;
|
||||
}
|
||||
if (!_isUpdateRegion)
|
||||
{
|
||||
callback();
|
||||
return;
|
||||
}
|
||||
_regionUpdateTask.SetParameter((int)_updateType);
|
||||
UIManager.GetInstance().StartCoroutine(Toolbox.NetworkManager.Connect(_regionUpdateTask, delegate
|
||||
{
|
||||
PlayerPrefsWrapper.SetValue(PlayerPrefsWrapper.INSTALL_REGION_CODE, currentRegionStr);
|
||||
callback();
|
||||
}, BaseTask.OnRequestFailed, BaseTask.OnFailedErrorCode));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user