using CG.Framework; using CG.UTility; using System; using System.Collections; using System.Collections.Generic; using UnityEngine; /******************************************************************************* *Create By CG *Function 部件拆装场景控制 *******************************************************************************/ namespace ZXK.GYJQR { public class BJCZSceneCtrl : MonoBehaviour { public static BJCZSceneCtrl _Instance = null; private AcquaintPartCtrl _acquaintCtrl = null; private AllSplitCtrl _allSplitCtrl = null; private OrderSplitCtrl _orderSplitCtrl = null; private SchematicCtrl _schematicCtrl = null; [ReadOnly]//是否正在播放拆解动画 public bool _isPlaySplitAnm = false; [ReadOnly]//部件认知时独显物体 public GameObject _OnlyShowGeo = null; private void Awake() { if (_Instance == null) { _Instance = this; } } /// /// 切换不同状态和不同模型调用 /// public void ModelAndStateChanged() { if (_acquaintCtrl == null) { _acquaintCtrl = transform.GetComponentInChildren(true); } if (_allSplitCtrl == null) { _allSplitCtrl = transform.GetComponentInChildren(true); } if (_orderSplitCtrl == null) { _orderSplitCtrl = transform.GetComponentInChildren(true); } if (_schematicCtrl == null) { _schematicCtrl = transform.GetComponentInChildren(true); } _acquaintCtrl?.End(); _allSplitCtrl?.End(); _orderSplitCtrl?.End(); _schematicCtrl?.End(); switch ((EnumCtrl.BJCZState)GameManager.Instance._DataBJCJHandler._CurState.Value) { case EnumCtrl.BJCZState.BJRZ: _acquaintCtrl?.Enter(); break; case EnumCtrl.BJCZState.YJCJ: _allSplitCtrl?.EnterYJCJ(); break; case EnumCtrl.BJCZState.YJPZ: _allSplitCtrl?.EnterYJPZ(); break; case EnumCtrl.BJCZState.SXCJ: _orderSplitCtrl?.Enter(); break; case EnumCtrl.BJCZState.YLSY: _schematicCtrl?.Enter(); break; default: break; } } /// /// 部件认知中双击 /// /// /// public void DoubleClick(string showGroupName, string geoName) { _acquaintCtrl.DoubleClickShow(showGroupName, geoName); } } }