Ejemplo n.º 1
0
    // Token: 0x06000274 RID: 628 RVA: 0x00009214 File Offset: 0x00007614
    public GameObject LoadCloverObject(int idx, CloverDataFormat cloverData)
    {
        GameObject gameObject = UnityEngine.Object.Instantiate <GameObject>(this.basePrefab, Vector3.zero, Quaternion.identity);

        gameObject.GetComponent <Clover>().SetCloverData(idx, cloverData);
        int element = cloverData.element;

        if (element != 0)
        {
            if (element == 1)
            {
                gameObject.GetComponent <SpriteRenderer>().sprite = this.fourCloverSprite[cloverData.spriteNum];
            }
        }
        else
        {
            gameObject.GetComponent <SpriteRenderer>().sprite = this.cloverSprite[cloverData.spriteNum];
        }
        gameObject.transform.parent     = base.transform;
        gameObject.transform.localScale = Vector3.one;
        Vector3 zero = Vector3.zero;

        zero.x = cloverData.x;
        zero.y = cloverData.y;
        gameObject.transform.localPosition = zero;
        return(gameObject);
    }
Ejemplo n.º 2
0
 // Token: 0x0600026A RID: 618 RVA: 0x00008958 File Offset: 0x00006D58
 public void SetCloverData(int _index, CloverDataFormat cloverData)
 {
     this.index     = _index;
     this.point     = cloverData.point;
     this.element   = cloverData.element;
     this.spriteNum = cloverData.spriteNum;
     this.getTimer  = 0f;
     this.isTimer   = false;
     this.isGet     = false;
     this.isDestroy = false;
 }
Ejemplo n.º 3
0
 // Token: 0x06000403 RID: 1027 RVA: 0x0001A644 File Offset: 0x00018A44
 public CloverDataFormat(CloverDataFormat original)
 {
     this.x           = original.x;
     this.y           = original.y;
     this.element     = original.element;
     this.spriteNum   = original.spriteNum;
     this.point       = original.point;
     this.lastHarvest = new DateTime(original.lastHarvest.Year, original.lastHarvest.Month, original.lastHarvest.Day, original.lastHarvest.Hour, original.lastHarvest.Minute, original.lastHarvest.Second, original.lastHarvest.Millisecond);
     this.timeSpanSec = original.timeSpanSec;
     this.newFlag     = original.newFlag;
 }
Ejemplo n.º 4
0
    // Token: 0x06000273 RID: 627 RVA: 0x00008D90 File Offset: 0x00007190
    public void checkCloverCreate()
    {
        this.cloverList = SuperGameMaster.GetCloverList();
        bool flag = false;

        if (this.cloverList.Count == 0)
        {
            flag = true;
            Debug.Log("[CloverFarm] クローバーの初期化フラグが立ちました。四葉を生成します");
        }
        if (this.cloverList.Count < this.cloverMax)
        {
            Debug.Log(string.Concat(new object[]
            {
                "[CloverFarm] クローバーの数を調整します:",
                this.cloverList.Count,
                " > ",
                this.cloverMax
            }));
        }
        while (this.cloverList.Count < this.cloverMax)
        {
            CloverDataFormat cloverDataFormat = new CloverDataFormat();
            cloverDataFormat.lastHarvest = new DateTime(1970, 1, 1);
            cloverDataFormat.timeSpanSec = -this.cloverList.Count - 1;
            cloverDataFormat.newFlag     = true;
            this.cloverList.Add(cloverDataFormat);
        }
        if (this.cloverList.Count > this.cloverMax)
        {
            Debug.Log(string.Concat(new object[]
            {
                "[CloverFarm] クローバーの数を調整します:",
                this.cloverList.Count,
                " > ",
                this.cloverMax
            }));
            this.cloverList.RemoveRange(this.cloverMax - 1, this.cloverList.Count - this.cloverMax);
        }
        this.cloversObj = new List <GameObject>();
        for (int i = 0; i < this.cloverList.Count; i++)
        {
            if (!this.cloverList[i].newFlag && this.cloverList[i].timeSpanSec <= 0)
            {
                this.cloversObj.Add(this.LoadCloverObject(i, this.cloverList[i]));
            }
        }
        int num = 0;

        for (int j = 0; j < this.cloverList.Count; j++)
        {
            if (this.cloverList[j].newFlag)
            {
                if (!flag)
                {
                    this.cloversObj.Add(this.NewCloverObject(j, this.cloverList[j], this.cloversObj));
                }
                else
                {
                    this.cloversObj.Add(this.NewCloverObject(j, this.cloverList[j], this.cloversObj, true));
                    flag = false;
                }
                this.cloverList[j].x = this.cloversObj[this.cloversObj.Count - 1].transform.localPosition.x;
                this.cloverList[j].y = this.cloversObj[this.cloversObj.Count - 1].transform.localPosition.y;
                Clover component = this.cloversObj[this.cloversObj.Count - 1].GetComponent <Clover>();
                this.cloverList[j].element   = component.element;
                this.cloverList[j].spriteNum = component.spriteNum;
                this.cloverList[j].point     = component.point;
                this.cloverList[j].newFlag   = false;
                num++;
            }
        }
        foreach (GameObject gameObject in this.cloversObj)
        {
            int num2 = this.cloverOrderInLayer;
            foreach (GameObject gameObject2 in this.cloversObj)
            {
                if (gameObject.transform.position.y < gameObject2.transform.position.y)
                {
                    num2++;
                }
            }
            gameObject.GetComponent <SpriteRenderer>().sortingOrder = num2;
        }
        Debug.Log(string.Concat(new object[]
        {
            "[CloverFarm] クローバー生成完了:",
            this.cloversObj.Count,
            "\u3000/ (新規:",
            num,
            ")"
        }));
    }
