示例#1
0
        // Token: 0x06012F93 RID: 77715 RVA: 0x004D984C File Offset: 0x004D7A4C
        private void CreateSpineGraphic(ConfigDataJobConnectionInfo jobConnectionInfo, ref UISpineGraphic m_graphic, GameObject m_grapgicObj)
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_CreateSpineGraphicConfigDataJobConnectionInfoUISpineGraphic_GameObject_hotfix != null)
            {
                LuaDelegation.Lua_BlackJack_ProjectL_UI_HeroSimpleItemInfoUIController_CreateSpineGraphic_ConfigDataJobConnectionInfo_UISpineGraphic_GameObject(this, this.m_CreateSpineGraphicConfigDataJobConnectionInfoUISpineGraphic_GameObject_hotfix, jobConnectionInfo, ref m_graphic, m_grapgicObj);
                return;
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            this.DestroySpineGraphic(ref m_graphic);
            if (jobConnectionInfo == null)
            {
                return;
            }
            m_graphic = new UISpineGraphic();
            float   num      = (float)jobConnectionInfo.UI_ModelScale * 0.01f;
            Vector2 position = new Vector2((float)jobConnectionInfo.UI_ModelOffsetX, (float)jobConnectionInfo.UI_ModelOffsetY);

            m_graphic.Create(jobConnectionInfo.Model);
            m_graphic.SetParent(m_grapgicObj);
            m_graphic.SetDirection(1);
            m_graphic.SetPosition(position);
            m_graphic.SetScale(num);
            m_graphic.SetRectTransformSize(new Vector2(500f / num, 500f / num));
            m_graphic.SetReplaceAnimations(jobConnectionInfo.ReplaceAnims);
            m_graphic.PlayAnimation("idle", true, 0);
            m_graphic.ForceUpdate();
        }
        // Token: 0x0600D7A7 RID: 55207 RVA: 0x003AB4AC File Offset: 0x003A96AC
        private UISpineGraphic CreateSpineGraphic(string assetName, float scale, Vector2 offset, int team, GameObject parent, List <ReplaceAnim> replaceAnims)
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_CreateSpineGraphicStringSingleVector2Int32GameObjectList ` 1_hotfix != null)
            {
                return((UISpineGraphic)this.m_CreateSpineGraphicStringSingleVector2Int32GameObjectList ` 1_hotfix.call(new object[]
                {
                    this,
                    assetName,
                    scale,
                    offset,
                    team,
                    parent,
                    replaceAnims
                }));
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            UISpineGraphic uispineGraphic = new UISpineGraphic();

            uispineGraphic.Create(assetName);
            uispineGraphic.SetParent(parent);
            uispineGraphic.SetDirection((team != 0) ? -1 : 1);
            uispineGraphic.SetPosition(offset);
            uispineGraphic.SetScale(scale);
            uispineGraphic.SetReplaceAnimations(replaceAnims);
            uispineGraphic.PlayAnimation("idle", true, 0);
            uispineGraphic.ForceUpdate();
            return(uispineGraphic);
        }
示例#3
0
    public static int SetReplaceAnimations(IntPtr l)
    {
        int result;

        try
        {
            UISpineGraphic     uispineGraphic = (UISpineGraphic)LuaObject.checkSelf(l);
            List <ReplaceAnim> replaceAnimations;
            LuaObject.checkType <List <ReplaceAnim> >(l, 2, out replaceAnimations);
            uispineGraphic.SetReplaceAnimations(replaceAnimations);
            LuaObject.pushValue(l, true);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }