public void Show(GameObject target, Vector2 pos, Vector2 offset2) { _target = target; _offset = pos; _offset2 = offset2; this.SetScaleXY(1f, 1f); this.alpha = 1; DrawableTweener.TweenScale(this, Vector2.one, Vector2.one * 2, 400, () => { parent?.RemoveChild(this); _target = null; }); }
private void EnablePickup(FlashbackPickup pickup) { pickup.Enabled = true; DrawableTweener.TweenSpriteAlpha(pickup, 0, 1, Settings.Default_AlphaTween_Duration, () => { pickup.Blink(); }); DrawableTweener.TweenScale(pickup, Vector2.one, Vector2.one * 1.1f, Settings.Default_AlphaTween_Duration / 2, () => { DrawableTweener.TweenScale(pickup, Vector2.one * 1.1f, Vector2.one, Settings.Default_AlphaTween_Duration / 2, () => { pickup.collider.Enabled = true; }); }); }