Ejemplo n.º 5
0
    // Token: 0x06000276 RID: 630 RVA: 0x000092F4 File Offset: 0x000076F4
    public GameObject NewCloverObject(int index, CloverDataFormat cloverData, List <GameObject> cloversObj, bool fourLeafFlag)
    {
        Vector2           size      = base.GetComponent <BoxCollider2D>().size;
        PolygonCollider2D component = base.GetComponent <PolygonCollider2D>();
        Vector2           vector    = new Vector2(base.GetComponent <BoxCollider2D>().offset.x - size.x / 2f, base.GetComponent <BoxCollider2D>().offset.y - size.y / 2f);
        int     num = 0;
        bool    flag;
        Vector3 vector2;

        do
        {
            flag    = false;
            vector2 = new Vector2(vector.x + UnityEngine.Random.Range(0f, size.x), vector.y + UnityEngine.Random.Range(0f, size.y));
            if (!component.OverlapPoint(vector2 + base.transform.position))
            {
                flag = true;
            }
            else
            {
                for (int i = 0; i < cloversObj.Count; i++)
                {
                    Vector2 size2 = cloversObj[i].GetComponent <BoxCollider2D>().size;
                    if (Mathf.Abs(vector2.x - cloversObj[i].transform.localPosition.x) < size2.x / 2f && Mathf.Abs(vector2.y - cloversObj[i].transform.localPosition.y) < size2.y / 4f)
                    {
                        flag = true;
                    }
                }
                num++;
                if (num >= 100)
                {
                    break;
                }
            }
        }while (flag);
        GameObject       gameObject       = UnityEngine.Object.Instantiate <GameObject>(this.basePrefab, Vector3.zero, Quaternion.identity);
        CloverDataFormat cloverDataFormat = new CloverDataFormat();

        cloverDataFormat.point   = 1;
        cloverDataFormat.element = 0;
        if (UnityEngine.Random.Range(0f, 10000f) < this.fourLeaf_percent * 100f)
        {
            cloverDataFormat.element = 1;
        }
        if (fourLeafFlag)
        {
            cloverDataFormat.element = 1;
        }
        int element = cloverDataFormat.element;

        if (element != 0)
        {
            if (element == 1)
            {
                cloverDataFormat.spriteNum = UnityEngine.Random.Range(0, this.fourCloverSprite.Length);
                gameObject.GetComponent <SpriteRenderer>().sprite = this.fourCloverSprite[cloverDataFormat.spriteNum];
            }
        }
        else
        {
            cloverDataFormat.spriteNum = UnityEngine.Random.Range(0, this.cloverSprite.Length);
            gameObject.GetComponent <SpriteRenderer>().sprite = this.cloverSprite[cloverDataFormat.spriteNum];
        }
        gameObject.GetComponent <Clover>().SetCloverData(index, cloverDataFormat);
        gameObject.transform.parent        = base.transform;
        gameObject.transform.localScale    = Vector3.one;
        gameObject.transform.localPosition = vector2;
        return(gameObject);
    }
