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

81 lines
3.2 KiB
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Nat4Field : NateField
{
public override int FieldId => 34;
public Nat4Field(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_nat4_root").gameObject;
_fieldParticles = _fieldModel.transform.Find("Particles34").gameObject;
_fieldObjDictionary.Add("lid", _fieldModel.transform.Find("md_bf_nat4_01_pipemove_lid").gameObject);
_fieldObjDictionary.Add("big", _fieldModel.transform.Find("md_bf_nat4_01_pipemove_big").gameObject);
m_FieldAnimatorDictionary.Add("big", _fieldObjDictionary["big"].GetComponent<Animator>());
m_FieldAnimatorDictionary.Add("lid", _fieldObjDictionary["lid"].GetComponent<Animator>());
_fieldParticleSystemDictionary.Add("gimic_1", _fieldParticles.transform.Find("gimic_1").GetComponent<ParticleSystem>());
_fieldParticleSystemDictionary.Add("shake", _fieldParticles.transform.Find("shake").GetComponent<ParticleSystem>());
_fieldObjDictionary.Add(_fieldParticles.name, _fieldParticles);
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_34, pos);
}
public override void StartFieldTapEffect(int areaId, Vector3 pos)
{
base.StartFieldTapEffect(areaId, pos);
GameMgr.GetIns().GetEffectMgr().Start(EffectMgr.EffectType.CMN_FIELD_TAP_34_1, pos);
}
protected override IEnumerator RunFieldGimic(GameObject obj)
{
string tag = obj.tag;
if (tag != null && tag == "FieldGimic1" && _gimicCntDictionary[obj.tag] == 0)
{
_gimicCntDictionary[obj.tag]++;
if (Random.Range(0, 2) == 0)
{
GameMgr.GetIns().GetSoundMgr().PlaySeByStr($"se_field_{_str3DFieldNo}_gim_1", "se_field_" + _str3DFieldNo, 0f, 0L);
m_FieldAnimatorDictionary["lid"].SetTrigger("Open");
_fieldParticleSystemDictionary["gimic_1"].Play();
yield return new WaitForSeconds(8f);
}
_gimicCntDictionary[obj.tag] = 0;
}
yield return new WaitForSeconds(0f);
}
protected override IEnumerator RunFieldShake()
{
m_FieldAnimatorDictionary["big"].SetTrigger("Impact");
m_FieldAnimatorDictionary["lid"].SetTrigger("Impact");
_fieldParticleSystemDictionary["shake"].Play();
yield return new WaitForSeconds(0f);
}
}