This class will automatically look for sprite renderers, particle systems, tilemaps in the scene, and change their SpriteMaskInteraction settings according to the one set in the inspector Use the NoMask tag on objects you don't want automatically setup
More...
This class will automatically look for sprite renderers, particle systems, tilemaps in the scene, and change their SpriteMaskInteraction settings according to the one set in the inspector Use the NoMask tag on objects you don't want automatically setup
◆ Timescales
the possible timescales this mask can operate on
Enumerator |
---|
Scaled | |
Unscaled | |
◆ Awake()
virtual void MoreMountains.CorgiEngine.MMSpriteMask.Awake |
( |
| ) |
|
|
protectedvirtual |
On Awake we setup our objects
◆ ComputeTargetPosition()
virtual Vector3 MoreMountains.CorgiEngine.MMSpriteMask.ComputeTargetPosition |
( |
Vector3 |
newPosition | ) |
|
|
protectedvirtual |
Determines the new position of the mask
- Parameters
-
- Returns
◆ ComputeTargetScale()
virtual Vector3 MoreMountains.CorgiEngine.MMSpriteMask.ComputeTargetScale |
( |
Vector3 |
newScale | ) |
|
|
protectedvirtual |
Determines the scale of the mask
- Parameters
-
- Returns
◆ ExpandAndMoveMaskTo()
virtual void MoreMountains.CorgiEngine.MMSpriteMask.ExpandAndMoveMaskTo |
( |
Vector2 |
newPosition, |
|
|
Vector2 |
newSize, |
|
|
float |
duration, |
|
|
MMTween.MMTweenCurve |
curve |
|
) |
| |
|
virtual |
Moves the mask to a new size and position after having expanded to encompass its origin size/position and the destination's size/position
- Parameters
-
newPosition | |
newSize | |
duration | |
curve | |
◆ ExpandAndMoveMaskToCoroutine()
virtual IEnumerator MoreMountains.CorgiEngine.MMSpriteMask.ExpandAndMoveMaskToCoroutine |
( |
Vector2 |
newPosition, |
|
|
Vector2 |
newSize, |
|
|
float |
duration, |
|
|
MMTween.MMTweenCurve |
curve |
|
) |
| |
|
protectedvirtual |
A coroutine that expands the mask to cover both its current position and its destination area, then resizes itself to match the destination size
- Parameters
-
newPosition | |
newSize | |
duration | |
curve | |
- Returns
◆ MoveMaskTo()
virtual void MoreMountains.CorgiEngine.MMSpriteMask.MoveMaskTo |
( |
Vector2 |
newPosition, |
|
|
Vector2 |
newSize, |
|
|
float |
duration, |
|
|
MMTween.MMTweenCurve |
curve |
|
) |
| |
|
virtual |
Moves the mask to a new size and position for a certain duration and along a certain curve
- Parameters
-
newPosition | |
newSize | |
duration | |
curve | |
◆ MoveMaskToCoroutine()
virtual IEnumerator MoreMountains.CorgiEngine.MMSpriteMask.MoveMaskToCoroutine |
( |
Vector2 |
newPosition, |
|
|
Vector2 |
newSize, |
|
|
float |
duration, |
|
|
MMTween.MMTweenCurve |
curve |
|
) |
| |
|
protectedvirtual |
Coroutine that moves the mask
- Parameters
-
newPosition | |
newSize | |
duration | |
curve | |
- Returns
◆ OnDisable()
virtual void MoreMountains.CorgiEngine.MMSpriteMask.OnDisable |
( |
| ) |
|
|
protectedvirtual |
On disable we stop listening for events
◆ OnEnable()
virtual void MoreMountains.CorgiEngine.MMSpriteMask.OnEnable |
( |
| ) |
|
|
protectedvirtual |
On enable we start listening for events
◆ OnMMEvent()
virtual void MoreMountains.CorgiEngine.MMSpriteMask.OnMMEvent |
( |
MMSpriteMaskEvent |
spriteMaskEvent | ) |
|
|
virtual |
Catches sprite mask events
- Parameters
-
◆ SetupMaskSettingsAutomatically()
virtual void MoreMountains.CorgiEngine.MMSpriteMask.SetupMaskSettingsAutomatically |
( |
| ) |
|
|
protectedvirtual |
Looks for mask settings and updates them
◆ _initialPosition
Vector3 MoreMountains.CorgiEngine.MMSpriteMask._initialPosition |
|
protected |
◆ _initialScale
Vector3 MoreMountains.CorgiEngine.MMSpriteMask._initialScale |
|
protected |
◆ _newPosition
Vector3 MoreMountains.CorgiEngine.MMSpriteMask._newPosition |
|
protected |
◆ _newScale
Vector3 MoreMountains.CorgiEngine.MMSpriteMask._newScale |
|
protected |
◆ _targetPosition
Vector3 MoreMountains.CorgiEngine.MMSpriteMask._targetPosition |
|
protected |
◆ _targetScale
Vector3 MoreMountains.CorgiEngine.MMSpriteMask._targetScale |
|
protected |
◆ AutomaticallySetupParticleSystems
bool MoreMountains.CorgiEngine.MMSpriteMask.AutomaticallySetupParticleSystems = true |
whether or not all particle systems should be converted
◆ AutomaticallySetupSpriteRenderers
bool MoreMountains.CorgiEngine.MMSpriteMask.AutomaticallySetupSpriteRenderers = true |
whether or not all sprite renderers should be converted
◆ AutomaticallySetupTilemaps
bool MoreMountains.CorgiEngine.MMSpriteMask.AutomaticallySetupTilemaps = true |
whether or not all tilemaps should be converted
◆ CatchEvents
bool MoreMountains.CorgiEngine.MMSpriteMask.CatchEvents = true |
if this is true, this mask will move when catching a sprite mask event
◆ MaskInteraction
SpriteMaskInteraction MoreMountains.CorgiEngine.MMSpriteMask.MaskInteraction = SpriteMaskInteraction.VisibleInsideMask |
the type of interaction to apply to all renderers
◆ ScaleMultiplier
float MoreMountains.CorgiEngine.MMSpriteMask.ScaleMultiplier = 100f |
the multiplier to apply to this mask's scale
◆ Timescale
the timescale this mask operates on
◆ MaskTime
virtual float? MoreMountains.CorgiEngine.MMSpriteMask.MaskTime |
|
get |
The documentation for this class was generated from the following file: