using UnityEngine; public class CavansLootAtCamera : BasePanel { public static CavansLootAtCamera Instance; public LookAtCameraName LookAtCameraName = LookAtCameraName.None; protected override void Awake() { base.Awake(); Instance = this; } void Update() { transform.forward = Camera.main.transform.forward; } private void Start() { } protected override void OnChangeToggle(string togglePath, bool isOn) { if (isOn) { Debug.Log(togglePath); switch (togglePath) { case "丹阳市万隆铸造有限公司": if (UI_UpBgPanel.instance.UpToggleState == UpToggleState.驾驶室) { Manager.Instance.LoadImageFromResources(Manager.Instance.EnterpriseInformation_image, Manager.Instance.targetImage, Manager.Instance.EnterpriseInformationName_text, "企业信息/丹阳市万隆铸造有限公司"); } Manager.Instance.MyLookAtCameraNamel = LookAtCameraName.丹阳市万隆铸造有限公司; break; case "丹阳信德电气设备有限公司": if (UI_UpBgPanel.instance.UpToggleState == UpToggleState.驾驶室) { Manager.Instance.LoadImageFromResources(Manager.Instance.EnterpriseInformation_image, Manager.Instance.targetImage, Manager.Instance.EnterpriseInformationName_text, "企业信息/丹阳信德电气设备有限公司"); } Manager.Instance.MyLookAtCameraNamel = LookAtCameraName.丹阳信德电气设备有限公司; break; case "丹阳伊尔特金属制品有限公司": if (UI_UpBgPanel.instance.UpToggleState == UpToggleState.驾驶室) { Manager.Instance.LoadImageFromResources(Manager.Instance.EnterpriseInformation_image, Manager.Instance.targetImage, Manager.Instance.EnterpriseInformationName_text, "企业信息/丹阳伊尔特金属制品有限公司"); } Manager.Instance.MyLookAtCameraNamel = LookAtCameraName.丹阳伊尔特金属制品有限公司; break; case "江苏天海精密模具有限公司": if (UI_UpBgPanel.instance.UpToggleState == UpToggleState.驾驶室) { Manager.Instance.LoadImageFromResources(Manager.Instance.EnterpriseInformation_image, Manager.Instance.targetImage, Manager.Instance.EnterpriseInformationName_text, "企业信息/江苏天海精密模具有限公司"); } Manager.Instance.MyLookAtCameraNamel = LookAtCameraName.江苏天海精密模具有限公司; break; case "丹阳市汇联机械配件有限公司": if (UI_UpBgPanel.instance.UpToggleState == UpToggleState.驾驶室) { Manager.Instance.LoadImageFromResources(Manager.Instance.EnterpriseInformation_image, Manager.Instance.targetImage, Manager.Instance.EnterpriseInformationName_text, "企业信息/丹阳市汇联机械配件有限公司"); } Manager.Instance.MyLookAtCameraNamel = LookAtCameraName.丹阳市汇联机械配件有限公司; break; case "丹阳市骏锋精工有限公司": if (UI_UpBgPanel.instance.UpToggleState == UpToggleState.驾驶室) { Manager.Instance.LoadImageFromResources(Manager.Instance.EnterpriseInformation_image, Manager.Instance.targetImage, Manager.Instance.EnterpriseInformationName_text, "企业信息/丹阳市骏锋精工有限公司"); } Manager.Instance.MyLookAtCameraNamel = LookAtCameraName.丹阳市骏锋精工有限公司; break; case "江苏华晟电气科技有限公司": if (UI_UpBgPanel.instance.UpToggleState == UpToggleState.驾驶室) { Manager.Instance.LoadImageFromResources(Manager.Instance.EnterpriseInformation_image, Manager.Instance.targetImage, Manager.Instance.EnterpriseInformationName_text, "企业信息/江苏华晟电气科技有限公司"); } Manager.Instance.MyLookAtCameraNamel = LookAtCameraName.江苏华晟电气科技有限公司; break; case "丹阳市富强五金铸造厂": if (UI_UpBgPanel.instance.UpToggleState == UpToggleState.驾驶室) { Manager.Instance.LoadImageFromResources(Manager.Instance.EnterpriseInformation_image, Manager.Instance.targetImage, Manager.Instance.EnterpriseInformationName_text, "企业信息/丹阳市富强五金铸造厂"); } Manager.Instance.MyLookAtCameraNamel = LookAtCameraName.丹阳市富强五金铸造厂; break; case "江苏伟业铸造有限公司": if (UI_UpBgPanel.instance.UpToggleState == UpToggleState.驾驶室) { Manager.Instance.LoadImageFromResources(Manager.Instance.EnterpriseInformation_image, Manager.Instance.targetImage, Manager.Instance.EnterpriseInformationName_text, "企业信息/江苏伟业铸造有限公司"); } Manager.Instance.MyLookAtCameraNamel = LookAtCameraName.江苏伟业铸造有限公司; break; case "江苏天乐金属制品有限公司": if (UI_UpBgPanel.instance.UpToggleState == UpToggleState.驾驶室) { Manager.Instance.LoadImageFromResources(Manager.Instance.EnterpriseInformation_image, Manager.Instance.targetImage, Manager.Instance.EnterpriseInformationName_text, "企业信息/江苏天乐金属制品有限公司"); } Manager.Instance.MyLookAtCameraNamel = LookAtCameraName.江苏天乐金属制品有限公司; break; case "排污BTN": LookAtCameraName = LookAtCameraName.排污; //Manager.Instance.LoadImageFromResources("企业信息/江苏天乐金属制品有限公司"); break; case "厂房BTN": LookAtCameraName = LookAtCameraName.厂房; //Manager.Instance.LoadImageFromResources("企业信息/江苏天乐金属制品有限公司"); break; case "农田BTN": LookAtCameraName = LookAtCameraName.农田; //Manager.Instance.LoadImageFromResources("企业信息/江苏天乐金属制品有限公司"); break; } } } protected override void OnClick(string btnPath) { Debug.Log(btnPath); Manager.Instance.isForDetails = true; //if (UI_UpBgPanel.instance.UpToggleState == UpToggleState.驾驶室) //{ // switch (btnPath) // { // case "丹阳市万隆铸造有限公司": // if (UI_UpBgPanel.instance.UpToggleState == UpToggleState.驾驶室) // { // Manager.Instance.LoadImageFromResources(Manager.Instance.EnterpriseInformation_image, // Manager.Instance.targetImage, Manager.Instance.EnterpriseInformationName_text, // "企业信息/丹阳市万隆铸造有限公司"); // } // Manager.Instance.MyLookAtCameraNamel = LookAtCameraName.丹阳市万隆铸造有限公司; // break; // case "丹阳信德电气设备有限公司": // if (UI_UpBgPanel.instance.UpToggleState == UpToggleState.驾驶室) // { // // Manager.Instance.LoadImageFromResources(Manager.Instance.EnterpriseInformation_image, // Manager.Instance.targetImage, Manager.Instance.EnterpriseInformationName_text, // "企业信息/丹阳信德电气设备有限公司"); // } // Manager.Instance.MyLookAtCameraNamel = LookAtCameraName.丹阳信德电气设备有限公司; // break; // case "丹阳伊尔特金属制品有限公司": // if (UI_UpBgPanel.instance.UpToggleState == UpToggleState.驾驶室) // { // // Manager.Instance.LoadImageFromResources(Manager.Instance.EnterpriseInformation_image, // Manager.Instance.targetImage, Manager.Instance.EnterpriseInformationName_text, // "企业信息/丹阳伊尔特金属制品有限公司"); // } // Manager.Instance.MyLookAtCameraNamel = LookAtCameraName.丹阳伊尔特金属制品有限公司; // break; // case "江苏天海精密模具有限公司": // if (UI_UpBgPanel.instance.UpToggleState == UpToggleState.驾驶室) // { // Manager.Instance.LoadImageFromResources(Manager.Instance.EnterpriseInformation_image, // Manager.Instance.targetImage, Manager.Instance.EnterpriseInformationName_text, // "企业信息/江苏天海精密模具有限公司"); // // } // Manager.Instance.MyLookAtCameraNamel = LookAtCameraName.江苏天海精密模具有限公司; // break; // case "丹阳市汇联机械配件有限公司": // if (UI_UpBgPanel.instance.UpToggleState == UpToggleState.驾驶室) // { // // Manager.Instance.LoadImageFromResources(Manager.Instance.EnterpriseInformation_image, // Manager.Instance.targetImage, Manager.Instance.EnterpriseInformationName_text, // "企业信息/丹阳市汇联机械配件有限公司"); // } // Manager.Instance.MyLookAtCameraNamel = LookAtCameraName.丹阳市汇联机械配件有限公司; // break; // case "丹阳市骏锋精工有限公司": // if (UI_UpBgPanel.instance.UpToggleState == UpToggleState.驾驶室) // { // Manager.Instance.LoadImageFromResources(Manager.Instance.EnterpriseInformation_image, // Manager.Instance.targetImage, Manager.Instance.EnterpriseInformationName_text, // "企业信息/丹阳市骏锋精工有限公司"); // // } // Manager.Instance.MyLookAtCameraNamel = LookAtCameraName.丹阳市骏锋精工有限公司; // break; // case "江苏华晟电气科技有限公司": // if (UI_UpBgPanel.instance.UpToggleState == UpToggleState.驾驶室) // { // Manager.Instance.LoadImageFromResources(Manager.Instance.EnterpriseInformation_image, // Manager.Instance.targetImage, Manager.Instance.EnterpriseInformationName_text, // "企业信息/江苏华晟电气科技有限公司"); // // } // Manager.Instance.MyLookAtCameraNamel = LookAtCameraName.江苏华晟电气科技有限公司; // break; // case "丹阳市富强五金铸造厂": // if (UI_UpBgPanel.instance.UpToggleState == UpToggleState.驾驶室) // { // Manager.Instance.LoadImageFromResources(Manager.Instance.EnterpriseInformation_image, // Manager.Instance.targetImage, Manager.Instance.EnterpriseInformationName_text, // "企业信息/丹阳市富强五金铸造厂"); // // } // Manager.Instance.MyLookAtCameraNamel = LookAtCameraName.丹阳市富强五金铸造厂; // break; // case "江苏伟业铸造有限公司": // if (UI_UpBgPanel.instance.UpToggleState == UpToggleState.驾驶室) // { // Manager.Instance.LoadImageFromResources(Manager.Instance.EnterpriseInformation_image, // Manager.Instance.targetImage, Manager.Instance.EnterpriseInformationName_text, // "企业信息/江苏伟业铸造有限公司"); // } // Manager.Instance.MyLookAtCameraNamel = LookAtCameraName.江苏伟业铸造有限公司; // // break; // case "江苏天乐金属制品有限公司": // if (UI_UpBgPanel.instance.UpToggleState == UpToggleState.驾驶室) // { // Manager.Instance.LoadImageFromResources(Manager.Instance.EnterpriseInformation_image, // Manager.Instance.targetImage, // Manager.Instance.EnterpriseInformationName_text, // "企业信息/江苏天乐金属制品有限公司"); // } // Manager.Instance.MyLookAtCameraNamel = LookAtCameraName.江苏天乐金属制品有限公司; // // break; // case "排污BTN": // LookAtCameraName = LookAtCameraName.排污; // //Manager.Instance.LoadImageFromResources("企业信息/江苏天乐金属制品有限公司"); // break; // case "厂房BTN": // LookAtCameraName = LookAtCameraName.厂房; // //Manager.Instance.LoadImageFromResources("企业信息/江苏天乐金属制品有限公司"); // break; // case "农田BTN": // LookAtCameraName = LookAtCameraName.农田; // //Manager.Instance.LoadImageFromResources("企业信息/江苏天乐金属制品有限公司"); // break; //} } }