修复了选曲的问题 优化了ui
This commit is contained in:
@@ -70,27 +70,36 @@ public class UI_Panel_Main : Singleton_Mono<UI_Panel_Main>
|
||||
data_List = data_List_New;
|
||||
Character_Index = character_Index;
|
||||
|
||||
button_Character_Set.onClick.AddListener(
|
||||
() => ui_Panel_Character.SetActive(true));
|
||||
button_Mail.onClick.AddListener(
|
||||
() => ui_Panel_Mail.SetActive(true));
|
||||
button_Notice.onClick.AddListener(
|
||||
() => ui_Panel_Notice.SetActive(true));
|
||||
button_Level.onClick.AddListener(
|
||||
() => ui_Panel_Level.SetActive(true));
|
||||
if (button_Character_Set != null)
|
||||
button_Character_Set.onClick.AddListener(
|
||||
() => ui_Panel_Character.SetActive(true));
|
||||
if (button_Mail != null)
|
||||
button_Mail.onClick.AddListener(
|
||||
() => ui_Panel_Mail.SetActive(true));
|
||||
if (button_Notice != null)
|
||||
button_Notice.onClick.AddListener(
|
||||
() => ui_Panel_Notice.SetActive(true));
|
||||
if (button_Level != null)
|
||||
button_Level.onClick.AddListener(
|
||||
() => ui_Panel_Level.SetActive(true));
|
||||
Character_Index = character_Index;
|
||||
button_Encyclopendia.onClick.AddListener(
|
||||
() => ui_Panel_Encyclopendia.SetActive(true));
|
||||
button_Story.onClick.AddListener(
|
||||
() => ui_Panel_Story.SetActive(true));
|
||||
music_Player.Button_List.onClick.AddListener(
|
||||
() => ui_Panel_Music.SetActive(true));
|
||||
button_Setting.onClick.AddListener(
|
||||
() => ui_Panel_Setting.SetActive(true));
|
||||
if (button_Encyclopendia != null)
|
||||
button_Encyclopendia.onClick.AddListener(
|
||||
() => ui_Panel_Encyclopendia.SetActive(true));
|
||||
if (button_Story != null)
|
||||
button_Story.onClick.AddListener(
|
||||
() => ui_Panel_Story.SetActive(true));
|
||||
if (music_Player != null && music_Player.Button_List != null)
|
||||
music_Player.Button_List.onClick.AddListener(
|
||||
() => ui_Panel_Music.SetActive(true));
|
||||
if (button_Setting != null)
|
||||
button_Setting.onClick.AddListener(
|
||||
() => ui_Panel_Setting.SetActive(true));
|
||||
|
||||
|
||||
button_Select_Music.onClick.AddListener(
|
||||
() => SceneManager.LoadScene(ui_Select_Music_Scene_Name,LoadSceneMode.Single));
|
||||
if (button_Select_Music != null)
|
||||
button_Select_Music.onClick.AddListener(
|
||||
() => SceneManager.LoadScene(ui_Select_Music_Scene_Name,LoadSceneMode.Single));
|
||||
}
|
||||
public Character_Data_Image_SO Get_Character_Image_Data(int index)
|
||||
{
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4a67da28f514a5c48865d58a821c9fa3
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5193d3ce48ed6b44482ad9e522a3653d
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,80 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using UnityEngine.Events;
|
||||
|
||||
public class btmandtopController : MonoBehaviour
|
||||
{
|
||||
[Header("player unique so")]
|
||||
public Player_SO player_SO;
|
||||
[Header("put prefabs here")]
|
||||
public GameObject putPrefabsHere;
|
||||
[Header("son buttons")]
|
||||
public Button settings_launch;
|
||||
public Button userInfo_launch;
|
||||
public Button store_launch;
|
||||
public Button showLevel_display;
|
||||
public Button email_display;
|
||||
public Button notice_display;
|
||||
|
||||
[Header("sig prefabs")]
|
||||
public GameObject showLevel_prefab;
|
||||
public GameObject store_prefab;
|
||||
public GameObject settings_prefab;
|
||||
public GameObject userInfo_prefab;
|
||||
public GameObject email_prefab;
|
||||
public GameObject notice_prefab;
|
||||
|
||||
private UnityAction instantiateSettings;
|
||||
private UnityAction instantiateUserInfo;
|
||||
private UnityAction instantiateStore;
|
||||
private UnityAction instantiateShowLevel;
|
||||
private UnityAction instantiateEmail;
|
||||
private UnityAction instantiateNotice;
|
||||
|
||||
void Start()
|
||||
{
|
||||
instantiateSettings = () => InstantiatePrefab(settings_prefab);
|
||||
instantiateUserInfo = () => InstantiatePrefab(userInfo_prefab);
|
||||
instantiateStore = () => InstantiatePrefab(store_prefab);
|
||||
instantiateShowLevel = () => InstantiatePrefab(showLevel_prefab);
|
||||
instantiateEmail = () => InstantiatePrefab(email_prefab);
|
||||
instantiateNotice = () => InstantiatePrefab(notice_prefab);
|
||||
|
||||
if (settings_launch != null)
|
||||
settings_launch.onClick.AddListener(instantiateSettings);
|
||||
if (userInfo_launch != null)
|
||||
userInfo_launch.onClick.AddListener(instantiateUserInfo);
|
||||
if (store_launch != null)
|
||||
store_launch.onClick.AddListener(instantiateStore);
|
||||
if (showLevel_display != null)
|
||||
showLevel_display.onClick.AddListener(instantiateShowLevel);
|
||||
if (email_display != null)
|
||||
email_display.onClick.AddListener(instantiateEmail);
|
||||
if (notice_display != null)
|
||||
notice_display.onClick.AddListener(instantiateNotice);
|
||||
}
|
||||
|
||||
void OnDestroy()
|
||||
{
|
||||
if (settings_launch != null)
|
||||
settings_launch.onClick.RemoveListener(instantiateSettings);
|
||||
if (userInfo_launch != null)
|
||||
userInfo_launch.onClick.RemoveListener(instantiateUserInfo);
|
||||
if (store_launch != null)
|
||||
store_launch.onClick.RemoveListener(instantiateStore);
|
||||
if (showLevel_display != null)
|
||||
showLevel_display.onClick.RemoveListener(instantiateShowLevel);
|
||||
if (email_display != null)
|
||||
email_display.onClick.RemoveListener(instantiateEmail);
|
||||
if (notice_display != null)
|
||||
notice_display.onClick.RemoveListener(instantiateNotice);
|
||||
}
|
||||
|
||||
private void InstantiatePrefab(GameObject prefab)
|
||||
{
|
||||
if (prefab != null && putPrefabsHere != null)
|
||||
{
|
||||
Instantiate(prefab, putPrefabsHere.transform);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 108ebad04d80e214786aceb2ec421a8f
|
||||
@@ -0,0 +1,10 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class keepDisplayingObject : MonoBehaviour
|
||||
{
|
||||
public GameObject topPanel;
|
||||
public GameObject bottomPanel;
|
||||
[Header("dont display on")]
|
||||
public List<string> sceneNames= new List<string>();
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: becbdb472fe49564daa1f059063faa1f
|
||||
@@ -0,0 +1,27 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class loadtopandbottomPrefab: MonoBehaviour
|
||||
{
|
||||
[Header("father obj")]
|
||||
public GameObject top_and_bottom_Panel;
|
||||
public GameObject gameobject_to_Instantiate_below;
|
||||
|
||||
void Start()
|
||||
{
|
||||
if (top_and_bottom_Panel != null && gameobject_to_Instantiate_below != null)
|
||||
{
|
||||
GameObject instantiated = Instantiate(top_and_bottom_Panel, gameobject_to_Instantiate_below.transform);
|
||||
Canvas canvas = instantiated.GetComponent<Canvas>();
|
||||
if (canvas != null)
|
||||
{
|
||||
Camera cam = Camera.main;
|
||||
if (cam == null)
|
||||
{
|
||||
cam = FindObjectOfType<Camera>();
|
||||
}
|
||||
canvas.worldCamera = cam;
|
||||
cam = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 192cb68465529314cb64e919a5a2b57c
|
||||
Reference in New Issue
Block a user