Files
SVSimServer/SVSim.BattleEngine/Engine/Wizard/Field52.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

127 lines
7.9 KiB
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace Wizard;
public class Field52 : BackGroundBase
{
public override int FieldId => 52;
public Field52(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;
GimicAudioList = base.Field.GetComponent<AudioList>().GimicAudioList;
_fieldModel = base.Field.transform.Find("md_bf_0052_root").gameObject;
_fieldParticles = _fieldModel.transform.Find("Particles52").gameObject;
_fieldParticleSystemDictionary.Add("light", _fieldModel.transform.Find("md_bf_0052_01_movebranchlight_r/position/root/joint1/joint2/joint3/light").GetComponent<ParticleSystem>());
_fieldParticleSystemDictionary.Add("light_gimic", _fieldModel.transform.Find("md_bf_0052_01_movebranchlight_r/position/root/joint1/joint2/joint3/light_gimic").GetComponent<ParticleSystem>());
_fieldParticleSystemDictionary.Add("light_shake", _fieldModel.transform.Find("md_bf_0052_01_movebranchlight_r/position/root/joint1/joint2/joint3/light_shake").GetComponent<ParticleSystem>());
_fieldParticleSystemDictionary.Add("light_l", _fieldModel.transform.Find("md_bf_0052_01_movebranchlight_l/position/root/joint1/joint2/joint3/light_l").GetComponent<ParticleSystem>());
_fieldParticleSystemDictionary.Add("light_shake_l", _fieldModel.transform.Find("md_bf_0052_01_movebranchlight_l/position/root/joint1/joint2/joint3/light_shake_l").GetComponent<ParticleSystem>());
AddParticleToFieldObjDictionary("base/emitter_T/ef_dust1_mlt_inv_1");
AddParticleToFieldObjDictionary("base/emitter_B/ef_dust1_mlt_inv_1");
AddParticleToFieldObjDictionary("base/emitter_L/ef_dust1_mlt_inv_1");
AddParticleToFieldObjDictionary("shake/ef_dust1_mlt_inv_1");
_fieldObjDictionary.Add("movebranch_a", _fieldModel.transform.Find("md_bf_0052_01_movebranch_a").gameObject);
_fieldObjDictionary.Add("movebranch_b", _fieldModel.transform.Find("md_bf_0052_01_movebranch_b").gameObject);
_fieldObjDictionary.Add("movebranch_c", _fieldModel.transform.Find("md_bf_0052_01_movebranch_c").gameObject);
_fieldObjDictionary.Add("movebranch_d", _fieldModel.transform.Find("md_bf_0052_01_movebranch_d").gameObject);
_fieldObjDictionary.Add("movebranch_e", _fieldModel.transform.Find("md_bf_0052_01_movebranch_e").gameObject);
_fieldObjDictionary.Add("movebranchlight_l", _fieldModel.transform.Find("md_bf_0052_01_movebranchlight_l").gameObject);
_fieldObjDictionary.Add("movebranchlight_r", _fieldModel.transform.Find("md_bf_0052_01_movebranchlight_r").gameObject);
m_FieldAnimatorDictionary.Add("movebranch_a", _fieldObjDictionary["movebranch_a"].GetComponent<Animator>());
m_FieldAnimatorDictionary.Add("movebranch_b", _fieldObjDictionary["movebranch_b"].GetComponent<Animator>());
m_FieldAnimatorDictionary.Add("movebranch_c", _fieldObjDictionary["movebranch_c"].GetComponent<Animator>());
m_FieldAnimatorDictionary.Add("movebranch_d", _fieldObjDictionary["movebranch_d"].GetComponent<Animator>());
m_FieldAnimatorDictionary.Add("movebranch_e", _fieldObjDictionary["movebranch_e"].GetComponent<Animator>());
m_FieldAnimatorDictionary.Add("movebranchlight_l", _fieldObjDictionary["movebranchlight_l"].GetComponent<Animator>());
m_FieldAnimatorDictionary.Add("movebranchlight_r", _fieldObjDictionary["movebranchlight_r"].GetComponent<Animator>());
_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_52, pos);
}
public override void StartFieldTapEffect(int areaId, Vector3 pos)
{
base.StartFieldTapEffect(areaId, pos);
GameMgr.GetIns().GetEffectMgr().Start(EffectMgr.EffectType.CMN_FIELD_TAP_52_1, pos);
}
protected override IEnumerator RunFieldOpening()
{
GameMgr.GetIns().GetSoundMgr().PlaySeByStr($"se_field_{_str3DFieldNo}_appear_1", "se_field_" + _str3DFieldNo, 0f, 0L);
_fieldParticleSystemDictionary["light"].Play();
_fieldParticleSystemDictionary["light_l"].Play();
_battleCamera.Camera.transform.localPosition = new Vector3(3322f, -1847f, 36f);
_battleCamera.Camera.transform.localRotation = Quaternion.Euler(new Vector3(-84f, -90f, 90f));
Vector3[] bezierQuad = MotionUtils.GetBezierQuad(new Vector3(3322f, -1847f, 36f), new Vector3(2800f, 40f, 36f), new Vector3(1036f, -27.7f, 0f), 10);
iTween.MoveTo(_battleCamera.Camera.gameObject, iTween.Hash("path", bezierQuad, "movetopath", false, "time", 1.5f, "islocal", true, "easetype", iTween.EaseType.easeInSine));
iTween.RotateTo(_battleCamera.Camera.gameObject, iTween.Hash("rotation", new Vector3(-8f, -90f, 90f), "time", 1.5f, "islocal", true, "easetype", iTween.EaseType.easeInSine));
yield return new WaitForSeconds(1.5f);
_battleCamera.Camera.transform.localPosition = new Vector3(1036f, -27.7f, 0f);
_battleCamera.Camera.transform.localRotation = Quaternion.Euler(new Vector3(-8f, -90f, 90f));
iTween.MoveTo(_battleCamera.Camera.gameObject, iTween.Hash("position", new Vector3(-323f, -19f, -18f), "time", 0.5f, "islocal", true, "easetype", iTween.EaseType.easeOutQuad));
iTween.RotateTo(_battleCamera.Camera.gameObject, iTween.Hash("rotation", new Vector3(-1f, -90f, 90f), "time", 0.5f, "islocal", true, "easetype", iTween.EaseType.easeOutQuad));
yield return new WaitForSeconds(0.5f);
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)
{
string tag = obj.tag;
if (tag != null && tag == "FieldGimic1" && _gimicCntDictionary[obj.tag] == 0)
{
GameMgr.GetIns().GetSoundMgr().PlaySeByStr($"se_field_{_str3DFieldNo}_gim_1", "se_field_" + _str3DFieldNo, 0f, 0L);
_gimicCntDictionary[obj.tag]++;
m_FieldAnimatorDictionary["movebranchlight_r"].SetTrigger("tap");
_fieldParticleSystemDictionary["light"].Stop();
_fieldParticleSystemDictionary["light_gimic"].Play();
yield return new WaitForSeconds(2f);
_fieldParticleSystemDictionary["light"].Play();
_gimicCntDictionary[obj.tag] = 0;
}
yield return new WaitForSeconds(0f);
}
protected override IEnumerator RunFieldShake()
{
m_FieldAnimatorDictionary["movebranch_a"].SetTrigger("shake");
m_FieldAnimatorDictionary["movebranch_b"].SetTrigger("shake");
m_FieldAnimatorDictionary["movebranch_c"].SetTrigger("shake");
m_FieldAnimatorDictionary["movebranch_d"].SetTrigger("shake");
m_FieldAnimatorDictionary["movebranch_e"].SetTrigger("shake");
m_FieldAnimatorDictionary["movebranchlight_l"].SetTrigger("shake");
m_FieldAnimatorDictionary["movebranchlight_r"].SetTrigger("shake");
_fieldParticleSystemDictionary["shake"].Play();
_fieldParticleSystemDictionary["light_shake"].Play();
_fieldParticleSystemDictionary["light_shake_l"].Play();
yield return new WaitForSeconds(3f);
}
}