Exemplo n.º 1
0
    // Token: 0x060003AA RID: 938 RVA: 0x0001603C File Offset: 0x0001443C
    public void Push_Next()
    {
        int num = SuperGameMaster.sDataBase.search_PictureDBIndex_forId(this.setId);

        if (num == SuperGameMaster.sDataBase.count_PictureDB() - 1)
        {
            num = -1;
        }
        PictureDataFormat pictureDataFormat = SuperGameMaster.sDataBase.get_PictureDB(num + 1);

        if (pictureDataFormat == null)
        {
            num        = SuperGameMaster.sDataBase.search_PictureDBIndex_forSetType(this.setType);
            this.setId = SuperGameMaster.sDataBase.get_PictureDB(num).id;
        }
        else if (this.setType != pictureDataFormat.type)
        {
            num        = SuperGameMaster.sDataBase.search_PictureDBIndex_forSetType(this.setType);
            this.setId = SuperGameMaster.sDataBase.get_PictureDB(num).id;
        }
        else
        {
            this.setId = pictureDataFormat.id;
        }
        this.ResetTitleText();
    }
Exemplo n.º 2
0
 // Token: 0x0600043B RID: 1083 RVA: 0x0001CB70 File Offset: 0x0001AF70
 public PictureDataFormat(PictureDataFormat original)
 {
     this.id           = original.id;
     this.name         = original.name;
     this.type         = original.type;
     this.view         = original.view;
     this.randomSet    = original.randomSet;
     this.backImage    = original.backImage;
     this.frontImage   = original.frontImage;
     this.priority     = original.priority;
     this.frogPose     = original.frogPose;
     this.frogPose_s   = original.frogPose_s;
     this.travelerPose = original.travelerPose;
     this.frogPos      = original.frogPos;
     this.frogPos_s    = original.frogPos_s;
     this.travelerPos  = original.travelerPos;
 }
