예제 #1
0
 void Awake()
 {
     if (_instance == null)
     {
         _instance = this;
     }
 }
예제 #2
0
    void Awake()
    {
        //添加 SceneRoot_Panel
        Object     obj      = Resources.Load("Prefabs/UI/Panel/Canvas_RootCanvas");
        GameObject instance = Instantiate(obj) as GameObject;

        instance.transform.parent        = this.transform;
        instance.transform.localScale    = Vector3.one;
        instance.transform.localPosition = Vector3.zero;
        //PanelSceneRootBehviour panelSceneRootBehviour = instance.gameObject.GetComponent<PanelSceneRootBehviour>();


        //mask 遮罩
        PopMaskMaskManager.Awake();



        //tips的 Prefabs_UI_PopMessage
        obj = Resources.Load("Prefabs/UI/Commons/Prefabs_UI_Message");
        GameObject Prefabs_UI_PopMessage = Instantiate(obj) as GameObject;

        Prefabs_UI_PopMessage.transform.parent        = RootCanvasBehviour.getInstance().Panel_UI_Tips.transform;
        Prefabs_UI_PopMessage.transform.localScale    = Vector3.one;
        Prefabs_UI_PopMessage.transform.localPosition = Vector3.zero;
        Prefabs_UI_PopMessage.name = "Prefabs_UI_Message";
        PopMessageManager.panelMessageBehaviours = Prefabs_UI_PopMessage.GetComponent <PanelMessageBehaviours>();



        //添加对应的ui
        //var Panel_UI_UI =  RootCanvasBehviour.getInstance().Panel_UI_UI;
        //instance = UITool.createUGUI(Prefable_Panel,Panel_UI_UI);
        PopUpManager.createPopUp(Prefable_Panel, 0f);
    }
예제 #3
0
 //唤醒时出发
 public static void Awake()
 {
     if (panelMaskBehaviours == null)
     {
         PanelMaskBehaviours currentPanelMaskBehaviours = create(RootCanvasBehviour.getInstance().Panel_UI_Tips.transform, 1f);
         panelMaskBehaviours = currentPanelMaskBehaviours;
         hide();
         EventTriggerListener.Get(panelMaskBehaviours.gameObject).onClick = clickHandle;
     }
 }
예제 #4
0
    /**
     *  静态方法
     *  alert显示
     * */
    public static PanelAlertBehaviours show(string title, string msg)
    {
        Object     obj = Resources.Load("Prefabs/UI/Commons/Prefabs_UI_Alert");
        GameObject Prefabs_UI_Alert = Instantiate(obj) as GameObject;

        Prefabs_UI_Alert.transform.parent        = RootCanvasBehviour.getInstance().Panel_UI_Tips.transform;
        Prefabs_UI_Alert.transform.localScale    = Vector3.one;
        Prefabs_UI_Alert.transform.localPosition = Vector3.zero;
        Prefabs_UI_Alert.name = "Prefabs_UI_Alert";
        PanelAlertBehaviours panelAlertBehaviours = Prefabs_UI_Alert.GetComponent <PanelAlertBehaviours>();

        panelAlertBehaviours.setText(title, msg);

        return(panelAlertBehaviours);
    }
예제 #5
0
    /**
     * 显示 创建
     * */
    public static GameObject createPopUp(Object obj, float maskAlpha)
    {
        Transform  Panel_UI_UI = RootCanvasBehviour.getInstance().Panel_UI_UI;
        GameObject instance    = UITool.createUGUI(obj, Panel_UI_UI);

        BaseUIBehaviour baseUIBehaviour = BaseUIBehaviour.Get(instance);

        dicUI.Add(baseUIBehaviour.indexTag, instance);

        //添加mask  并设置全屏
        PanelMaskBehaviours mask = PopMaskMaskManager.create(instance.transform, maskAlpha);

        UITool.setFullScreen(mask.gameObject);
        mask.transform.SetSiblingIndex(0);


        return(instance);
    }
예제 #6
0
 void Awake()
 {
     if (_instance == null) {
         _instance = this;
     }
 }