Ejemplo n.º 6
0
 // Token: 0x06000275 RID: 629 RVA: 0x000092E5 File Offset: 0x000076E5
 public GameObject NewCloverObject(int index, CloverDataFormat cloverData, List <GameObject> cloversObj)
 {
     return(this.NewCloverObject(index, cloverData, cloversObj, false));
 }
Ejemplo n.º 7
0
    // Token: 0x06000448 RID: 1096 RVA: 0x0001D6F8 File Offset: 0x0001BAF8
    public byte[] ConvertBinary_Main(bool write, byte[] sByte)
    {
        int           num  = 0;
        List <byte[]> list = new List <byte[]>();
        int           num2 = 4;

        if (write)
        {
            list.Add(new byte[num2]);
            ByteConverter.ConnectWrite(Convert.ToInt32(this.version * 10000f), list[list.Count - 1], 0, num2);
        }
        else
        {
            this.version = (float)ByteConverter.ConnectRead(sByte, num, num2) / 10000f;
            num         += num2;
        }
        num2 = 4;
        if (write)
        {
            list.Add(new byte[num2]);
            ByteConverter.ConnectWrite(this.supportID, list[list.Count - 1], 0, num2);
        }
        else
        {
            this.supportID = ByteConverter.ConnectRead(sByte, num, num2);
            num           += num2;
        }
        int num3;

        if (write)
        {
            num3 = this.hoten.Count;
        }
        else
        {
            num3 = ByteConverter.ConnectRead(sByte, num, 4);
        }
        int num4 = 1;
        int num5 = 4;

        num2 = 4 + num3 * num4;
        if (write)
        {
            list.Add(new byte[num2]);
            ByteConverter.ConnectWrite(num3, list[list.Count - 1], 0, 4);
            int i = 0;
            while (i < num3)
            {
                ByteConverter.ConnectWrite(Convert.ToInt32(this.hoten[i]), list[list.Count - 1], num5, num4);
                i++;
                num5 += num4;
            }
        }
        else
        {
            int i = 0;
            while (i < num3)
            {
                this.hoten.Add(Convert.ToBoolean(ByteConverter.ConnectRead(sByte, num + num5, num4)));
                i++;
                num5 += num4;
            }
            num += num2;
        }
        num2 = 4;
        if (write)
        {
            list.Add(new byte[num2]);
            ByteConverter.ConnectWrite(this.CloverPoint, list[list.Count - 1], 0, num2);
        }
        else
        {
            this.CloverPoint = ByteConverter.ConnectRead(sByte, num, num2);
            num += num2;
        }
        num2 = 4;
        if (write)
        {
            list.Add(new byte[num2]);
            ByteConverter.ConnectWrite(this.ticket, list[list.Count - 1], 0, num2);
        }
        else
        {
            this.ticket = ByteConverter.ConnectRead(sByte, num, num2);
            num        += num2;
        }
        if (write)
        {
            num3 = this.CloverList.Count;
        }
        else
        {
            num3 = ByteConverter.ConnectRead(sByte, num, 4);
        }
        num4 = new CloverDataFormat().UseByte();
        num5 = 4;
        num2 = 4 + num3 * num4;
        if (write)
        {
            list.Add(new byte[num2]);
            ByteConverter.ConnectWrite(num3, list[list.Count - 1], 0, 4);
            int i = 0;
            while (i < num3)
            {
                Buffer.BlockCopy(this.CloverList[i].ConvertBinary(true, null), 0, list[list.Count - 1], num5, num4);
                i++;
                num5 += num4;
            }
        }
        else
        {
            int i = 0;
            while (i < num3)
            {
                byte[] array = new byte[num4];
                Buffer.BlockCopy(sByte, num + num5, array, 0, num4);
                this.CloverList.Add(new CloverDataFormat());
                this.CloverList[this.CloverList.Count - 1].ConvertBinary(false, array);
                i++;
                num5 += num4;
            }
            num += num2;
        }
        num3 = 7;
        num4 = 4;
        num5 = 4;
        num2 = 4 + num3 * num4;
        if (write)
        {
            list.Add(new byte[num2]);
            ByteConverter.ConnectWrite(num3, list[list.Count - 1], 0, 4);
            int i = 0;
            while (i < num3)
            {
                switch (i)
                {
                case 0:
                    ByteConverter.ConnectWrite(this.lastDateTime.Year, list[list.Count - 1], num5, num4);
                    break;

                case 1:
                    ByteConverter.ConnectWrite(this.lastDateTime.Month, list[list.Count - 1], num5, num4);
                    break;

                case 2:
                    ByteConverter.ConnectWrite(this.lastDateTime.Day, list[list.Count - 1], num5, num4);
                    break;

                case 3:
                    ByteConverter.ConnectWrite(this.lastDateTime.Hour, list[list.Count - 1], num5, num4);
                    break;

                case 4:
                    ByteConverter.ConnectWrite(this.lastDateTime.Minute, list[list.Count - 1], num5, num4);
                    break;

                case 5:
                    ByteConverter.ConnectWrite(this.lastDateTime.Second, list[list.Count - 1], num5, num4);
                    break;

                case 6:
                    ByteConverter.ConnectWrite(this.lastDateTime.Millisecond, list[list.Count - 1], num5, num4);
                    break;
                }
                i++;
                num5 += num4;
            }
        }
        else
        {
            int[] array2 = new int[7];
            int   i      = 0;
            while (i < num3)
            {
                array2[i] = ByteConverter.ConnectRead(sByte, num + num5, num4);
                i++;
                num5 += num4;
            }
            this.lastDateTime = new DateTime(array2[0], array2[1], array2[2], array2[3], array2[4], array2[5], array2[6]);
            num += num2;
        }
        num2 = 4;
        if (write)
        {
            list.Add(new byte[num2]);
            ByteConverter.ConnectWrite(this.MailList_nextId, list[list.Count - 1], 0, num2);
        }
        else
        {
            this.MailList_nextId = ByteConverter.ConnectRead(sByte, num, num2);
            num += num2;
        }
        if (write)
        {
            num3 = this.MailList.Count;
        }
        else
        {
            num3 = ByteConverter.ConnectRead(sByte, num, 4);
        }
        num4 = new MailEventFormat().UseByte();
        num5 = 4;
        num2 = 4 + num3 * num4;
        if (write)
        {
            list.Add(new byte[num2]);
            ByteConverter.ConnectWrite(num3, list[list.Count - 1], 0, 4);
            int i = 0;
            while (i < num3)
            {
                Buffer.BlockCopy(this.MailList[i].ConvertBinary(true, null), 0, list[list.Count - 1], num5, num4);
                i++;
                num5 += num4;
            }
        }
        else
        {
            int i = 0;
            while (i < num3)
            {
                byte[] array3 = new byte[num4];
                Buffer.BlockCopy(sByte, num + num5, array3, 0, num4);
                this.MailList.Add(new MailEventFormat());
                this.MailList[this.MailList.Count - 1].ConvertBinary(false, array3);
                i++;
                num5 += num4;
            }
            num += num2;
        }
        if (write)
        {
            num3 = this.ItemList.Count;
        }
        else
        {
            num3 = ByteConverter.ConnectRead(sByte, num, 4);
        }
        num4 = new ItemListFormat().UseByte();
        num5 = 4;
        num2 = 4 + num3 * num4;
        if (write)
        {
            list.Add(new byte[num2]);
            ByteConverter.ConnectWrite(num3, list[list.Count - 1], 0, 4);
            int i = 0;
            while (i < num3)
            {
                Buffer.BlockCopy(this.ItemList[i].ConvertBinary(true, null), 0, list[list.Count - 1], num5, num4);
                i++;
                num5 += num4;
            }
        }
        else
        {
            int i = 0;
            while (i < num3)
            {
                byte[] array4 = new byte[num4];
                Buffer.BlockCopy(sByte, num + num5, array4, 0, num4);
                this.ItemList.Add(new ItemListFormat());
                this.ItemList[this.ItemList.Count - 1].ConvertBinary(false, array4);
                i++;
                num5 += num4;
            }
            num += num2;
        }
        if (write)
        {
            num3 = this.bagList.Count;
        }
        else
        {
            num3 = ByteConverter.ConnectRead(sByte, num, 4);
        }
        num4 = 4;
        num5 = 4;
        num2 = 4 + num3 * num4;
        if (write)
        {
            list.Add(new byte[num2]);
            ByteConverter.ConnectWrite(num3, list[list.Count - 1], 0, 4);
            int i = 0;
            while (i < num3)
            {
                ByteConverter.ConnectWrite(this.bagList[i], list[list.Count - 1], num5, num4);
                i++;
                num5 += num4;
            }
        }
        else
        {
            int i = 0;
            while (i < num3)
            {
                this.bagList.Add(ByteConverter.ConnectRead(sByte, num + num5, num4));
                i++;
                num5 += num4;
            }
            num += num2;
        }
        if (write)
        {
            num3 = this.deskList.Count;
        }
        else
        {
            num3 = ByteConverter.ConnectRead(sByte, num, 4);
        }
        num4 = 4;
        num5 = 4;
        num2 = 4 + num3 * num4;
        if (write)
        {
            list.Add(new byte[num2]);
            ByteConverter.ConnectWrite(num3, list[list.Count - 1], 0, 4);
            int i = 0;
            while (i < num3)
            {
                ByteConverter.ConnectWrite(this.deskList[i], list[list.Count - 1], num5, num4);
                i++;
                num5 += num4;
            }
        }
        else
        {
            int i = 0;
            while (i < num3)
            {
                this.deskList.Add(ByteConverter.ConnectRead(sByte, num + num5, num4));
                i++;
                num5 += num4;
            }
            num += num2;
        }
        if (write)
        {
            num3 = this.bagList_virtual.Count;
        }
        else
        {
            num3 = ByteConverter.ConnectRead(sByte, num, 4);
        }
        num4 = 4;
        num5 = 4;
        num2 = 4 + num3 * num4;
        if (write)
        {
            list.Add(new byte[num2]);
            ByteConverter.ConnectWrite(num3, list[list.Count - 1], 0, 4);
            int i = 0;
            while (i < num3)
            {
                ByteConverter.ConnectWrite(this.bagList_virtual[i], list[list.Count - 1], num5, num4);
                i++;
                num5 += num4;
            }
        }
        else
        {
            int i = 0;
            while (i < num3)
            {
                this.bagList_virtual.Add(ByteConverter.ConnectRead(sByte, num + num5, num4));
                i++;
                num5 += num4;
            }
            num += num2;
        }
        if (write)
        {
            num3 = this.deskList_virtual.Count;
        }
        else
        {
            num3 = ByteConverter.ConnectRead(sByte, num, 4);
        }
        num4 = 4;
        num5 = 4;
        num2 = 4 + num3 * num4;
        if (write)
        {
            list.Add(new byte[num2]);
            ByteConverter.ConnectWrite(num3, list[list.Count - 1], 0, 4);
            int i = 0;
            while (i < num3)
            {
                ByteConverter.ConnectWrite(this.deskList_virtual[i], list[list.Count - 1], num5, num4);
                i++;
                num5 += num4;
            }
        }
        else
        {
            int i = 0;
            while (i < num3)
            {
                this.deskList_virtual.Add(ByteConverter.ConnectRead(sByte, num + num5, num4));
                i++;
                num5 += num4;
            }
            num += num2;
        }
        if (write)
        {
            num3 = this.collectFlags.Count;
        }
        else
        {
            num3 = ByteConverter.ConnectRead(sByte, num, 4);
        }
        num4 = 1;
        num5 = 4;
        num2 = 4 + num3 * num4;
        if (write)
        {
            list.Add(new byte[num2]);
            ByteConverter.ConnectWrite(num3, list[list.Count - 1], 0, 4);
            int i = 0;
            while (i < num3)
            {
                ByteConverter.ConnectWrite(Convert.ToInt32(this.collectFlags[i]), list[list.Count - 1], num5, num4);
                i++;
                num5 += num4;
            }
        }
        else
        {
            int i = 0;
            while (i < num3)
            {
                this.collectFlags.Add(Convert.ToBoolean(ByteConverter.ConnectRead(sByte, num + num5, num4)));
                i++;
                num5 += num4;
            }
            num += num2;
        }
        if (write)
        {
            num3 = this.collectFailedCnt.Count;
        }
        else
        {
            num3 = ByteConverter.ConnectRead(sByte, num, 4);
        }
        num4 = 4;
        num5 = 4;
        num2 = 4 + num3 * num4;
        if (write)
        {
            list.Add(new byte[num2]);
            ByteConverter.ConnectWrite(num3, list[list.Count - 1], 0, 4);
            int i = 0;
            while (i < num3)
            {
                ByteConverter.ConnectWrite(this.collectFailedCnt[i], list[list.Count - 1], num5, num4);
                i++;
                num5 += num4;
            }
        }
        else
        {
            int i = 0;
            while (i < num3)
            {
                this.collectFailedCnt.Add(ByteConverter.ConnectRead(sByte, num + num5, num4));
                if (this.collectFailedCnt[i] != 0)
                {
                    Debug.LogWarning(string.Concat(new object[]
                    {
                        "collectFailedCnt[",
                        i,
                        "] ",
                        this.collectFailedCnt[i]
                    }));
                }
                i++;
                num5 += num4;
            }
            num += num2;
        }
        if (write)
        {
            num3 = this.specialtyFlags.Count;
        }
        else
        {
            num3 = ByteConverter.ConnectRead(sByte, num, 4);
        }
        num4 = 1;
        num5 = 4;
        num2 = 4 + num3 * num4;
        if (write)
        {
            list.Add(new byte[num2]);
            ByteConverter.ConnectWrite(num3, list[list.Count - 1], 0, 4);
            int i = 0;
            while (i < num3)
            {
                ByteConverter.ConnectWrite(Convert.ToInt32(this.specialtyFlags[i]), list[list.Count - 1], num5, num4);
                i++;
                num5 += num4;
            }
        }
        else
        {
            int i = 0;
            while (i < num3)
            {
                this.specialtyFlags.Add(Convert.ToBoolean(ByteConverter.ConnectRead(sByte, num + num5, num4)));
                i++;
                num5 += num4;
            }
            num += num2;
        }
        if (write)
        {
            num3 = this.evtList_timer.Count;
        }
        else
        {
            num3 = ByteConverter.ConnectRead(sByte, num, 4);
        }
        num4 = new EventTimerFormat().UseByte();
        num5 = 4;
        num2 = 4 + num3 * num4;
        if (write)
        {
            list.Add(new byte[num2]);
            ByteConverter.ConnectWrite(num3, list[list.Count - 1], 0, 4);
            int i = 0;
            while (i < num3)
            {
                Buffer.BlockCopy(this.evtList_timer[i].ConvertBinary(true, null), 0, list[list.Count - 1], num5, num4);
                i++;
                num5 += num4;
            }
        }
        else
        {
            int i = 0;
            while (i < num3)
            {
                byte[] array5 = new byte[num4];
                Buffer.BlockCopy(sByte, num + num5, array5, 0, num4);
                this.evtList_timer.Add(new EventTimerFormat());
                this.evtList_timer[this.evtList_timer.Count - 1].ConvertBinary(false, array5);
                i++;
                num5 += num4;
            }
            num += num2;
        }
        if (write)
        {
            num3 = this.evtList_active.Count;
        }
        else
        {
            num3 = ByteConverter.ConnectRead(sByte, num, 4);
        }
        num4 = new EventTimerFormat().UseByte();
        num5 = 4;
        num2 = 4 + num3 * num4;
        if (write)
        {
            list.Add(new byte[num2]);
            ByteConverter.ConnectWrite(num3, list[list.Count - 1], 0, 4);
            int i = 0;
            while (i < num3)
            {
                Buffer.BlockCopy(this.evtList_active[i].ConvertBinary(true, null), 0, list[list.Count - 1], num5, num4);
                i++;
                num5 += num4;
            }
        }
        else
        {
            int i = 0;
            while (i < num3)
            {
                byte[] array6 = new byte[num4];
                Buffer.BlockCopy(sByte, num + num5, array6, 0, num4);
                this.evtList_active.Add(new EventTimerFormat());
                this.evtList_active[this.evtList_active.Count - 1].ConvertBinary(false, array6);
                i++;
                num5 += num4;
            }
            num += num2;
        }
        num2 = 4;
        if (write)
        {
            list.Add(new byte[num2]);
            ByteConverter.ConnectWrite((int)this.tutorialStep, list[list.Count - 1], 0, num2);
        }
        else
        {
            this.tutorialStep = (Step)ByteConverter.ConnectRead(sByte, num, num2);
            num += num2;
        }
        if (write)
        {
            num3 = this.firstFlag.Count;
        }
        else
        {
            num3 = ByteConverter.ConnectRead(sByte, num, 4);
        }
        num4 = 1;
        num5 = 4;
        num2 = 4 + num3 * num4;
        if (write)
        {
            list.Add(new byte[num2]);
            ByteConverter.ConnectWrite(num3, list[list.Count - 1], 0, 4);
            int i = 0;
            while (i < num3)
            {
                ByteConverter.ConnectWrite(Convert.ToInt32(this.firstFlag[i]), list[list.Count - 1], num5, num4);
                i++;
                num5 += num4;
            }
        }
        else
        {
            int i = 0;
            while (i < num3)
            {
                this.firstFlag.Add(Convert.ToBoolean(ByteConverter.ConnectRead(sByte, num + num5, num4)));
                i++;
                num5 += num4;
            }
            num += num2;
        }
        num2 = 20;
        if (write)
        {
            list.Add(new byte[num2]);
            ByteConverter.ConnectWriteString(this.frogName, list[list.Count - 1], 0, num2);
        }
        else
        {
            this.frogName = ByteConverter.ConnectReadString(sByte, num, num2);
            num          += num2;
        }
        num2 = 4;
        if (write)
        {
            list.Add(new byte[num2]);
            ByteConverter.ConnectWrite(this.frogAchieveId, list[list.Count - 1], 0, num2);
        }
        else
        {
            this.frogAchieveId = ByteConverter.ConnectRead(sByte, num, num2);
            num += num2;
        }
        if (write)
        {
            num3 = this.achieveFlags.Count;
        }
        else
        {
            num3 = ByteConverter.ConnectRead(sByte, num, 4);
        }
        num4 = 1;
        num5 = 4;
        num2 = 4 + num3 * num4;
        if (write)
        {
            list.Add(new byte[num2]);
            ByteConverter.ConnectWrite(num3, list[list.Count - 1], 0, 4);
            int i = 0;
            while (i < num3)
            {
                ByteConverter.ConnectWrite(Convert.ToInt32(this.achieveFlags[i]), list[list.Count - 1], num5, num4);
                i++;
                num5 += num4;
            }
        }
        else
        {
            int i = 0;
            while (i < num3)
            {
                this.achieveFlags.Add(Convert.ToBoolean(ByteConverter.ConnectRead(sByte, num + num5, num4)));
                i++;
                num5 += num4;
            }
            num += num2;
        }
        num2 = 4;
        if (write)
        {
            list.Add(new byte[num2]);
            ByteConverter.ConnectWrite(this.frogMotion, list[list.Count - 1], 0, num2);
        }
        else
        {
            this.frogMotion = ByteConverter.ConnectRead(sByte, num, num2);
            num            += num2;
        }
        num2 = 1;
        if (write)
        {
            list.Add(new byte[num2]);
            ByteConverter.ConnectWrite(Convert.ToInt32(this.home), list[list.Count - 1], 0, num2);
        }
        else
        {
            this.home = Convert.ToBoolean(ByteConverter.ConnectRead(sByte, num, num2));
            num      += num2;
        }
        num2 = 1;
        if (write)
        {
            list.Add(new byte[num2]);
            ByteConverter.ConnectWrite(Convert.ToInt32(this.drift), list[list.Count - 1], 0, num2);
        }
        else
        {
            this.drift = Convert.ToBoolean(ByteConverter.ConnectRead(sByte, num, num2));
            num       += num2;
        }
        num2 = 4;
        if (write)
        {
            list.Add(new byte[num2]);
            ByteConverter.ConnectWrite(this.restTime, list[list.Count - 1], 0, num2);
        }
        else
        {
            this.restTime = ByteConverter.ConnectRead(sByte, num, num2);
            num          += num2;
        }
        num2 = 4;
        if (write)
        {
            list.Add(new byte[num2]);
            ByteConverter.ConnectWrite(this.lastTravelTime, list[list.Count - 1], 0, num2);
        }
        else
        {
            this.lastTravelTime = ByteConverter.ConnectRead(sByte, num, num2);
            num += num2;
        }
        num2 = 1;
        if (write)
        {
            list.Add(new byte[num2]);
            ByteConverter.ConnectWrite(Convert.ToInt32(this.standby), list[list.Count - 1], 0, num2);
        }
        else
        {
            this.standby = Convert.ToBoolean(ByteConverter.ConnectRead(sByte, num, num2));
            num         += num2;
        }
        num2 = 4;
        if (write)
        {
            list.Add(new byte[num2]);
            ByteConverter.ConnectWrite(this.standbyWait, list[list.Count - 1], 0, num2);
        }
        else
        {
            this.standbyWait = ByteConverter.ConnectRead(sByte, num, num2);
            num += num2;
        }
        num2 = 4;
        if (write)
        {
            list.Add(new byte[num2]);
            ByteConverter.ConnectWrite(this.bgmVolume, list[list.Count - 1], 0, num2);
        }
        else
        {
            this.bgmVolume = ByteConverter.ConnectRead(sByte, num, num2);
            num           += num2;
        }
        num2 = 4;
        if (write)
        {
            list.Add(new byte[num2]);
            ByteConverter.ConnectWrite(this.seVolume, list[list.Count - 1], 0, num2);
        }
        else
        {
            this.seVolume = ByteConverter.ConnectRead(sByte, num, num2);
            num          += num2;
        }
        num2 = 1;
        if (write)
        {
            list.Add(new byte[num2]);
            ByteConverter.ConnectWrite(Convert.ToInt32(this.NoticeFlag), list[list.Count - 1], 0, num2);
        }
        else
        {
            this.NoticeFlag = Convert.ToBoolean(ByteConverter.ConnectRead(sByte, num, num2));
            num            += num2;
        }
        if (write)
        {
            num3 = this.gameFlags.Count;
        }
        else
        {
            num3 = ByteConverter.ConnectRead(sByte, num, 4);
        }
        num4 = 4;
        num5 = 4;
        num2 = 4 + num3 * num4;
        if (write)
        {
            list.Add(new byte[num2]);
            ByteConverter.ConnectWrite(num3, list[list.Count - 1], 0, 4);
            int i = 0;
            while (i < num3)
            {
                ByteConverter.ConnectWrite(this.gameFlags[i], list[list.Count - 1], num5, num4);
                i++;
                num5 += num4;
            }
        }
        else
        {
            int i = 0;
            while (i < num3)
            {
                this.gameFlags.Add(ByteConverter.ConnectRead(sByte, num + num5, num4));
                i++;
                num5 += num4;
            }
            num += num2;
        }
        num2 = 4;
        if (write)
        {
            list.Add(new byte[num2]);
            ByteConverter.ConnectWrite(this.tmpRaffleResult, list[list.Count - 1], 0, num2);
        }
        else
        {
            this.tmpRaffleResult = ByteConverter.ConnectRead(sByte, num, num2);
            num += num2;
        }
        num2 = 4;
        if (write)
        {
            list.Add(new byte[num2]);
            ByteConverter.ConnectWrite(Convert.ToInt32(this.version_start * 10000f), list[list.Count - 1], 0, num2);
        }
        else
        {
            this.version_start = (float)ByteConverter.ConnectRead(sByte, num, num2) / 10000f;
            num += num2;
        }
        num2 = 4;
        if (write)
        {
            list.Add(new byte[num2]);
            ByteConverter.ConnectWrite(this.iapCallBackCnt, list[list.Count - 1], 0, num2);
        }
        else if (this.version >= 1.05f)
        {
            this.iapCallBackCnt = ByteConverter.ConnectRead(sByte, num, num2);
            num += num2;
        }
        if (!write && this.version < 1.05f)
        {
            this.supportID = UnityEngine.Random.Range(0, 1000000000);
            this.hoten[0]  = true;
        }
        if (write)
        {
            int num6 = 0;
            foreach (byte[] array7 in list)
            {
                num6 += array7.Length;
            }
            sByte = new byte[num6];
            foreach (byte[] array8 in list)
            {
                Buffer.BlockCopy(array8, 0, sByte, num, array8.Length);
                num += array8.Length;
            }
            return(sByte);
        }
        return(null);
    }