Example #1
0
    public static string GetSkin(CSVRow lRow)
    {
        string res       = "";
        string lPath     = "";
        string lSkinName = "";

        // = GetRowFromID(pID);
        lPath     = lRow.GetString("resPath");
        lSkinName = lRow.GetString("skinName");
        res       = lPath + "/" + lSkinName;
        return(res);
    }
Example #2
0
    public static CSVRow isUseSkin(int pID)
    {
        CSVRow isUse = null;
        CSVRow lRow  = GetRowFromID(pID);
        string l1    = lRow.GetString("skinNode");
        string l2    = lRow.GetString("skinName");

        if ((l1 != "") && (l2 != ""))
        {
            isUse = lRow;
        }
        return(isUse);
    }
Example #3
0
    //UI调用
    public void UISelID()
    {
        int    tempID = int.Parse(textID.text.Trim());
        CSVRow tmpRow = StoryRelationTab._instance().GetRowFromID(tempID);

        if (tmpRow != null)
        {
            textNextID.text   = tmpRow.GetString(StoryRelationTab.csNextID);
            uiEffect.value    = tmpRow.GetInt(StoryRelationTab.csUISort);
            roleSay.value     = tmpRow.GetInt(StoryRelationTab.csIsRoleSay);
            BgChange.value    = tmpRow.GetInt(StoryRelationTab.csNeedChangeBg);
            isAutoSave.value  = tmpRow.GetInt(StoryRelationTab.csIsAutoSave);
            isKeyOption.value = tmpRow.GetInt(StoryRelationTab.csIsKeySave);
            textCn.text       = tmpRow.GetString(StoryRelationTab.csContentCN);
            textEn.text       = tmpRow.GetString(StoryRelationTab.csContentEn);
        }
    }
Example #4
0
    public static string GetPrefab(int pID)
    {
        string res      = "";
        string lPath    = "";
        string lPreName = "";
        CSVRow lRow     = GetRowFromID(pID);

        lPath    = lRow.GetString("resPath");
        lPreName = lRow.GetString("Pre");
        res      = lPath + "/" + lPreName;

        /*
         * bool b1 = GetKeyString("ID",pID.ToString(), "resPath",out lPath);
         * bool b2 = GetKeyString("ID", pID.ToString(), "Pre", out lPreName);
         * if (b1 && b2) {
         *  res = lPath + "/" + lPreName;
         * }*/
        return(res);
    }
Example #5
0
    public static void skinUpdate(int pID, Transform pParent)
    {
        CSVRow lRow = RoleInfoTable.isUseSkin(pID);

        if (lRow != null)
        { //需要换肤
            string skinName = RoleInfoTable.GetSkin(lRow);
            string skinNode = lRow.GetString("skinNode");
            changeSkin(pParent.transform, skinNode, skinName);
        }
    }
Example #6
0
    private const string csElement6 = "暗";  //purple,darkblue

    public void showData(int pRoleID, int pCost, Action pEvent)
    {
        //roleID用于展现UI
        callEvent = pEvent;
        RoleProTable.rolePro tmpPro = RoleProTable.GetFromRoleID(pRoleID);
        refreshData(tmpPro);

        //RoleInfoTable.roleElements tmpEle = RoleInfoTable.Get(pRoleID);
        //monText.text = tmpEle.Name;
        string tmpEleName = "";
        CSVRow lRow       = RoleInfoTable.GetRowFromID(pRoleID);

        tmpEleName = lRow.GetString("Name");
        //RoleInfoTable.GetKeyString("ID", pRoleID.ToString(), "Name", out tmpEleName);
        monText.text = tmpEleName;

        roleID = pRoleID;
        cost   = pCost;
        btnBuySet();
    }
Example #7
0
    //显示剧情内容
    public void showContentText(int nowStoryid)
    {
        storyID = nextStoryID;

        CSVRow tmpRow = StoryRelationTab._instance().GetRowFromID(nowStoryid);
        string msg    = tmpRow.GetString(StoryRelationTab.csContentCN);

        ContentText.text = stringReplace(msg);

        //是否自动保存
        int isAutoSave = tmpRow.GetInt(StoryRelationTab.csIsAutoSave);

        if (isAutoSave == 1)
        {
            autoSaveData.instance().saveData(storyID);
        }

        nextStoryID = tmpRow.GetInt(StoryRelationTab.csNextID);
        if (nextStoryID == 0)   //出现选项的剧情
        {
            showTalkSel(nowStoryid);
        }

        int tmpIsRoleSay = tmpRow.GetInt(StoryRelationTab.csIsRoleSay);

        if (tmpIsRoleSay == 1) //角色说的话
        {
            //判断角色是否发生改变
        }
        else   //背景傍白
               //角色头像是否要隐蔽
        {
        }

        int tmpIsChangeBgScene = tmpRow.GetInt(StoryRelationTab.csNeedChangeBg);

        if (tmpIsChangeBgScene == 1) //场景需要切换
        {
            showBgScene(nowStoryid);
        }
    }