Files
SVSimServer/SVSim.BattleEngine/Engine/Wizard/Field72.cs
gamer147 957af3d1ec 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.
2026-06-05 17:22:20 -04:00

84 lines
3.6 KiB
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace Wizard;
public class Field72 : BackGroundBase
{
public override int FieldId => 72;
public Field72(string bgmId = "NONE")
: base(bgmId)
{
}
protected override void BattleFieldBuild()
{
BattleCoroutine.GetInstance().StartCoroutine(BackGroundBase.ObjectChecker(0.5f, _str3DFieldPath, delegate
{
base.Field = GameObject.Find(_str3DFieldPath);
base.Field.transform.parent = GameMgr.GetIns().m_GameManagerObj.transform;
_fieldModel = base.Field.transform.Find("md_bf_0072_root").gameObject;
_fieldParticles = _fieldModel.transform.Find("Particles72").gameObject;
_fieldObjDictionary.Add("fence", _fieldModel.transform.Find("md_bf_0072_01_fence").gameObject);
m_FieldAnimatorDictionary.Add("fence", _fieldObjDictionary["fence"].GetComponent<Animator>());
_fieldParticleSystemDictionary.Add("opening", _fieldParticles.transform.Find("opening").GetComponent<ParticleSystem>());
_fieldParticleSystemDictionary.Add("shake", _fieldParticles.transform.Find("shake").GetComponent<ParticleSystem>());
List<string> list = new List<string>(_fieldObjDictionary.Keys);
List<GameObject> list2 = new List<GameObject>();
for (int i = 0; i < _fieldObjDictionary.Count; i++)
{
list2.Add(_fieldObjDictionary[list[i]]);
}
GameMgr.GetIns().GetEffectMgr().SetUIParticleShader(list2, delegate
{
base.SetShaderGlobalColorBG = base.Field.transform.Find("SetMaterialColorBGManager").GetComponent<SetShaderGlobalColorBG>();
base.IsLoadDone = true;
}, isBattle: true, isField: true);
}));
}
public override void StartFieldSetEffect(Vector3 pos)
{
GameMgr.GetIns().GetEffectMgr().Start(EffectMgr.EffectType.CMN_FIELD_SET_72, pos);
}
public override void StartFieldTapEffect(int areaId, Vector3 pos)
{
base.StartFieldTapEffect(areaId, pos);
if (areaId == 1)
{
GameMgr.GetIns().GetEffectMgr().Start(EffectMgr.EffectType.CMN_FIELD_TAP_72_1, pos);
}
}
protected override IEnumerator RunFieldOpening()
{
GameMgr.GetIns().GetSoundMgr().PlaySeByStr($"se_field_{_str3DFieldNo}_appear_1", "se_field_" + _str3DFieldNo, 0f, 0L);
_fieldParticleSystemDictionary["opening"].Play();
_battleCamera.Camera.transform.localPosition = new Vector3(2508f, -1012f, -111f);
_battleCamera.Camera.transform.localRotation = Quaternion.Euler(new Vector3(-22.5f, -80f, 86f));
iTween.MoveTo(_battleCamera.Camera.gameObject, iTween.Hash("position", new Vector3(-25f, 27f, -439f), "time", 2f, "islocal", true, "easetype", iTween.EaseType.easeInOutQuad));
iTween.RotateTo(_battleCamera.Camera.gameObject, iTween.Hash("rotation", new Vector3(-23f, -90f, 90f), "time", 2f, "islocal", true, "easetype", iTween.EaseType.easeInOutQuad));
yield return new WaitForSeconds(0.3f);
m_FieldAnimatorDictionary["fence"].SetTrigger("Open");
yield return new WaitForSeconds(1.7f);
m_FieldAnimatorDictionary["fence"].SetTrigger("Close");
iTween.MoveTo(_battleCamera.Camera.gameObject, iTween.Hash("position", _battleCamera.BattleCameraPos, "time", 2f, "islocal", true, "easetype", iTween.EaseType.easeInOutExpo));
iTween.RotateTo(_battleCamera.Camera.gameObject, iTween.Hash("rotation", _battleCamera.BattleCameraRot, "time", 2f, "islocal", true, "easetype", iTween.EaseType.easeInOutExpo));
yield return new WaitForSeconds(0f);
}
protected override IEnumerator RunFieldGimic(GameObject obj)
{
yield return new WaitForSeconds(0f);
}
protected override IEnumerator RunFieldShake()
{
_fieldParticleSystemDictionary["shake"].Play();
yield return new WaitForSeconds(0f);
}
}