Beispiel #1
0
    // Token: 0x06000AAF RID: 2735 RVA: 0x000E5728 File Offset: 0x000E3928
    public override void RunSpecialSimuMode(LineNode node)
    {
        byte b = 0;

        SheetAnimationUnitGroup.getSpriteDirFromAngle(node.angle, out b);
        float num  = Mathf.Min(node.timeOffset * node.inverseTransferTime, 1f);
        float num2 = Mathf.Min(5f, node.touchDownDistance * 0.5f);
        float num3 = Mathf.Max(0f, GameConstants.CubicBezierCurves(new Vector2(0f, 0f), new Vector2(num2, num2), new Vector2(node.touchDownDistance, num2), new Vector2(node.touchDownDistance, 0f), node.inverseTransferTime, node.timeOffset).y);
        float num4 = 0.5f * num3 * 0.2857143f;
        float num5 = this.CheckValueVaild(Mathf.Max(0.1f, 1f - num4), 1f);
        float num6 = this.CheckValueVaild(1f + num4, 1f);

        for (int i = 0; i < this.Count; i++)
        {
            if (this.animUnit[i] != null && this.animUnit[i].SoccerUnit != 0)
            {
                if (this.animUnit[i].SoccerUnit == 1)
                {
                    this.animUnit[i].transform.localPosition  = new Vector3(0f, num3, this.animUnit[i].transform.localPosition.z);
                    this.animUnit[i].transform.localPosition += this.animUnit[i].LocalOffset;
                }
                if (b != 2 && this.animUnit[i].SoccerUnit == 1)
                {
                    this.animUnit[i].transform.localScale = new Vector3(num6, num6, num6);
                }
                if (this.animUnit[i].SoccerUnit == 2)
                {
                    this.animUnit[i].transform.localScale = new Vector3(num5, num5, num5);
                }
            }
        }
    }
Beispiel #2
0
    // Token: 0x06000AA4 RID: 2724 RVA: 0x000E4A40 File Offset: 0x000E2C40
    public override void setupAnimUnit(byte Side, byte lineFlag, float angle, byte setupFlag = 0)
    {
        if (this.transform.childCount != 0)
        {
            this.RecoverUnit();
        }
        this.Count         = 0;
        this.hasSoccerBall = false;
        byte   b       = 0;
        bool   flag    = SheetAnimationUnitGroup.getSpriteDirFromAngle(angle, out b);
        ushort inKey   = 0;
        bool   reverse = false;
        bool   flag2   = (setupFlag & 2) != 0;
        bool   flag3   = (setupFlag & 4) != 0;
        bool   flag4   = (setupFlag & 8) != 0;
        bool   flag5   = (setupFlag & 16) != 0;

        if (flag2)
        {
            inKey = PetManager.Instance.MapDamageEffTable.GetRecordByKey((ushort)lineFlag).PaltformKey;
        }
        else if (flag3)
        {
            inKey   = 33;
            reverse = (b == 4 || flag);
            b       = ((b != 4) ? b : 0);
        }
        else if (flag4)
        {
            inKey = 36;
        }
        else
        {
            switch (lineFlag)
            {
            case 5:
            case 6:
            case 10:
            case 11:
            case 14:
            case 15:
            case 17:
            case 20:
                inKey = 5;
                break;

            case 7:
                inKey = 4;
                break;

            case 8:
            case 18:
                inKey = 30;
                break;

            case 9:
            case 19:
                inKey = 9;
                break;

            case 12:
                inKey = 7;
                break;

            case 13:
                inKey = 1;
                break;

            case 16:
                inKey = 3;
                break;

            case 21:
                inKey = 2;
                break;

            case 22:
                inKey = 10;
                break;

            case 23:
                inKey = 6;
                flag  = false;
                b     = 0;
                break;

            case 24:
            case 25:
                inKey = 6;
                flag  = false;
                b     = 0;
                break;

            case 26:
                inKey = 31;
                flag  = false;
                b     = 0;
                break;

            case 27:
                inKey = 11;
                flag  = false;
                break;

            case 28:
            case 29:
                inKey = 34;
                break;

            case 30:
                if (flag5)
                {
                    inKey = 37;
                }
                else
                {
                    inKey = 35;
                }
                break;
            }
        }
        if ((setupFlag & 1) != 0)
        {
            flag = true;
        }
        MarchPaltform recordByKey = DataManager.Instance.MarchPaltformTable.GetRecordByKey(inKey);
        int           num         = 0;
        int           num2        = 0;

        if (b == 0)
        {
            num  = (int)recordByKey.UpStartID;
            num2 = (int)recordByKey.UpEndID;
        }
        else if (b == 1)
        {
            num  = (int)recordByKey.UpRightStartID;
            num2 = (int)recordByKey.UpRightEndID;
        }
        else if (b == 2)
        {
            num  = (int)recordByKey.RightStartID;
            num2 = (int)recordByKey.RightEndID;
        }
        else if (b == 3)
        {
            num  = (int)recordByKey.DownRightStartID;
            num2 = (int)recordByKey.DownRightEndID;
        }
        else if (b == 4)
        {
            num  = (int)recordByKey.DownStartID;
            num2 = (int)recordByKey.DownEndID;
        }
        int num3 = num2 - num;

        for (int i = 0; i <= num3; i++)
        {
            MarchOffset recordByKey2 = DataManager.Instance.MarchOffsetTable.GetRecordByKey((ushort)(num + i));
            float       x            = (float)recordByKey2.OffsetX * 0.001f * (float)((recordByKey2.SignedX != 0) ? -1 : 1) * (float)((!flag) ? 1 : -1);
            float       y            = (float)recordByKey2.OffsetY * 0.001f * (float)((recordByKey2.SignedY != 0) ? -1 : 1);
            if (flag2 && (recordByKey2.Kind == 10 || recordByKey2.Kind == 11 || recordByKey2.Kind == 12))
            {
                flag = false;
                int   num4  = (int)(recordByKey2.Kind - 10);
                Color value = this.GetColorByMapDamageTb((ushort)lineFlag, (byte)num4);
                this.addAnimUnit(Side, recordByKey2.Kind, b, flag, new Vector3(x, y, 0f), i, false, new Color?(value), new float?(180f + angle), false);
            }
            else
            {
                this.addAnimUnit(Side, recordByKey2.Kind, b, flag, new Vector3(x, y, 0f), i, false, null, null, reverse);
            }
        }
    }
