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 | |
◆ ComputeTargetPosition()
virtual Vector3 MoreMountains.Tools.MMSpriteMask.ComputeTargetPosition |
( |
Vector3 |
newPosition | ) |
|
|
protectedvirtual |
Determines the new position of the mask
- Parameters
-
- Returns
◆ ComputeTargetScale()
virtual Vector3 MoreMountains.Tools.MMSpriteMask.ComputeTargetScale |
( |
Vector3 |
newScale | ) |
|
|
protectedvirtual |
Determines the scale of the mask
- Parameters
-
- Returns
◆ ExpandAndMoveMaskTo()
virtual void MoreMountains.Tools.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.Tools.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.Tools.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.Tools.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.Tools.MMSpriteMask.OnDisable |
( |
| ) |
|
|
protectedvirtual |
On disable we stop listening for events
◆ OnEnable()
virtual void MoreMountains.Tools.MMSpriteMask.OnEnable |
( |
| ) |
|
|
protectedvirtual |
On enable we start listening for events
◆ OnMMEvent()
virtual void MoreMountains.Tools.MMSpriteMask.OnMMEvent |
( |
MMSpriteMaskEvent |
spriteMaskEvent | ) |
|
|
virtual |
Catches sprite mask events
- Parameters
-
◆ SetupMaskSettingsAutomatically()
virtual void MoreMountains.Tools.MMSpriteMask.SetupMaskSettingsAutomatically |
( |
| ) |
|
|
protectedvirtual |
Looks for mask settings and updates them
◆ Start()
virtual void MoreMountains.Tools.MMSpriteMask.Start |
( |
| ) |
|
|
protectedvirtual |
On Awake we setup our objects
◆ _initialPosition
Vector3 MoreMountains.Tools.MMSpriteMask._initialPosition |
|
protected |
◆ _initialScale
Vector3 MoreMountains.Tools.MMSpriteMask._initialScale |
|
protected |
◆ _newPosition
Vector3 MoreMountains.Tools.MMSpriteMask._newPosition |
|
protected |
◆ _newScale
Vector3 MoreMountains.Tools.MMSpriteMask._newScale |
|
protected |
◆ _targetPosition
Vector3 MoreMountains.Tools.MMSpriteMask._targetPosition |
|
protected |
◆ _targetScale
Vector3 MoreMountains.Tools.MMSpriteMask._targetScale |
|
protected |
◆ AutomaticallySetupParticleSystems
bool MoreMountains.Tools.MMSpriteMask.AutomaticallySetupParticleSystems = true |
whether or not all particle systems should be converted
◆ AutomaticallySetupSpriteRenderers
bool MoreMountains.Tools.MMSpriteMask.AutomaticallySetupSpriteRenderers = true |
whether or not all sprite renderers should be converted
◆ AutomaticallySetupTilemaps
bool MoreMountains.Tools.MMSpriteMask.AutomaticallySetupTilemaps = true |
whether or not all tilemaps should be converted
◆ CatchEvents
bool MoreMountains.Tools.MMSpriteMask.CatchEvents = true |
if this is true, this mask will move when catching a sprite mask event
◆ MaskInteraction
SpriteMaskInteraction MoreMountains.Tools.MMSpriteMask.MaskInteraction = SpriteMaskInteraction.VisibleInsideMask |
the type of interaction to apply to all renderers
◆ ScaleMultiplier
float MoreMountains.Tools.MMSpriteMask.ScaleMultiplier = 100f |
the scale multiplier to apply to the sprite mask
◆ Timescale
the timescale this mask operates on
◆ MaskTime
virtual float? MoreMountains.Tools.MMSpriteMask.MaskTime |
|
get |
The documentation for this class was generated from the following file:
- F:/Github/Store/TopDownEngine/Assets/TopDownEngine/Common/Scripts/Sprites/MMSpriteMask.cs