Example #1
0
        public void Preparse(int[] rlok)
        {
            DB_RLOK = rlok;
            FinishParse();
            Damaged = new BlockShapeDetails[4];
            BlockShapeDetails prev = this;

            Damaged[0] = this;
            for (int i = 1; i < Damaged.Length; i++)
            {
                Damaged[i]            = (BlockShapeDetails)prev.MemberwiseClone();
                Damaged[i].DamageMode = (BlockDamage)i;
                Damaged[i].Damage();
                Damaged[i].FinishParse();
                prev = Damaged[i];
            }
        }
Example #2
0
        public void Preparse(int[] rlok)
        {
            DB_RLOK = rlok;
            for (int i = 0; i < 64; i++)
            {
                BSSD.Verts[i] = GetVertices(Vector3.Zero, (i & 1) == 1, (i & 2) == 2, (i & 4) == 4, (i & 8) == 8, (i & 16) == 16, (i & 32) == 32);
                BSSD.Norms[i] = GetNormals(Vector3.Zero, (i & 1) == 1, (i & 2) == 2, (i & 4) == 4, (i & 8) == 8, (i & 16) == 16, (i & 32) == 32);
                BSSD.TCrds[i] = GetTCoords(Vector3.Zero, Material.DEBUG, (i & 1) == 1, (i & 2) == 2, (i & 4) == 4, (i & 8) == 8, (i & 16) == 16, (i & 32) == 32).ToArray();
            }
            FinishParse();
            Damaged = new BlockShapeDetails[4];
            BlockShapeDetails prev = this;

            Damaged[0] = this;
            for (int i = 1; i < Damaged.Length; i++)
            {
                Damaged[i]            = (BlockShapeDetails)prev.MemberwiseClone();
                Damaged[i].DamageMode = (BlockDamage)i;
                Damaged[i].Damage();
                Damaged[i].FinishParse();
                prev = Damaged[i];
            }
        }