技能主要更新,修复卡顿并加入动画,以及各种其他更新。
This commit is contained in:
@@ -5,6 +5,7 @@ public class loadtopandbottomPrefab: MonoBehaviour
|
||||
[Header("father obj")]
|
||||
public GameObject top_and_bottom_Panel;
|
||||
public GameObject gameobject_to_Instantiate_below;
|
||||
[SerializeField] bool notify_Main_Panel = true;
|
||||
|
||||
void Start()
|
||||
{
|
||||
@@ -17,11 +18,34 @@ public class loadtopandbottomPrefab: MonoBehaviour
|
||||
Camera cam = Camera.main;
|
||||
if (cam == null)
|
||||
{
|
||||
cam = FindObjectOfType<Camera>();
|
||||
cam = Object.FindAnyObjectByType<Camera>();
|
||||
}
|
||||
canvas.worldCamera = cam;
|
||||
cam = null;
|
||||
}
|
||||
if (notify_Main_Panel)
|
||||
{
|
||||
Bind_Main_Panel(instantiated);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Bind_Main_Panel(GameObject instantiated)
|
||||
{
|
||||
if (instantiated == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
UI_Panel_Main main = Object.FindAnyObjectByType<UI_Panel_Main>();
|
||||
if (main == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
RectTransform top = instantiated.transform.Find("TOP") as RectTransform;
|
||||
RectTransform bottom = instantiated.transform.Find("BTM") as RectTransform;
|
||||
if (top != null || bottom != null)
|
||||
{
|
||||
main.Bind_Top_Bottom(top, bottom);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user