Exemplo n.º 3
0
    // Token: 0x06000645 RID: 1605 RVA: 0x00024CE0 File Offset: 0x000230E0
    public Texture2D PictureCreate(int setId, int charaId, bool rndFix)
    {
        Texture2D texture2D                 = new Texture2D(500, 350, TextureFormat.RGB24, false);
        List <List <Texture2D> > list       = new List <List <Texture2D> >();
        List <List <Texture2D> > list2      = new List <List <Texture2D> >();
        Texture2D         texture2D2        = null;
        Texture2D         texture2D3        = null;
        PictureDataFormat pictureDataFormat = SuperGameMaster.sDataBase.get_PictureDB_forId(setId);

        if (rndFix)
        {
            pictureDataFormat.view = Vector2.zero;
        }
        List <PictureBackDataFormat> list3 = new List <PictureBackDataFormat>();

        foreach (string text in pictureDataFormat.backImage)
        {
            if (text == string.Empty)
            {
                list3.Add(new PictureBackDataFormat());
            }
            else
            {
                if (!pictureDataFormat.randomSet)
                {
                    list3.Add(SuperGameMaster.sDataBase.get_PictureBackDB_forName(text));
                }
                else
                {
                    int num = SuperGameMaster.sDataBase.search_PictureRandomDBIndex_forSet(text);
                    if (num != -1)
                    {
                        PictureRandomDataFormat pictureRandomDataFormat = SuperGameMaster.sDataBase.get_PictureRandomDB(num);
                        string name = pictureRandomDataFormat.setName[UnityEngine.Random.Range(0, pictureRandomDataFormat.setName.Length)];
                        list3.Add(SuperGameMaster.sDataBase.get_PictureBackDB_forName(name));
                    }
                    else
                    {
                        list3.Add(SuperGameMaster.sDataBase.get_PictureBackDB_forName(text));
                    }
                }
                if (rndFix)
                {
                    list3[list3.Count - 1].rndPos = new int[4];
                }
            }
        }
        List <PictureBackDataFormat> list4 = new List <PictureBackDataFormat>();

        foreach (string text2 in pictureDataFormat.frontImage)
        {
            if (text2 == string.Empty)
            {
                list4.Add(new PictureBackDataFormat());
            }
            else
            {
                if (!pictureDataFormat.randomSet)
                {
                    list4.Add(SuperGameMaster.sDataBase.get_PictureBackDB_forName(text2));
                }
                else
                {
                    int num2 = SuperGameMaster.sDataBase.search_PictureRandomDBIndex_forSet(text2);
                    if (num2 != -1)
                    {
                        PictureRandomDataFormat pictureRandomDataFormat2 = SuperGameMaster.sDataBase.get_PictureRandomDB(num2);
                        string name2 = pictureRandomDataFormat2.setName[UnityEngine.Random.Range(0, pictureRandomDataFormat2.setName.Length)];
                        list4.Add(SuperGameMaster.sDataBase.get_PictureBackDB_forName(name2));
                    }
                    else
                    {
                        list4.Add(SuperGameMaster.sDataBase.get_PictureBackDB_forName(text2));
                    }
                }
                if (rndFix)
                {
                    list4[list4.Count - 1].rndPos = new int[4];
                }
            }
        }
        PictureCharaDataFormat pictureCharaDataFormat  = SuperGameMaster.sDataBase.get_PictureCharaDB_forId(-1);
        PictureCharaDataFormat pictureCharaDataFormat2 = null;

        if (charaId != -1)
        {
            pictureCharaDataFormat2 = SuperGameMaster.sDataBase.get_PictureCharaDB_forId(charaId);
        }
        foreach (PictureBackDataFormat pictureBackDataFormat in list3)
        {
            List <Texture2D> list5 = new List <Texture2D>();
            if (pictureBackDataFormat.path == null)
            {
                list5.Add(null);
            }
            else
            {
                foreach (string path2 in pictureBackDataFormat.path)
                {
                    list5.Add(Resources.Load(path2) as Texture2D);
                }
            }
            list.Add(list5);
        }
        foreach (PictureBackDataFormat pictureBackDataFormat2 in list4)
        {
            List <Texture2D> list6 = new List <Texture2D>();
            if (pictureBackDataFormat2.path == null)
            {
                list6.Add(null);
            }
            else
            {
                foreach (string path4 in pictureBackDataFormat2.path)
                {
                    list6.Add(Resources.Load(path4) as Texture2D);
                }
            }
            list2.Add(list6);
        }
        bool flag = false;

        if (charaId == -1)
        {
            flag = true;
        }
        else if (pictureDataFormat.travelerPose[charaId] == string.Empty)
        {
            flag = true;
        }
        string text3 = string.Empty;

        if (flag)
        {
            text3 = pictureDataFormat.frogPose_s;
        }
        else
        {
            text3 = pictureDataFormat.frogPose;
        }
        int num3;

        if (!pictureDataFormat.randomSet)
        {
            num3 = SuperGameMaster.sDataBase.search_PictureCharaDB_posePathIndex_forPoseName(text3);
        }
        else
        {
            int num4 = SuperGameMaster.sDataBase.search_PictureRandomDBIndex_forSet(text3);
            if (num4 != -1)
            {
                PictureRandomDataFormat pictureRandomDataFormat3 = SuperGameMaster.sDataBase.get_PictureRandomDB(num4);
                string poseName = pictureRandomDataFormat3.setName[UnityEngine.Random.Range(0, pictureRandomDataFormat3.setName.Length)];
                num3 = SuperGameMaster.sDataBase.search_PictureCharaDB_posePathIndex_forPoseName(poseName);
            }
            else
            {
                num3 = -1;
            }
        }
        if (num3 != -1)
        {
            texture2D2 = (Resources.Load(pictureCharaDataFormat.posePath[num3]) as Texture2D);
        }
        num3 = -1;
        if (charaId != -1)
        {
            if (!pictureDataFormat.randomSet)
            {
                num3 = SuperGameMaster.sDataBase.search_PictureCharaDB_posePathIndex_forPoseName(pictureDataFormat.travelerPose[charaId]);
            }
            else
            {
                int num5 = SuperGameMaster.sDataBase.search_PictureRandomDBIndex_forSet(pictureDataFormat.travelerPose[charaId]);
                if (num5 != -1)
                {
                    PictureRandomDataFormat pictureRandomDataFormat4 = SuperGameMaster.sDataBase.get_PictureRandomDB(num5);
                    string poseName2 = pictureRandomDataFormat4.setName[UnityEngine.Random.Range(0, pictureRandomDataFormat4.setName.Length)];
                    num3 = SuperGameMaster.sDataBase.search_PictureCharaDB_posePathIndex_forPoseName(poseName2);
                }
                else
                {
                    num3 = -1;
                }
            }
        }
        if (num3 != -1 && pictureCharaDataFormat2 != null)
        {
            texture2D3 = (Resources.Load(pictureCharaDataFormat2.posePath[num3]) as Texture2D);
        }
        this.photo_frame = (Resources.Load("Picture/photo_frame") as Texture2D);
        if (pictureDataFormat.view != Vector2.zero)
        {
            int num6 = UnityEngine.Random.Range(0, (int)pictureDataFormat.view.x + 1);
            if (UnityEngine.Random.Range(0, 2) == 1)
            {
                num6 *= -1;
            }
            int num7 = UnityEngine.Random.Range(0, (int)pictureDataFormat.view.y + 1);
            if (UnityEngine.Random.Range(0, 2) == 1)
            {
                num7 *= -1;
            }
            pictureDataFormat.view = new Vector2((float)num6, (float)num7);
        }
        for (int m = 0; m < list.Count; m++)
        {
            if (list[m] != null)
            {
                this.SetTexture(texture2D, list[m], this.GetPivotPos(texture2D, list[m], list3[m].fixPos + pictureDataFormat.view, PictureCreator.Pivot.Center, list3[m].rndPos));
            }
        }
        if (charaId != -1)
        {
            if (pictureDataFormat.travelerPose[charaId] != string.Empty)
            {
                if (!pictureDataFormat.priority)
                {
                    this.SetTexture(texture2D, texture2D2, this.GetPivotPos(texture2D, texture2D2, pictureDataFormat.frogPos + pictureDataFormat.view, PictureCreator.Pivot.Center));
                    this.SetTexture(texture2D, texture2D3, this.GetPivotPos(texture2D, texture2D3, pictureDataFormat.travelerPos[charaId] + pictureDataFormat.view, PictureCreator.Pivot.Center));
                }
                else
                {
                    this.SetTexture(texture2D, texture2D3, this.GetPivotPos(texture2D, texture2D3, pictureDataFormat.travelerPos[charaId] + pictureDataFormat.view, PictureCreator.Pivot.Center));
                    this.SetTexture(texture2D, texture2D2, this.GetPivotPos(texture2D, texture2D2, pictureDataFormat.frogPos + pictureDataFormat.view, PictureCreator.Pivot.Center));
                }
            }
            else if (pictureDataFormat.frogPose_s != string.Empty)
            {
                this.SetTexture(texture2D, texture2D2, this.GetPivotPos(texture2D, texture2D2, pictureDataFormat.frogPos_s + pictureDataFormat.view, PictureCreator.Pivot.Center));
            }
            else
            {
                this.SetTexture(texture2D, texture2D2, this.GetPivotPos(texture2D, texture2D2, pictureDataFormat.frogPos + pictureDataFormat.view, PictureCreator.Pivot.Center));
            }
        }
        else if (pictureDataFormat.frogPose_s != string.Empty)
        {
            this.SetTexture(texture2D, texture2D2, this.GetPivotPos(texture2D, texture2D2, pictureDataFormat.frogPos_s + pictureDataFormat.view, PictureCreator.Pivot.Center));
        }
        else
        {
            this.SetTexture(texture2D, texture2D2, this.GetPivotPos(texture2D, texture2D2, pictureDataFormat.frogPos + pictureDataFormat.view, PictureCreator.Pivot.Center));
        }
        for (int n = 0; n < list2.Count; n++)
        {
            if (list2[n] != null)
            {
                this.SetTexture(texture2D, list2[n], this.GetPivotPos(texture2D, list2[n], list4[n].fixPos + pictureDataFormat.view, PictureCreator.Pivot.Center, list4[n].rndPos));
            }
        }
        this.SetTexture(texture2D, this.photo_frame, new Vector2(texture2D.texelSize.x / 2f, texture2D.texelSize.y / 2f));
        Debug.Log(string.Concat(new object[]
        {
            "[PictureCreator] 写真データ取得:setID = ",
            setId,
            " / charaId = ",
            charaId
        }));
        texture2D.Apply();
        return(texture2D);
    }