示例#1
0
        public void SetupDataLookups()
        {
            mDL.ClearRegisteredDataIDs();
            scenetype = getSceneType();
            MoveEditor.FXHelper fx_helper = mDL.gameObject.GetComponentInChildren <MoveEditor.FXHelper>();

            if (fx_helper != null)
            {
                if (pldl == null)
                {
                    pldl = new PlayerLocationDataLookup();
                }

                pldl.UserId = userid;
                mDL.RegisterDataID(string.Format("{0}.pl.{1}", scenetype, userid));
                headBars2D = fx_helper.gameObject.GetMonoILRComponent <HeadBars2D>(false);

                if (headBars2D == null)
                {
                    headBars2D = fx_helper.gameObject.AddMonoILRComponent <HeadBars2D>("Hotfix_LT.UI.HeadBars2D");
                }

                if (nameDataLookup == null)
                {
                    nameDataLookup = new PlayerNameDataLookup();
                    nameDataLookup.SetHeadBars(headBars2D);
                }

                mDL.RegisterDataID(string.Format("{0}.pl.{1}.un", scenetype, userid));

                if (stateDataLookup == null)
                {
                    stateDataLookup = new PlayerStateDataLookup();
                    stateDataLookup.SetHeadBars(headBars2D);
                }

                mDL.RegisterDataID(string.Format("{0}.pl.{1}.state", scenetype, userid));
                mDL.RegisterDataID(string.Format("{0}.pl.{1}.promoid", scenetype, userid));
            }
        }
示例#2
0
        //public override void Awake()
        //{
        //	base.Awake();
        //	if (m_HeadBars2D == null) InitComponent();
        //}

        public void SetHeadBars(HeadBars2D headBars2D)
        {
            m_HeadBars2D = headBars2D;
        }