示例#1
0
    private void downLoadJoyStickComplete(object userData)
    {
        m_joystick          = ResourceMgr.GetGameObject(URLConst.GetUI("UIJoyStick"));
        m_joystickTransform = m_joystick.GetComponent <RectTransform>();
        GameObject uiCanvas = GameObject.Find("UIRootCanvas");

        UtilsExtends.SetParentExt(m_joystick, uiCanvas.transform);
        m_joystickTransform.anchoredPosition = skill1Position;
    }
示例#2
0
    public void InitData(object param = null)
    {
        GameObject template = param as GameObject;

        _kTarget      = GameObject.Instantiate(template) as GameObject;
        _kTarget.name = UtilsExtends.GetTimeStamp().ToString();
        id            = UtilsExtends.GetTimeStamp();
        _kTargetTrans = _kTarget.GetComponent <RectTransform>();
        _kTarget.name = "TipsText";
        _kTargetTrans.SetParent(template.GetComponent <RectTransform>().parent, false);
        _txtTextContent      = _kTargetTrans.GetChild(0).gameObject.GetComponent <Text>();
        _imgBackGround       = _kTarget.GetComponent <Image>();
        _txtTextContent.text = "";
        _kTarget.SetActive(false);
    }