private void ChangeRot() { var idxCurr = ROTS.IndexOf(Normal); for (int i = 1; i < ROTS.Length; i++) { var idxTest = (idxCurr + i) % ROTS.Length; if (GDOwner.CanInsertPortalStub(Position, Length, ROTS[idxTest], this) != null) { Normal = ROTS[idxTest]; return; } } }
private void ChangeLen() { float nextlen = (GDConstants.TILE_WIDTH / 2f) * (FloatMath.Round(Length / (GDConstants.TILE_WIDTH / 2f)) + 1); if (nextlen > GDConstants.TILE_WIDTH * 4) { nextlen = (GDConstants.TILE_WIDTH / 2f); } if (GDOwner.CanInsertPortalStub(Position, nextlen, Normal, this) != null) { Length = nextlen; } else { Length = (GDConstants.TILE_WIDTH / 2f); } }