More snappy tap animation
This commit is contained in:
@@ -134,16 +134,47 @@ namespace UI.CardSystem.DragDrop
|
||||
/// </summary>
|
||||
public void SetInOpeningSlot(bool inSlot)
|
||||
{
|
||||
Debug.Log($"[BoosterPackDraggable] SetInOpeningSlot({inSlot}) called on {name}");
|
||||
|
||||
SetDraggingEnabled(!inSlot); // Disable dragging when in opening slot
|
||||
Debug.Log($"[BoosterPackDraggable] SetDraggingEnabled({!inSlot}) called");
|
||||
|
||||
canTapToOpen = inSlot; // Enable tap-to-open when in opening slot
|
||||
|
||||
if (inSlot)
|
||||
{
|
||||
_currentTapCount = 0; // Reset tap counter when placed
|
||||
|
||||
// Suppress visual effects (idle animations, glow, etc.) when in opening slot
|
||||
// But allow slot tween and tap pulse to still work
|
||||
if (Visual != null)
|
||||
{
|
||||
Visual.SuppressEffects();
|
||||
|
||||
// Play one-time placement tween to animate into slot
|
||||
// The visual will follow the parent to its slot position, then lock in place
|
||||
// Get target scale from current slot if it has scale mode
|
||||
Vector3 targetScale = Vector3.one;
|
||||
if (CurrentSlot != null && CurrentSlot.GetComponent<DraggableSlot>() != null)
|
||||
{
|
||||
// Access the slot's occupant scale if it's in Scale mode
|
||||
// For now, use Vector3.one as default
|
||||
targetScale = Vector3.one;
|
||||
}
|
||||
|
||||
Visual.PlayPlacementTween(0.3f, targetScale);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ResetOpeningState(); // Reset completely when removed
|
||||
|
||||
// Resume visual effects when removed from opening slot
|
||||
if (Visual != null)
|
||||
{
|
||||
Visual.StopPlacementTween(); // Stop any ongoing placement tween
|
||||
Visual.ResumeEffects();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Pixelplacement;
|
||||
using Pixelplacement.TweenSystem;
|
||||
using UI.DragAndDrop.Core;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
@@ -24,6 +25,10 @@ namespace UI.CardSystem.DragDrop
|
||||
|
||||
private BoosterPackDraggable _boosterDraggable;
|
||||
|
||||
// Effect tracking
|
||||
private int _glowRotationTweenId = -1;
|
||||
private float _defaultGlowRate = 10f;
|
||||
|
||||
public override void Initialize(DraggableObject parent)
|
||||
{
|
||||
base.Initialize(parent);
|
||||
@@ -58,8 +63,8 @@ namespace UI.CardSystem.DragDrop
|
||||
|
||||
protected override void UpdateVisualContent()
|
||||
{
|
||||
// Update glow rotation for visual interest
|
||||
if (glowTransform != null)
|
||||
// Update glow rotation for visual interest (skip if effects suppressed)
|
||||
if (glowTransform != null && !_effectsSuppressed)
|
||||
{
|
||||
glowTransform.Rotate(Vector3.forward * 30f * Time.deltaTime);
|
||||
}
|
||||
@@ -77,6 +82,7 @@ namespace UI.CardSystem.DragDrop
|
||||
|
||||
/// <summary>
|
||||
/// Play progressive shake animation based on tap intensity
|
||||
/// This is always allowed, even when effects are suppressed
|
||||
/// </summary>
|
||||
public void PlayShakeAnimation(int intensity, int maxIntensity)
|
||||
{
|
||||
@@ -98,17 +104,11 @@ namespace UI.CardSystem.DragDrop
|
||||
shakeDuration, 0f, Tween.EaseInBack);
|
||||
});
|
||||
|
||||
// Scale punch (gets bigger with each tap)
|
||||
float punchScale = 1f + (normalizedIntensity * 0.2f);
|
||||
Tween.LocalScale(transform, Vector3.one * punchScale,
|
||||
shakeDuration / 2f, 0f, Tween.EaseOutBack,
|
||||
completeCallback: () => {
|
||||
Tween.LocalScale(transform, Vector3.one,
|
||||
shakeDuration / 2f, 0f, Tween.EaseInBack);
|
||||
});
|
||||
// NOTE: Scale pulse is handled by BoosterPackDraggable.OnPointerUpHook()
|
||||
// We don't need a duplicate scale tween here - it would conflict!
|
||||
|
||||
// Extra glow burst on final tap
|
||||
if (intensity == maxIntensity && glowEffect != null)
|
||||
// Extra glow burst on final tap (only if effects not suppressed)
|
||||
if (intensity == maxIntensity && glowEffect != null && !_effectsSuppressed)
|
||||
{
|
||||
var emission = glowEffect.emission;
|
||||
emission.rateOverTimeMultiplier = 50f;
|
||||
@@ -155,8 +155,8 @@ namespace UI.CardSystem.DragDrop
|
||||
{
|
||||
base.OnPointerEnterVisual();
|
||||
|
||||
// Extra glow when hovering
|
||||
if (glowEffect != null)
|
||||
// Extra glow when hovering (skip if effects suppressed)
|
||||
if (glowEffect != null && !_effectsSuppressed)
|
||||
{
|
||||
var emission = glowEffect.emission;
|
||||
emission.rateOverTimeMultiplier = 20f;
|
||||
@@ -167,14 +167,141 @@ namespace UI.CardSystem.DragDrop
|
||||
{
|
||||
base.OnPointerExitVisual();
|
||||
|
||||
// Restore normal glow
|
||||
if (glowEffect != null)
|
||||
// Restore normal glow (skip if effects suppressed)
|
||||
if (glowEffect != null && !_effectsSuppressed)
|
||||
{
|
||||
var emission = glowEffect.emission;
|
||||
emission.rateOverTimeMultiplier = 10f;
|
||||
emission.rateOverTimeMultiplier = _defaultGlowRate;
|
||||
}
|
||||
}
|
||||
|
||||
#region Effect Management Overrides
|
||||
|
||||
protected override void OnEffectsSuppressed()
|
||||
{
|
||||
base.OnEffectsSuppressed();
|
||||
|
||||
// Stop glow effect
|
||||
if (glowEffect != null)
|
||||
{
|
||||
glowEffect.Stop();
|
||||
}
|
||||
|
||||
// Cancel glow rotation tween if tracked
|
||||
if (_glowRotationTweenId != -1)
|
||||
{
|
||||
Tween.Stop(_glowRotationTweenId);
|
||||
_glowRotationTweenId = -1;
|
||||
}
|
||||
|
||||
// Reset glow rotation to zero
|
||||
if (glowTransform != null)
|
||||
{
|
||||
glowTransform.localRotation = Quaternion.identity;
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnEffectsResumed()
|
||||
{
|
||||
base.OnEffectsResumed();
|
||||
|
||||
// Resume glow effect
|
||||
if (glowEffect != null && !glowEffect.isPlaying)
|
||||
{
|
||||
glowEffect.Play();
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnEffectsReset()
|
||||
{
|
||||
base.OnEffectsReset();
|
||||
|
||||
// Stop glow effect
|
||||
if (glowEffect != null)
|
||||
{
|
||||
glowEffect.Stop();
|
||||
}
|
||||
|
||||
// Reset glow rotation
|
||||
if (glowTransform != null)
|
||||
{
|
||||
glowTransform.localRotation = Quaternion.identity;
|
||||
}
|
||||
|
||||
// NOTE: Tap pulse scale is handled by BoosterPackDraggable, not here
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Event Handler Overrides (Block when in Opening Slot)
|
||||
|
||||
protected override void HandleDragStarted(DraggableObject draggable)
|
||||
{
|
||||
// Don't call base if effects are suppressed (in opening slot)
|
||||
if (_effectsSuppressed)
|
||||
return;
|
||||
|
||||
base.HandleDragStarted(draggable);
|
||||
}
|
||||
|
||||
protected override void HandleDragEnded(DraggableObject draggable)
|
||||
{
|
||||
// Don't call base if effects are suppressed (in opening slot)
|
||||
if (_effectsSuppressed)
|
||||
return;
|
||||
|
||||
base.HandleDragEnded(draggable);
|
||||
}
|
||||
|
||||
protected override void HandlePointerEnter(DraggableObject draggable)
|
||||
{
|
||||
// Don't call base if effects are suppressed (in opening slot)
|
||||
if (_effectsSuppressed)
|
||||
return;
|
||||
|
||||
base.HandlePointerEnter(draggable);
|
||||
}
|
||||
|
||||
protected override void HandlePointerExit(DraggableObject draggable)
|
||||
{
|
||||
// Don't call base if effects are suppressed (in opening slot)
|
||||
if (_effectsSuppressed)
|
||||
return;
|
||||
|
||||
base.HandlePointerExit(draggable);
|
||||
}
|
||||
|
||||
protected override void HandlePointerDown(DraggableObject draggable)
|
||||
{
|
||||
// Don't call base if effects are suppressed (in opening slot)
|
||||
// This allows the BoosterPackDraggable to handle tap pulse itself
|
||||
if (_effectsSuppressed)
|
||||
return;
|
||||
|
||||
base.HandlePointerDown(draggable);
|
||||
}
|
||||
|
||||
protected override void HandlePointerUp(DraggableObject draggable, bool longPress)
|
||||
{
|
||||
// Don't call base if effects are suppressed (in opening slot)
|
||||
// This allows the BoosterPackDraggable to handle tap pulse itself
|
||||
if (_effectsSuppressed)
|
||||
return;
|
||||
|
||||
base.HandlePointerUp(draggable, longPress);
|
||||
}
|
||||
|
||||
protected override void HandleSelection(DraggableObject draggable, bool selected)
|
||||
{
|
||||
// Don't call base if effects are suppressed (in opening slot)
|
||||
if (_effectsSuppressed)
|
||||
return;
|
||||
|
||||
base.HandleSelection(draggable, selected);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
protected override void OnDestroy()
|
||||
{
|
||||
base.OnDestroy();
|
||||
|
||||
@@ -190,13 +190,20 @@ namespace UI.DragAndDrop.Core
|
||||
if (eventData.button != PointerEventData.InputButton.Left)
|
||||
return;
|
||||
|
||||
Debug.Log($"[DraggableObject] OnBeginDrag called on {name}. _isDraggingEnabled={_isDraggingEnabled}");
|
||||
|
||||
// Check if dragging is enabled BEFORE setting any state
|
||||
if (!_isDraggingEnabled)
|
||||
{
|
||||
Debug.Log($"[DraggableObject] OnBeginDrag blocked - dragging disabled on {name}");
|
||||
return;
|
||||
}
|
||||
|
||||
_isDragging = true;
|
||||
_wasDragged = true;
|
||||
|
||||
Debug.Log($"[DraggableObject] Drag started on {name}");
|
||||
|
||||
// ...existing code...
|
||||
if (_canvas != null && _canvas.renderMode == RenderMode.ScreenSpaceOverlay && RectTransform != null)
|
||||
{
|
||||
@@ -498,7 +505,26 @@ namespace UI.DragAndDrop.Core
|
||||
/// </summary>
|
||||
public virtual void SetDraggingEnabled(bool enabled)
|
||||
{
|
||||
Debug.Log($"[DraggableObject] SetDraggingEnabled({enabled}) called on {name}. _isDragging={_isDragging}, _isDraggingEnabled={_isDraggingEnabled}");
|
||||
|
||||
_isDraggingEnabled = enabled;
|
||||
|
||||
// If disabling dragging while actively dragging, stop the drag
|
||||
if (!enabled && _isDragging)
|
||||
{
|
||||
Debug.Log($"[DraggableObject] Stopping active drag on {name}");
|
||||
_isDragging = false;
|
||||
|
||||
// Re-enable raycasting
|
||||
if (_raycaster != null)
|
||||
_raycaster.enabled = true;
|
||||
if (_imageComponent != null)
|
||||
_imageComponent.raycastTarget = true;
|
||||
if (_canvasGroup != null)
|
||||
_canvasGroup.blocksRaycasts = true;
|
||||
}
|
||||
|
||||
Debug.Log($"[DraggableObject] After SetDraggingEnabled: _isDragging={_isDragging}, _isDraggingEnabled={_isDraggingEnabled}");
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Pixelplacement;
|
||||
using Pixelplacement.TweenSystem;
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem; // Added for new Input System
|
||||
|
||||
@@ -46,9 +47,17 @@ namespace UI.DragAndDrop.Core
|
||||
protected int _savedSlotIndex;
|
||||
protected Vector3 _lastPosition;
|
||||
|
||||
// Effect tracking
|
||||
protected bool _effectsSuppressed;
|
||||
protected bool _isPlayingPlacementTween; // Tracks if a one-time placement tween is active
|
||||
protected TweenBase _placementPositionTween;
|
||||
protected TweenBase _placementScaleTween;
|
||||
protected TweenBase _activeTweenId; // Track active scale tween for cancellation
|
||||
|
||||
// Properties
|
||||
public DraggableObject ParentDraggable => _parentDraggable;
|
||||
public bool IsInitialized => _isInitialized;
|
||||
public bool EffectsSuppressed => _effectsSuppressed;
|
||||
|
||||
/// <summary>
|
||||
/// Initialize the visual with its parent draggable object
|
||||
@@ -136,11 +145,18 @@ namespace UI.DragAndDrop.Core
|
||||
{
|
||||
if (!_isInitialized || _parentDraggable == null)
|
||||
return;
|
||||
|
||||
UpdateFollowPosition();
|
||||
UpdateFollowRotation(); // Track base rotation changes
|
||||
UpdateRotation();
|
||||
UpdateTilt();
|
||||
|
||||
// Skip follow position/rotation when effects are suppressed (e.g., in opening slot)
|
||||
// UNLESS we're currently playing a placement tween (allow it to complete)
|
||||
// The visual should stay locked in place after placement tween completes
|
||||
if (!_effectsSuppressed || _isPlayingPlacementTween)
|
||||
{
|
||||
UpdateFollowPosition();
|
||||
UpdateFollowRotation(); // Track base rotation changes
|
||||
UpdateRotation();
|
||||
UpdateTilt();
|
||||
}
|
||||
|
||||
UpdateVisualContent();
|
||||
}
|
||||
|
||||
@@ -275,7 +291,10 @@ namespace UI.DragAndDrop.Core
|
||||
: _parentDraggable.GetSlotIndex();
|
||||
|
||||
// Idle animation (sine/cosine wobble with different frequencies)
|
||||
// Disabled if effects are suppressed
|
||||
float idleMultiplier = _parentDraggable.IsHovering ? 0.2f : 1f;
|
||||
idleMultiplier = _effectsSuppressed ? 0f : idleMultiplier;
|
||||
|
||||
float time = Time.time * idleAnimationSpeed + _savedSlotIndex;
|
||||
|
||||
// Use sine for X wobble, cosine for Y wobble (different phases)
|
||||
@@ -346,7 +365,10 @@ namespace UI.DragAndDrop.Core
|
||||
{
|
||||
if (useScaleAnimations)
|
||||
{
|
||||
Tween.LocalScale(transform, Vector3.one * scaleOnDrag, scaleTransitionDuration, 0f, Tween.EaseOutBack);
|
||||
if (_activeTweenId != null)
|
||||
_activeTweenId.Stop();
|
||||
|
||||
_activeTweenId = Tween.LocalScale(transform, Vector3.one * scaleOnDrag, scaleTransitionDuration, 0f, Tween.EaseOutBack);
|
||||
}
|
||||
|
||||
if (canvas != null)
|
||||
@@ -382,7 +404,11 @@ namespace UI.DragAndDrop.Core
|
||||
// Only reset scale if NOT in a slot (let slots handle their own scaling)
|
||||
if (draggable.CurrentSlot == null)
|
||||
{
|
||||
Tween.LocalScale(transform, Vector3.one, scaleTransitionDuration, 0f, Tween.EaseOutBack);
|
||||
// TODO: Fix this repetetive stuff
|
||||
if (_activeTweenId != null)
|
||||
_activeTweenId.Stop();
|
||||
|
||||
_activeTweenId = Tween.LocalScale(transform, Vector3.one, scaleTransitionDuration, 0f, Tween.EaseOutBack);
|
||||
}
|
||||
|
||||
|
||||
@@ -405,7 +431,10 @@ namespace UI.DragAndDrop.Core
|
||||
{
|
||||
if (useScaleAnimations)
|
||||
{
|
||||
Tween.LocalScale(transform, Vector3.one * scaleOnHover, scaleTransitionDuration, 0f, Tween.EaseOutBack);
|
||||
if (_activeTweenId != null)
|
||||
_activeTweenId.Stop();
|
||||
|
||||
_activeTweenId = Tween.LocalScale(transform, Vector3.one * scaleOnHover, scaleTransitionDuration, 0f, Tween.EaseOutBack);
|
||||
}
|
||||
|
||||
// Punch rotation effect
|
||||
@@ -421,7 +450,10 @@ namespace UI.DragAndDrop.Core
|
||||
{
|
||||
if (!draggable.WasDragged && useScaleAnimations)
|
||||
{
|
||||
Tween.LocalScale(transform, Vector3.one, scaleTransitionDuration, 0f, Tween.EaseOutBack);
|
||||
if (_activeTweenId != null)
|
||||
_activeTweenId.Stop();
|
||||
|
||||
_activeTweenId = Tween.LocalScale(transform, Vector3.one, scaleTransitionDuration, 0f, Tween.EaseOutBack);
|
||||
}
|
||||
|
||||
OnPointerExitVisual();
|
||||
@@ -431,7 +463,10 @@ namespace UI.DragAndDrop.Core
|
||||
{
|
||||
if (useScaleAnimations)
|
||||
{
|
||||
Tween.LocalScale(transform, Vector3.one * scaleOnDrag, scaleTransitionDuration, 0f, Tween.EaseOutBack);
|
||||
if (_activeTweenId != null)
|
||||
_activeTweenId.Stop();
|
||||
|
||||
_activeTweenId = Tween.LocalScale(transform, Vector3.one * scaleOnDrag, scaleTransitionDuration, 0f, Tween.EaseOutBack);
|
||||
}
|
||||
|
||||
OnPointerDownVisual();
|
||||
@@ -443,7 +478,10 @@ namespace UI.DragAndDrop.Core
|
||||
|
||||
if (useScaleAnimations)
|
||||
{
|
||||
Tween.LocalScale(transform, Vector3.one * targetScale, scaleTransitionDuration, 0f, Tween.EaseOutBack);
|
||||
if (_activeTweenId != null)
|
||||
_activeTweenId.Stop();
|
||||
|
||||
_activeTweenId = Tween.LocalScale(transform, Vector3.one * targetScale, scaleTransitionDuration, 0f, Tween.EaseOutBack);
|
||||
}
|
||||
|
||||
OnPointerUpVisual(longPress);
|
||||
@@ -462,7 +500,11 @@ namespace UI.DragAndDrop.Core
|
||||
if (useScaleAnimations)
|
||||
{
|
||||
float targetScale = selected ? scaleOnDrag : scaleOnHover;
|
||||
Tween.LocalScale(transform, Vector3.one * targetScale, scaleTransitionDuration, 0f, Tween.EaseOutBack);
|
||||
|
||||
if (_activeTweenId != null)
|
||||
_activeTweenId.Stop();
|
||||
|
||||
_activeTweenId = Tween.LocalScale(transform, Vector3.one * targetScale, scaleTransitionDuration, 0f, Tween.EaseOutBack);
|
||||
}
|
||||
|
||||
OnSelectionVisual(selected);
|
||||
@@ -520,6 +562,146 @@ namespace UI.DragAndDrop.Core
|
||||
|
||||
#endregion
|
||||
|
||||
#region Effect Management API
|
||||
|
||||
/// <summary>
|
||||
/// Suppress all ongoing visual effects (idle animations, glow, etc.)
|
||||
/// This does NOT affect tweens initiated externally (like slot placement).
|
||||
/// Subclasses should override this to stop their specific effects.
|
||||
/// </summary>
|
||||
public virtual void SuppressEffects()
|
||||
{
|
||||
_effectsSuppressed = true;
|
||||
|
||||
// Cancel any active scale tween we're tracking
|
||||
if (_activeTweenId != null)
|
||||
{
|
||||
_activeTweenId.Stop();
|
||||
_activeTweenId = null;
|
||||
}
|
||||
|
||||
// Cancel ALL tweens on this transform to prevent slot scale tween from conflicting
|
||||
Tween.Cancel(transform.GetInstanceID());
|
||||
|
||||
OnEffectsSuppressed();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Resume all visual effects that were suppressed
|
||||
/// </summary>
|
||||
public virtual void ResumeEffects()
|
||||
{
|
||||
_effectsSuppressed = false;
|
||||
OnEffectsResumed();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reset all visual effects to their default state
|
||||
/// </summary>
|
||||
public virtual void ResetEffects()
|
||||
{
|
||||
_effectsSuppressed = false;
|
||||
|
||||
// Cancel any active scale tween we're tracking
|
||||
if (_activeTweenId != null)
|
||||
{
|
||||
_activeTweenId.Stop();
|
||||
_activeTweenId = null;
|
||||
}
|
||||
|
||||
// Reset scale to default
|
||||
transform.localScale = Vector3.one;
|
||||
|
||||
// Reset shake parent rotation
|
||||
if (shakeParent != null)
|
||||
{
|
||||
shakeParent.localRotation = Quaternion.identity;
|
||||
}
|
||||
|
||||
// Reset tilt parent rotation
|
||||
if (tiltParent != null)
|
||||
{
|
||||
tiltParent.localRotation = Quaternion.identity;
|
||||
}
|
||||
|
||||
OnEffectsReset();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Play a one-time placement tween to move visual to target position and scale.
|
||||
/// This works even when effects are suppressed, and allows the visual to follow
|
||||
/// the parent during the tween, then locks in place after completion.
|
||||
/// </summary>
|
||||
/// <param name="duration">Duration of the tween</param>
|
||||
/// <param name="targetScale">Target scale (if null, uses current parent scale)</param>
|
||||
public virtual void PlayPlacementTween(float duration = 0.3f, Vector3? targetScale = null)
|
||||
{
|
||||
// Cancel any existing placement tweens
|
||||
StopPlacementTween();
|
||||
|
||||
_isPlayingPlacementTween = true;
|
||||
|
||||
// The position tween is handled by UpdateFollowPosition naturally
|
||||
// We just need to wait for the duration, then lock in place
|
||||
|
||||
// If target scale provided, tween the scale
|
||||
if (targetScale.HasValue)
|
||||
{
|
||||
_placementScaleTween = Tween.LocalScale(transform, targetScale.Value, duration, 0f, Tween.EaseOutBack);
|
||||
}
|
||||
|
||||
// Use a dummy tween to track completion
|
||||
_placementPositionTween = Tween.Value(0f, 1f, (val) => { }, duration, 0f, Tween.EaseOutBack,
|
||||
completeCallback: () =>
|
||||
{
|
||||
_isPlayingPlacementTween = false;
|
||||
_placementPositionTween = null;
|
||||
OnPlacementTweenComplete();
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Stop any active placement tween and immediately lock in place
|
||||
/// </summary>
|
||||
public virtual void StopPlacementTween()
|
||||
{
|
||||
if (_placementPositionTween != null)
|
||||
{
|
||||
_placementPositionTween.Stop();
|
||||
_placementPositionTween = null;
|
||||
}
|
||||
|
||||
if (_placementScaleTween != null)
|
||||
{
|
||||
_placementScaleTween.Stop();
|
||||
_placementScaleTween = null;
|
||||
}
|
||||
|
||||
_isPlayingPlacementTween = false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called when placement tween completes. Override for custom behavior.
|
||||
/// </summary>
|
||||
protected virtual void OnPlacementTweenComplete() { }
|
||||
|
||||
/// <summary>
|
||||
/// Called when effects are suppressed. Override to stop specific effects.
|
||||
/// </summary>
|
||||
protected virtual void OnEffectsSuppressed() { }
|
||||
|
||||
/// <summary>
|
||||
/// Called when effects are resumed. Override to restart specific effects.
|
||||
/// </summary>
|
||||
protected virtual void OnEffectsResumed() { }
|
||||
|
||||
/// <summary>
|
||||
/// Called when effects are reset. Override to reset specific effects.
|
||||
/// </summary>
|
||||
protected virtual void OnEffectsReset() { }
|
||||
|
||||
#endregion
|
||||
|
||||
protected virtual void OnDestroy()
|
||||
{
|
||||
UnsubscribeFromParentEvents();
|
||||
|
||||
Reference in New Issue
Block a user