private void _changeState() { switch (_attackState) { case AttackState.End: break; case AttackState.FriendBomb: _attackState = (_clsAerial.IsRaigeki_e() ? AttackState.FriendRaigeki : AttackState.FriendExplosion); break; case AttackState.FriendRaigeki: _attackState = AttackState.FriendExplosion; break; case AttackState.FriendExplosion: _attackState = AttackState.End; break; case AttackState.None: if (_clsAerial.IsBakugeki_e()) { _attackState = AttackState.FriendBomb; } else if (_clsAerial.IsRaigeki_e()) { _attackState = AttackState.FriendRaigeki; } else { _attackState = AttackState.End; } break; } }
public bool _init() { _fieldCamera = BattleTaskManager.GetBattleCameras().friendFieldCamera; _uiPanel = new UIPanel[2]; _uiAirObjF = new GameObject[2]; _uiAirObjE = new GameObject[2]; _cloudPanel = new UIPanel[2]; _bgTex = new UITexture[2]; _cloudParPanel = new UIPanel[2]; _cloudPar = (ParticleSystem[])new ParticleSystem[2]; _gunPar = (ParticleSystem[])new ParticleSystem[2]; foreach (int value in Enum.GetValues(typeof(FleetType))) { if (value != 2) { Util.FindParentToChild(ref _uiPanel[value], base.transform, $"{((FleetType)value).ToString()}Panel"); if (_uiAirObjF[value] == null) { _uiAirObjF[value] = _uiPanel[value].transform.FindChild("FAircraft").gameObject; } if (_uiAirObjE[value] == null) { _uiAirObjE[value] = _uiPanel[value].transform.FindChild("EAircraft").gameObject; } Util.FindParentToChild(ref _cloudPanel[value], base.transform, $"{((FleetType)value).ToString()}CloudPanel"); Util.FindParentToChild(ref _bgTex[value], _cloudPanel[value].transform, "Bg"); Util.FindParentToChild(ref _cloudParPanel[value], base.transform, $"{((FleetType)value).ToString()}CloudParPanel"); Util.FindParentToChild <ParticleSystem>(ref _gunPar[value], _cloudPanel[value].transform, "Gun"); } } bool flag = false; bool flag2 = false; if (_clsAerial.IsBakugeki_f() || _clsAerial.IsRaigeki_f()) { flag = true; } if (_clsAerial.IsBakugeki_e() || _clsAerial.IsRaigeki_e()) { flag2 = true; } if (flag && flag2) { _iType = CutInType.Both; } else if (flag && !flag2) { _iType = CutInType.FriendOnly; } BattleCameras battleCameras = BattleTaskManager.GetBattleCameras(); BattleCutInCamera cutInCamera = battleCameras.cutInCamera; BattleCutInEffectCamera cutInEffectCamera = BattleTaskManager.GetBattleCameras().cutInEffectCamera; if (_iType == CutInType.Both) { battleCameras.SetSplitCameras2D(isSplit: true); cutInCamera.isCulling = true; cutInEffectCamera.isCulling = true; } else if (_iType == CutInType.FriendOnly) { cutInCamera.isCulling = true; cutInEffectCamera.isCulling = true; } Observable.FromCoroutine(_createAsyncAircrafts).Subscribe(delegate { }); return(true); }