Platformer Pro  2.3.2
A platform game kit for Unity.
PlatformerPro.QuantizeMovementToPixels Class Reference

Class which ensures whatver is being moved is snapped to a pixel position. More...

Inheritance diagram for PlatformerPro.QuantizeMovementToPixels:

Public Attributes

int smoothingFactor = 8
 Allow sub-pixel movement in smoothingFactor increments. More...
 

Protected Member Functions

float Quantize (float position)
 Quantize the specified position to a pixel position More...
 

Protected Attributes

float orthoUnits
 Ortho size (assume camera does not zoom). More...
 
Vector3 preRenderPosition
 Store actual position so we can revert after render. More...
 
bool initialised
 Has this been initialised? More...
 

Detailed Description

Class which ensures whatver is being moved is snapped to a pixel position.

Member Function Documentation

◆ Quantize()

float PlatformerPro.QuantizeMovementToPixels.Quantize ( float  position)
protected

Quantize the specified position to a pixel position

Parameters
positionPosition.

Member Data Documentation

◆ initialised

bool PlatformerPro.QuantizeMovementToPixels.initialised
protected

Has this been initialised?

◆ orthoUnits

float PlatformerPro.QuantizeMovementToPixels.orthoUnits
protected

Ortho size (assume camera does not zoom).

◆ preRenderPosition

Vector3 PlatformerPro.QuantizeMovementToPixels.preRenderPosition
protected

Store actual position so we can revert after render.

◆ smoothingFactor

int PlatformerPro.QuantizeMovementToPixels.smoothingFactor = 8

Allow sub-pixel movement in smoothingFactor increments.


The documentation for this class was generated from the following file: