示例#1
0
 protected CullGridSetup(CullGridSetup copyFrom)
 {
     this.cellSquareDimension  = copyFrom.cellSquareDimension;
     this.cellsWide            = copyFrom.cellsWide;
     this.cellsTall            = copyFrom.cellsTall;
     this.groupBegin           = copyFrom.groupBegin;
     this.gatheringCellsWide   = copyFrom.gatheringCellsWide;
     this.gatheringCellsTall   = copyFrom.gatheringCellsTall;
     this.gatheringCellsCenter = copyFrom.gatheringCellsCenter;
     this.gatheringCellsBits   = (int[])copyFrom.gatheringCellsBits.Clone();
 }
示例#2
0
    private Vector3 GetCenterSetup(int cell)
    {
        CullGridSetup setup = this.setup;

        return((Vector3)((base.transform.position + (base.transform.forward * (((cell / setup.cellsWide) - ((((float)setup.cellsTall) / 2f) - (((float)(2 - (setup.cellsTall & 1))) / 2f))) * setup.cellSquareDimension))) + (base.transform.right * (((cell % setup.cellsWide) - ((((float)setup.cellsWide) / 2f) - (((float)(2 - (setup.cellsWide & 1))) / 2f))) * setup.cellSquareDimension))));
    }