Beispiel #3
0
    // Token: 0x06000AA5 RID: 2725 RVA: 0x000E4E24 File Offset: 0x000E3024
    public void setupLandAnimUnit(byte Side, byte lineFlag, int angle)
    {
        this.Count = 0;
        byte b = 0;

        angle = (560 - angle) % 360;
        bool          spriteDirFromAngle = SheetAnimationUnitGroup.getSpriteDirFromAngle((float)angle, out b);
        MarchPaltform recordByKey        = DataManager.Instance.MarchPaltformTable.GetRecordByKey((ushort)lineFlag);
        int           num  = 0;
        int           num2 = 0;

        if (b == 0)
        {
            num  = (int)recordByKey.UpStartID;
            num2 = (int)recordByKey.UpEndID;
        }
        else if (b == 1)
        {
            num  = (int)recordByKey.UpRightStartID;
            num2 = (int)recordByKey.UpRightEndID;
        }
        else if (b == 2)
        {
            num  = (int)recordByKey.RightStartID;
            num2 = (int)recordByKey.RightEndID;
        }
        else if (b == 3)
        {
            num  = (int)recordByKey.DownRightStartID;
            num2 = (int)recordByKey.DownRightEndID;
        }
        else if (b == 4)
        {
            num  = (int)recordByKey.DownStartID;
            num2 = (int)recordByKey.DownEndID;
        }
        int num3 = num2 - num;
        int i    = 0;

        while (i <= num3)
        {
            MarchOffset recordByKey2 = DataManager.Instance.MarchOffsetTable.GetRecordByKey((ushort)(num + i));
            float       x            = (float)recordByKey2.OffsetX * 0.001f * (float)((recordByKey2.SignedX != 0) ? -1 : 1) * (float)((!spriteDirFromAngle) ? 1 : -1);
            float       y            = (float)recordByKey2.OffsetY * 0.001f * (float)((recordByKey2.SignedY != 0) ? -1 : 1);
            switch (recordByKey2.Kind)
            {
            case 5:
                switch (recordByKey2.AttackerDirection)
                {
                case 0:
                    this.addAnimUnit(Side, recordByKey2.Kind, 0, spriteDirFromAngle, new Vector3(x, y, 0f), 0, false, null, null, false);
                    break;

                case 1:
                    this.addAnimUnit(0, recordByKey2.Kind, 0, false, new Vector3(x, y, 0f), 0, false, null, null, false);
                    break;

                case 2:
                    this.addAnimUnit(0, recordByKey2.Kind, 0, true, new Vector3(x, y, 0f), 0, false, null, null, false);
                    break;

                case 3:
                    this.addAnimUnit(0, recordByKey2.Kind, 0, false, new Vector3(x, y, 0f), 0, true, null, null, false);
                    break;

                case 4:
                    this.addAnimUnit(0, recordByKey2.Kind, 0, true, new Vector3(x, y, 0f), 0, true, null, null, false);
                    break;

                case 5:
                    this.addAnimUnit(1, recordByKey2.Kind, 0, false, new Vector3(x, y, 0f), 0, false, null, null, false);
                    break;

                case 6:
                    this.addAnimUnit(1, recordByKey2.Kind, 0, true, new Vector3(x, y, 0f), 0, false, null, null, false);
                    break;

                case 7:
                    this.addAnimUnit(1, recordByKey2.Kind, 0, false, new Vector3(x, y, 0f), 0, true, null, null, false);
                    break;

                case 8:
                    this.addAnimUnit(1, recordByKey2.Kind, 0, true, new Vector3(x, y, 0f), 0, true, null, null, false);
                    break;
                }
                break;

            case 6:
                goto IL_429;

            case 7:
            case 8:
                this.addAnimUnit(0, recordByKey2.Kind, b, spriteDirFromAngle, new Vector3(x, y, 0f), 0, false, null, null, false);
                break;

            case 9:
                this.addAnimUnit(0, recordByKey2.Kind, 0, spriteDirFromAngle, new Vector3(x, y, 0f), 0, false, null, null, false);
                break;

            default:
                goto IL_429;
            }
IL_463:
            i++;
            continue;
IL_429:
            this.addAnimUnit(Side, recordByKey2.Kind, b, spriteDirFromAngle, new Vector3(x, y, 0f), 0, false, null, null, false);
            goto IL_463;
        }
    }
