切换场景上传
parent
b34df42df3
commit
ad8ffed6b0
|
|
@ -178,7 +178,7 @@ MonoBehaviour:
|
|||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_text: uiInterface_select
|
||||
m_text: "\u9009\u62E9"
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: d996718f19de68245bc356be2938e063, type: 2}
|
||||
m_sharedMaterial: {fileID: -8559898196655864114, guid: d996718f19de68245bc356be2938e063,
|
||||
|
|
@ -447,7 +447,7 @@ MonoBehaviour:
|
|||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_text: uiIterface_cameraChange
|
||||
m_text: "\u955C\u5934\u5207\u6362"
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: d996718f19de68245bc356be2938e063, type: 2}
|
||||
m_sharedMaterial: {fileID: -8559898196655864114, guid: d996718f19de68245bc356be2938e063,
|
||||
|
|
@ -529,7 +529,7 @@ MonoBehaviour:
|
|||
m_Script: {fileID: 11500000, guid: 4545b363802045e3a540e37e426a5df3, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
text_key: uiIterface_cameraChange
|
||||
text_key: uiInterface_cameraChange
|
||||
--- !u!1 &944944455290879489
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
@ -1037,7 +1037,7 @@ GameObject:
|
|||
- component: {fileID: 7218175802895990894}
|
||||
- component: {fileID: 6190582898029304159}
|
||||
m_Layer: 5
|
||||
m_Name: Button_Change2
|
||||
m_Name: 2
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
|
|
@ -1384,7 +1384,7 @@ MonoBehaviour:
|
|||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_text: uiInterface_select
|
||||
m_text: "\u9009\u62E9"
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: d996718f19de68245bc356be2938e063, type: 2}
|
||||
m_sharedMaterial: {fileID: -8559898196655864114, guid: d996718f19de68245bc356be2938e063,
|
||||
|
|
@ -1516,7 +1516,7 @@ GameObject:
|
|||
- component: {fileID: 4487436837619689493}
|
||||
- component: {fileID: 3027502109740614852}
|
||||
m_Layer: 5
|
||||
m_Name: Button_Change3
|
||||
m_Name: 3
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
|
|
@ -1638,7 +1638,7 @@ GameObject:
|
|||
- component: {fileID: 3806359623538871935}
|
||||
- component: {fileID: 4128319567611409200}
|
||||
m_Layer: 5
|
||||
m_Name: Button_Change1
|
||||
m_Name: 1
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
|
|
@ -1813,7 +1813,7 @@ MonoBehaviour:
|
|||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_text: uiInterface_sure
|
||||
m_text: "\u786E\u5B9A"
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: d996718f19de68245bc356be2938e063, type: 2}
|
||||
m_sharedMaterial: {fileID: -8559898196655864114, guid: d996718f19de68245bc356be2938e063,
|
||||
|
|
@ -1924,6 +1924,7 @@ RectTransform:
|
|||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 3506102000153509077}
|
||||
- {fileID: 5914538245989577398}
|
||||
- {fileID: 3255398369409901063}
|
||||
- {fileID: 9058061181740409406}
|
||||
|
|
@ -2031,7 +2032,7 @@ GameObject:
|
|||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &684583888681701832
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
@ -2760,3 +2761,127 @@ MonoBehaviour:
|
|||
m_hasFontAssetChanged: 0
|
||||
m_baseMaterial: {fileID: 0}
|
||||
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||
--- !u!1001 &1320220645145588987
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 4313950133707822608}
|
||||
m_Modifications:
|
||||
- target: {fileID: 1590606367934273187, guid: 3f67e74c1ee4c904cb294f3255c5afea,
|
||||
type: 3}
|
||||
propertyPath: m_Name
|
||||
value: EmptyButton
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2520450773870282798, guid: 3f67e74c1ee4c904cb294f3255c5afea,
|
||||
type: 3}
|
||||
propertyPath: m_Pivot.x
|
||||
value: 0.5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2520450773870282798, guid: 3f67e74c1ee4c904cb294f3255c5afea,
|
||||
type: 3}
|
||||
propertyPath: m_Pivot.y
|
||||
value: 0.5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2520450773870282798, guid: 3f67e74c1ee4c904cb294f3255c5afea,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMax.x
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2520450773870282798, guid: 3f67e74c1ee4c904cb294f3255c5afea,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2520450773870282798, guid: 3f67e74c1ee4c904cb294f3255c5afea,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMin.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2520450773870282798, guid: 3f67e74c1ee4c904cb294f3255c5afea,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2520450773870282798, guid: 3f67e74c1ee4c904cb294f3255c5afea,
|
||||
type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 1823.57
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2520450773870282798, guid: 3f67e74c1ee4c904cb294f3255c5afea,
|
||||
type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
value: 980.95996
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2520450773870282798, guid: 3f67e74c1ee4c904cb294f3255c5afea,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2520450773870282798, guid: 3f67e74c1ee4c904cb294f3255c5afea,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2520450773870282798, guid: 3f67e74c1ee4c904cb294f3255c5afea,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2520450773870282798, guid: 3f67e74c1ee4c904cb294f3255c5afea,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2520450773870282798, guid: 3f67e74c1ee4c904cb294f3255c5afea,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2520450773870282798, guid: 3f67e74c1ee4c904cb294f3255c5afea,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2520450773870282798, guid: 3f67e74c1ee4c904cb294f3255c5afea,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2520450773870282798, guid: 3f67e74c1ee4c904cb294f3255c5afea,
|
||||
type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: -3.1399994
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2520450773870282798, guid: 3f67e74c1ee4c904cb294f3255c5afea,
|
||||
type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: -3.1399994
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2520450773870282798, guid: 3f67e74c1ee4c904cb294f3255c5afea,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2520450773870282798, guid: 3f67e74c1ee4c904cb294f3255c5afea,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2520450773870282798, guid: 3f67e74c1ee4c904cb294f3255c5afea,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 3f67e74c1ee4c904cb294f3255c5afea, type: 3}
|
||||
--- !u!224 &3506102000153509077 stripped
|
||||
RectTransform:
|
||||
m_CorrespondingSourceObject: {fileID: 2520450773870282798, guid: 3f67e74c1ee4c904cb294f3255c5afea,
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 1320220645145588987}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,130 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &1918259045240056705
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 734572190930637520}
|
||||
- component: {fileID: 7206666429539446093}
|
||||
- component: {fileID: 7247423460067066093}
|
||||
m_Layer: 0
|
||||
m_Name: CameraPos1
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &734572190930637520
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1918259045240056705}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0.06844836, y: -0.92568505, z: 0.23377664, w: 0.28943157}
|
||||
m_LocalPosition: {x: -3.09, y: 9.62, z: 25.52}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 28.192, y: -145.134, z: 0.559}
|
||||
--- !u!20 &7206666429539446093
|
||||
Camera:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1918259045240056705}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_ClearFlags: 1
|
||||
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
|
||||
m_projectionMatrixMode: 1
|
||||
m_GateFitMode: 2
|
||||
m_FOVAxisMode: 0
|
||||
m_Iso: 200
|
||||
m_ShutterSpeed: 0.005
|
||||
m_Aperture: 16
|
||||
m_FocusDistance: 10
|
||||
m_FocalLength: 50
|
||||
m_BladeCount: 5
|
||||
m_Curvature: {x: 2, y: 11}
|
||||
m_BarrelClipping: 0.25
|
||||
m_Anamorphism: 0
|
||||
m_SensorSize: {x: 36, y: 24}
|
||||
m_LensShift: {x: 0, y: 0}
|
||||
m_NormalizedViewPortRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1
|
||||
height: 1
|
||||
near clip plane: 0.3
|
||||
far clip plane: 1000
|
||||
field of view: 28
|
||||
orthographic: 0
|
||||
orthographic size: 5
|
||||
m_Depth: -1
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_RenderingPath: -1
|
||||
m_TargetTexture: {fileID: 0}
|
||||
m_TargetDisplay: 0
|
||||
m_TargetEye: 3
|
||||
m_HDR: 1
|
||||
m_AllowMSAA: 1
|
||||
m_AllowDynamicResolution: 0
|
||||
m_ForceIntoRT: 0
|
||||
m_OcclusionCulling: 1
|
||||
m_StereoConvergence: 10
|
||||
m_StereoSeparation: 0.022
|
||||
--- !u!114 &7247423460067066093
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1918259045240056705}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_RenderShadows: 1
|
||||
m_RequiresDepthTextureOption: 2
|
||||
m_RequiresOpaqueTextureOption: 2
|
||||
m_CameraType: 0
|
||||
m_Cameras: []
|
||||
m_RendererIndex: -1
|
||||
m_VolumeLayerMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 1
|
||||
m_VolumeTrigger: {fileID: 0}
|
||||
m_VolumeFrameworkUpdateModeOption: 2
|
||||
m_RenderPostProcessing: 0
|
||||
m_Antialiasing: 0
|
||||
m_AntialiasingQuality: 2
|
||||
m_StopNaN: 0
|
||||
m_Dithering: 0
|
||||
m_ClearDepth: 1
|
||||
m_AllowXRRendering: 1
|
||||
m_AllowHDROutput: 1
|
||||
m_UseScreenCoordOverride: 0
|
||||
m_ScreenSizeOverride: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_ScreenCoordScaleBias: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_RequiresDepthTexture: 0
|
||||
m_RequiresColorTexture: 0
|
||||
m_Version: 2
|
||||
m_TaaSettings:
|
||||
quality: 3
|
||||
frameInfluence: 0.1
|
||||
jitterScale: 1
|
||||
mipBias: 0
|
||||
varianceClampScale: 0.9
|
||||
contrastAdaptiveSharpening: 0
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 9a96bb6bdff758347956ae6323f7257d
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -62,7 +62,7 @@ public partial class UIManager
|
|||
_WindowMeta(UINameConst.UI_Email, UIWindowLayer.Normal);
|
||||
_WindowMeta(UINameConst.UIGiftCodeAwards, UIWindowLayer.Normal);
|
||||
_WindowMeta(UINameConst.UITask, UIWindowLayer.Normal);
|
||||
|
||||
_WindowMeta(UINameConst.UI_CameraChange, UIWindowLayer.Normal);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -143,4 +143,6 @@ public static class UINameConst
|
|||
public static readonly string UI_Loading = "StartScene/New/UI_Loading";
|
||||
public static readonly string UIGiftCodeAwards = "MainScene/GiftCode/UIGiftCodeAwards";
|
||||
public static readonly string UI_Email = "Mail/UI_Email";
|
||||
public static readonly string UI_CameraChange = "Interface/UI_CameraChange";
|
||||
|
||||
}
|
||||
|
|
@ -195,7 +195,7 @@ public abstract class UIWindow : MonoBehaviour
|
|||
{
|
||||
OnOpenWindow(data);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void Hide()
|
||||
|
|
|
|||
|
|
@ -1,14 +1,6 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using TMPro;
|
||||
using Framework;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using UnityEngine.UIElements;
|
||||
using TMPro;
|
||||
using Button = UnityEngine.UI.Button;
|
||||
using Image = UnityEngine.UI.Image;
|
||||
using Toggle = UnityEngine.UI.Toggle;
|
||||
using ScrollView = PhxhSDK.PhxhScrollView;
|
||||
|
||||
public class UI_CameraChangeBinder
|
||||
{
|
||||
|
|
@ -18,18 +10,8 @@ public class UI_CameraChangeBinder
|
|||
window.Image_BG = window.GetComponent<Image>("Image_BG");
|
||||
window.Text_Title = window.GetComponent<TMP_Text>("Text_Title");
|
||||
window.Button_Close = window.GetComponent<Button>("Button_Close");
|
||||
window.Button_Change1 = window.GetComponent<Button>("Button_Change1");
|
||||
window.Image_Check = window.GetComponent<Image>("Button_Change1/Choose/Image_Check");
|
||||
window.Image_Full = window.GetComponent<Image>("Button_Change1/Choose/Image_Full");
|
||||
window.Image_Full = window.GetComponent<Image>("Button_Change1/NotChoose/Image_Full");
|
||||
window.Button_Change2 = window.GetComponent<Button>("Button_Change2");
|
||||
window.Image_Check = window.GetComponent<Image>("Button_Change2/Choose/Image_Check");
|
||||
window.Image_Full = window.GetComponent<Image>("Button_Change2/Choose/Image_Full");
|
||||
window.Image_Full = window.GetComponent<Image>("Button_Change2/NotChoose/Image_Full");
|
||||
window.Button_Change3 = window.GetComponent<Button>("Button_Change3");
|
||||
window.Image_Check = window.GetComponent<Image>("Button_Change3/Choose/Image_Check");
|
||||
window.Image_Full = window.GetComponent<Image>("Button_Change3/Choose/Image_Full");
|
||||
window.Image_Full = window.GetComponent<Image>("Button_Change3/NotChoose/Image_Full");
|
||||
|
||||
|
||||
window.Button_Comfirm = window.GetComponent<Button>("Button_Comfirm");
|
||||
window.Text_Comfirm = window.GetComponent<TMP_Text>("Button_Comfirm/Text_Comfirm");
|
||||
|
||||
|
|
|
|||
|
|
@ -1,63 +0,0 @@
|
|||
using cfg.UIMainPanelMusic;
|
||||
using Framework;
|
||||
using System;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using Button = UnityEngine.UI.Button;
|
||||
using Image = UnityEngine.UI.Image;
|
||||
|
||||
public class UI_CameraChangeController : UIWindow
|
||||
{
|
||||
//UI GameObj
|
||||
///Auto Gen Start///
|
||||
public Image Image_BG;
|
||||
public TMP_Text Text_Title;
|
||||
public Button Button_Close;
|
||||
public Button Button_Change1;
|
||||
public Image Image_Check;
|
||||
public Image Image_Full;
|
||||
public Button Button_Change2;
|
||||
|
||||
public Button Button_Change3;
|
||||
public Button Button_Comfirm;
|
||||
public TMP_Text Text_Comfirm;
|
||||
|
||||
|
||||
///Auto Gen End///
|
||||
|
||||
// Use this for initialization
|
||||
public override void OnAwake()
|
||||
{
|
||||
//bind UI GameObj
|
||||
UI_CameraChangeBinder.GetComponents(this);
|
||||
}
|
||||
|
||||
//invoke when open window
|
||||
protected override void OnOpenWindow(object data = null)
|
||||
{
|
||||
RefreshThreeIcons();
|
||||
}
|
||||
public void RefreshThreeIcons()
|
||||
{
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
//RefreshSingleIcons(TableManager.Instance.Tables.);
|
||||
}
|
||||
}
|
||||
|
||||
private void RefreshSingleIcons(DataMainPanelCameraChange cfg,GameObject obj)
|
||||
{
|
||||
}
|
||||
|
||||
//invoke when reload window
|
||||
protected override void OnReloadWindow(object data = null)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
//invoke when close window
|
||||
protected override void OnCloseWindow()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,128 @@
|
|||
using cfg.UIMainPanelMusic;
|
||||
using Framework;
|
||||
using Gameplay;
|
||||
using PhxhSDK;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using Button = UnityEngine.UI.Button;
|
||||
using Image = UnityEngine.UI.Image;
|
||||
|
||||
public static class MainPanelCameraPos
|
||||
{
|
||||
public static int defaultIndex = 0;
|
||||
}
|
||||
|
||||
public class UI_CameraChangeController : UIWindow
|
||||
{
|
||||
//UI GameObj
|
||||
///Auto Gen Start///
|
||||
public Image Image_BG;
|
||||
public TMP_Text Text_Title;
|
||||
public Button Button_Close;
|
||||
public Button Button_Change1;
|
||||
public Image Image_Check;
|
||||
public Image Image_Full;
|
||||
public Button Button_Change2;
|
||||
|
||||
public Button Button_Change3;
|
||||
public Button Button_Comfirm;
|
||||
public TMP_Text Text_Comfirm;
|
||||
|
||||
int nowIndex = MainPanelCameraPos.defaultIndex;
|
||||
|
||||
List<GameObject> cameraGo;
|
||||
///Auto Gen End///
|
||||
|
||||
int loadedCount = 0;
|
||||
// Use this for initialization
|
||||
public override async void OnAwake()
|
||||
{
|
||||
//bind UI GameObj
|
||||
UI_CameraChangeBinder.GetComponents(this);
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
BindButton<GameObject>(FindObj((i + 1).ToString()), OnPosChooseClick,FindObj((i+1).ToString()));
|
||||
}
|
||||
BindButton(Button_Close, CloseOnClick);
|
||||
BindButton(Button_Comfirm, ComfirmOnClick);
|
||||
cameraGo = new List<GameObject>();
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void ComfirmOnClick()
|
||||
{
|
||||
MainPanelCameraPos.defaultIndex = nowIndex;
|
||||
CloseOnClick();
|
||||
}
|
||||
|
||||
private void CloseOnClick()
|
||||
{
|
||||
CloseWindow();
|
||||
}
|
||||
|
||||
private void OnPosChooseClick(GameObject go)
|
||||
{
|
||||
int index = Convert.ToInt16(go.name)-1;
|
||||
if(index==nowIndex)
|
||||
{
|
||||
return;
|
||||
}
|
||||
nowIndex = index;
|
||||
RefreshUI();
|
||||
ChangeCamera(index);
|
||||
}
|
||||
void RefreshUI()
|
||||
{
|
||||
for (int i = 1; i < 4; i++)
|
||||
{
|
||||
GameObject go = FindObj((i).ToString());
|
||||
CommonUtils.GetGameObject(go, "Choose").SetActive((i-1) == nowIndex);
|
||||
CommonUtils.GetGameObject(go, "NotChoose").SetActive((i-1) == nowIndex);
|
||||
}
|
||||
}
|
||||
void ChangeCamera(int index)
|
||||
{
|
||||
CameraChange cameraChange = new CameraChange(cameraGo[index].GetComponent<Camera>());
|
||||
cameraChange.ChangeCamera();
|
||||
}
|
||||
//invoke when open window
|
||||
protected override async void OnOpenWindow(object data)
|
||||
{
|
||||
cameraGo=data as List<GameObject>;
|
||||
RefreshThreeIcons();
|
||||
RefreshUI();
|
||||
}
|
||||
|
||||
|
||||
public void RefreshThreeIcons()
|
||||
{
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
RefreshSingleIcons(TableManager.Instance.Tables.CameraChangeCfg.DataList[i],FindObj((i+1).ToString()));
|
||||
}
|
||||
}
|
||||
|
||||
private async void RefreshSingleIcons(DataMainPanelCameraChange cfg,GameObject obj)
|
||||
{
|
||||
|
||||
obj.GetComponent<Image>().sprite = await AssetManager.Instance.LoadAssetAsync<Sprite>(cfg.IconPath);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
//invoke when reload window
|
||||
protected override void OnReloadWindow(object data = null)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
//invoke when close window
|
||||
protected override void OnCloseWindow()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -84,6 +84,7 @@ public class UI_MainPanelController: UIWindow
|
|||
///Auto Gen End///
|
||||
UI_CurrencyItem diamondItem;
|
||||
UI_CurrencyItem coinItem;
|
||||
List<GameObject> cameraGoList;
|
||||
|
||||
bool isFirst = true;
|
||||
// Use this for initializationf
|
||||
|
|
@ -114,7 +115,13 @@ public class UI_MainPanelController: UIWindow
|
|||
BindButton(Button_DrawCard, OnDrawCardClick);
|
||||
|
||||
BindButton(Button_Unknown, _OnClickTask);
|
||||
BindButton(Button_Camera, OnCameraClick);
|
||||
cameraGoList = new List<GameObject>();
|
||||
}
|
||||
|
||||
private async void OnCameraClick()
|
||||
{
|
||||
await UIManager.Instance.OpenWindow(UINameConst.UI_CameraChange,cameraGoList);
|
||||
}
|
||||
|
||||
private async void OnDrawCardClick()
|
||||
|
|
@ -122,16 +129,6 @@ public class UI_MainPanelController: UIWindow
|
|||
await UIManager.Instance.OpenWindow(UINameConst.UINormalRaffle);
|
||||
}
|
||||
|
||||
private async void OnRecvHaveNewMail()
|
||||
{
|
||||
if(isFirst)
|
||||
{
|
||||
isFirst = false;
|
||||
return;
|
||||
}
|
||||
await UIManager.Instance.OpenWindow(UINameConst.UI_Email);
|
||||
|
||||
}
|
||||
|
||||
|
||||
private async void OnEmailBtnClick()
|
||||
|
|
@ -151,14 +148,21 @@ public class UI_MainPanelController: UIWindow
|
|||
}
|
||||
private void SetCamera()
|
||||
{
|
||||
GameObject cameraGo = GameObject.Find("Camera");
|
||||
cameraGo.SetActive(false);
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
AssetManager.Instance.LoadAssetOnCallBack<GameObject>(TableManager.Instance.Tables.CameraChangeCfg.DataList[i].CameraPrefabPath,OnCameraPrefabLoaded);
|
||||
}
|
||||
}
|
||||
|
||||
cameraChange = new CameraChange(cameraGo.GetComponent<Camera>());
|
||||
private void OnCameraPrefabLoaded(GameObject go)
|
||||
{
|
||||
cameraGoList.Add(GameObject.Instantiate(go));
|
||||
cameraChange = new CameraChange(cameraGoList[MainPanelCameraPos.defaultIndex].GetComponent<Camera>());
|
||||
|
||||
cameraChange.ChangeCamera();
|
||||
|
||||
}
|
||||
|
||||
private void ResetCamera()
|
||||
{
|
||||
cameraChange.ResumeCamera();
|
||||
|
|
@ -460,6 +464,12 @@ public class UI_MainPanelController: UIWindow
|
|||
{
|
||||
//InputManager.Instance.OnFingerMoveUI -= RotateScene;
|
||||
UI_InterfacePreviewManager.Instance.ReleasePreviewNode();
|
||||
for (int i = 0; i < cameraGoList.Count; i++)
|
||||
{
|
||||
cameraGoList[i].Destroy();
|
||||
|
||||
}
|
||||
cameraGoList.Clear();
|
||||
ResetCamera();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,19 +20,15 @@ public sealed partial class DataMainPanelCameraChange : Bright.Config.BeanBase
|
|||
{
|
||||
{ if(!_json["ID"].IsNumber) { throw new SerializationException(); } ID = _json["ID"]; }
|
||||
{ if(!_json["IconPath"].IsString) { throw new SerializationException(); } IconPath = _json["IconPath"]; }
|
||||
{ if(!_json["cameraPosx"].IsNumber) { throw new SerializationException(); } CameraPosx = _json["cameraPosx"]; }
|
||||
{ if(!_json["cameraPosy"].IsNumber) { throw new SerializationException(); } CameraPosy = _json["cameraPosy"]; }
|
||||
{ if(!_json["cameraPosz"].IsNumber) { throw new SerializationException(); } CameraPosz = _json["cameraPosz"]; }
|
||||
{ if(!_json["CameraPrefabPath"].IsString) { throw new SerializationException(); } CameraPrefabPath = _json["CameraPrefabPath"]; }
|
||||
PostInit();
|
||||
}
|
||||
|
||||
public DataMainPanelCameraChange(int ID, string IconPath, float cameraPosx, float cameraPosy, float cameraPosz )
|
||||
public DataMainPanelCameraChange(int ID, string IconPath, string CameraPrefabPath )
|
||||
{
|
||||
this.ID = ID;
|
||||
this.IconPath = IconPath;
|
||||
this.CameraPosx = cameraPosx;
|
||||
this.CameraPosy = cameraPosy;
|
||||
this.CameraPosz = cameraPosz;
|
||||
this.CameraPrefabPath = CameraPrefabPath;
|
||||
PostInit();
|
||||
}
|
||||
|
||||
|
|
@ -42,7 +38,7 @@ public sealed partial class DataMainPanelCameraChange : Bright.Config.BeanBase
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Id
|
||||
/// Id(只能配3个预制体死的)
|
||||
/// </summary>
|
||||
public int ID { get; private set; }
|
||||
/// <summary>
|
||||
|
|
@ -50,17 +46,9 @@ public sealed partial class DataMainPanelCameraChange : Bright.Config.BeanBase
|
|||
/// </summary>
|
||||
public string IconPath { get; private set; }
|
||||
/// <summary>
|
||||
/// 摄像机坐标x
|
||||
/// 摄像机预制体路径
|
||||
/// </summary>
|
||||
public float CameraPosx { get; private set; }
|
||||
/// <summary>
|
||||
/// 摄像机坐标y
|
||||
/// </summary>
|
||||
public float CameraPosy { get; private set; }
|
||||
/// <summary>
|
||||
/// 摄像机坐标z
|
||||
/// </summary>
|
||||
public float CameraPosz { get; private set; }
|
||||
public string CameraPrefabPath { get; private set; }
|
||||
|
||||
public const int __ID__ = -1415352362;
|
||||
public override int GetTypeId() => __ID__;
|
||||
|
|
@ -79,9 +67,7 @@ public sealed partial class DataMainPanelCameraChange : Bright.Config.BeanBase
|
|||
return "{ "
|
||||
+ "ID:" + ID + ","
|
||||
+ "IconPath:" + IconPath + ","
|
||||
+ "CameraPosx:" + CameraPosx + ","
|
||||
+ "CameraPosy:" + CameraPosy + ","
|
||||
+ "CameraPosz:" + CameraPosz + ","
|
||||
+ "CameraPrefabPath:" + CameraPrefabPath + ","
|
||||
+ "}";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@
|
|||
"CountID": 10006,
|
||||
"RewardID": [
|
||||
100001,
|
||||
100007
|
||||
100001
|
||||
],
|
||||
"PreTaskID": 0,
|
||||
"CheckType": 0,
|
||||
|
|
|
|||
|
|
@ -1,9 +1,17 @@
|
|||
[
|
||||
{
|
||||
"ID": 1,
|
||||
"IconPath": "Assets/",
|
||||
"cameraPosx": 0,
|
||||
"cameraPosy": 0,
|
||||
"cameraPosz": 0
|
||||
"IconPath": "Assets/Art/UI/Texture/CameraChange/UI_01.png",
|
||||
"CameraPrefabPath": "Assets/Art/UI/Prefab/MainPanel/CameraPos1.prefab"
|
||||
},
|
||||
{
|
||||
"ID": 2,
|
||||
"IconPath": "Assets/Art/UI/Texture/CameraChange/UI_02.png",
|
||||
"CameraPrefabPath": "Assets/Art/UI/Prefab/MainPanel/CameraPos1.prefab"
|
||||
},
|
||||
{
|
||||
"ID": 3,
|
||||
"IconPath": "Assets/Art/UI/Texture/CameraChange/UI_03.png",
|
||||
"CameraPrefabPath": "Assets/Art/UI/Prefab/MainPanel/CameraPos1.prefab"
|
||||
}
|
||||
]
|
||||
Loading…
Reference in New Issue