Beispiel #1
0
    // Token: 0x06000AA7 RID: 2727 RVA: 0x000E52C8 File Offset: 0x000E34C8
    private SheetAnimationUnit GetFreeUnit(byte Side, byte Kind, byte dir, bool bMirror, bool AttackerDirection = false, bool reverse = false)
    {
        uint actionID = SheetAnimationUnitGroup.GetActionID(Side, Kind, dir);

        if (this.IsSoccer(Kind) != 0)
        {
            SheetAnimationUnitGroup.InitSoccerRes();
        }
        Material material = (this.IsSoccer(Kind) == 0) ? SheetAnimationUnitGroup.sharedMat : SheetAnimationUnitGroup.sharedSoccerMat;

        if (SheetAnimationUnitGroup.m_FreeList.Count == 0)
        {
            return(new SheetAnimationUnit(actionID, SheetAnimationUnitGroup.AnimMap, material, bMirror, 1f, AttackerDirection, reverse));
        }
        SheetAnimationUnit sheetAnimationUnit = SheetAnimationUnitGroup.m_FreeList[SheetAnimationUnitGroup.m_FreeList.Count - 1];

        SheetAnimationUnitGroup.m_FreeList.RemoveAt(SheetAnimationUnitGroup.m_FreeList.Count - 1);
        sheetAnimationUnit.ResetUnit(actionID, SheetAnimationUnitGroup.AnimMap, material, bMirror, 1f, AttackerDirection, reverse);
        return(sheetAnimationUnit);
    }
    // Token: 0x06000AC9 RID: 2761 RVA: 0x000E740C File Offset: 0x000E560C
    private void addAnimUnit(byte Side, byte Kind, byte dir, bool bMirror, Vector3 localOffset, int zOrder = 0, bool AttackerDirection = false)
    {
        uint actionID = SheetAnimationUnitGroup.GetActionID(Side, Kind, dir);

        if (SheetAnimationUnitGroupNewbie.m_FreeList.Count == 0)
        {
            SheetAnimationUnit sheetAnimationUnit = new SheetAnimationUnit(actionID, SheetAnimationUnitGroupNewbie.AnimMap, SheetAnimationUnitGroupNewbie.sharedMat, bMirror, 1f, AttackerDirection, false);
            this.animUnit[this.Count] = sheetAnimationUnit;
        }
        else
        {
            this.animUnit[this.Count] = SheetAnimationUnitGroupNewbie.m_FreeList[SheetAnimationUnitGroupNewbie.m_FreeList.Count - 1];
            SheetAnimationUnitGroupNewbie.m_FreeList.RemoveAt(SheetAnimationUnitGroupNewbie.m_FreeList.Count - 1);
            this.animUnit[this.Count].ResetUnit(actionID, SheetAnimationUnitGroupNewbie.AnimMap, SheetAnimationUnitGroupNewbie.sharedMat, bMirror, 1f, AttackerDirection, false);
        }
        this.animUnit[this.Count].transform.parent = this.transform;
        localOffset.z = (float)zOrder * -0.01f;
        this.animUnit[this.Count].transform.localPosition = localOffset;
        this.animUnit[this.Count].transform.localScale    = Vector3.one;
        this.Count++;
    }
Beispiel #3
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]);
    }