Beispiel #4
0
    // Token: 0x06000AA2 RID: 2722 RVA: 0x000E4810 File Offset: 0x000E2A10
    public static Sprite[] GetActionSpriteArray(byte Side, byte lineFlag, float angle)
    {
        byte   b = 0;
        bool   spriteDirFromAngle = SheetAnimationUnitGroup.getSpriteDirFromAngle(angle, out b);
        ushort inKey = 0;

        switch (lineFlag)
        {
        case 5:
        case 6:
        case 10:
        case 11:
        case 14:
        case 15:
        case 17:
        case 20:
            inKey = 5;
            break;

        case 7:
            inKey = 4;
            break;

        case 8:
        case 18:
            inKey = 30;
            break;

        case 9:
        case 19:
            inKey = 9;
            Side  = 0;
            break;

        case 12:
            inKey = 7;
            break;

        case 13:
            inKey = 1;
            break;

        case 16:
            inKey = 3;
            break;

        case 21:
            inKey = 2;
            break;

        case 22:
            inKey = 10;
            Side  = 0;
            break;

        case 23:
            inKey = 6;
            b     = 0;
            break;

        case 24:
        case 25:
            inKey = 6;
            b     = 0;
            break;

        case 26:
            inKey = 31;
            b     = 0;
            break;

        case 27:
            inKey = 11;
            b     = 0;
            Side  = 0;
            break;
        }
        MarchPaltform recordByKey = DataManager.Instance.MarchPaltformTable.GetRecordByKey(inKey);
        int           num         = 0;

        if (b == 0)
        {
            num = (int)recordByKey.UpStartID;
        }
        else if (b == 1)
        {
            num = (int)recordByKey.UpRightStartID;
        }
        else if (b == 2)
        {
            num = (int)recordByKey.RightStartID;
        }
        else if (b == 3)
        {
            num = (int)recordByKey.DownRightStartID;
        }
        else if (b == 4)
        {
            num = (int)recordByKey.DownStartID;
        }
        uint actionID = SheetAnimationUnitGroup.GetActionID(Side, DataManager.Instance.MarchOffsetTable.GetRecordByKey((ushort)num).Kind, b);

        return((!SheetAnimationUnitGroup.AnimMap.ContainsKey(actionID)) ? null : SheetAnimationUnitGroup.AnimMap[actionID]);
    }