示例#1
0
        public static _graphChaSprite createChaSprite(string tp)
        {
            _graphChaSprite result;

            if (!(tp == "txt"))
            {
                if (!(tp == "img"))
                {
                    if (!(tp == "ani"))
                    {
                        if (!(tp == "numimg"))
                        {
                            if (!(tp == "chat"))
                            {
                                if (!(tp == "progress"))
                                {
                                    result = null;
                                }
                                else
                                {
                                    result = new _graphChaProgressSprite();
                                }
                            }
                            else
                            {
                                result = new _graphChatSprite();
                            }
                        }
                        else
                        {
                            result = new _graphChaImgNumSprite();
                        }
                    }
                    else
                    {
                        result = new _graphChaAniSprite();
                    }
                }
                else
                {
                    result = new _graphChaBmpSprite();
                }
            }
            else
            {
                result = new _graphChaTxtSprite();
            }
            return(result);
        }
示例#2
0
        public void UpDataDpBar(Variant info, Variant conf)
        {
            Variant dpBar = this.getDpBar(0);
            bool    flag  = dpBar != null;

            if (flag)
            {
                _graphChaProgressSprite graphChaProgressSprite = dpBar["spr"]._val as _graphChaProgressSprite;
                graphChaProgressSprite.maxNum = info["max"];
                graphChaProgressSprite.num    = info["cur"];
            }
            bool flag2 = this._dpAniInfo == null;

            if (flag2)
            {
                this._dpAniInfo = new Variant();
            }
            this._dpAniInfo["playing"]  = true;
            this._dpAniInfo["duration"] = conf["ani"]["ttm"]._float;
            this._dpAniInfo["currTm"]   = 0;
            this._dpAniInfo["startVal"] = info["last"]._float / info["max"]._float;
            this._dpAniInfo["curhp"]    = info["cur"];
            this._dpAniInfo["maxhp"]    = info["max"];
        }