diff --git a/popcorn/Assets/MyGame/Scenes/marketing/Scripts/BrotherPinkView.cs b/popcorn/Assets/MyGame/Scenes/marketing/Scripts/BrotherPinkView.cs index 38e0bb03..0fd71626 100644 --- a/popcorn/Assets/MyGame/Scenes/marketing/Scripts/BrotherPinkView.cs +++ b/popcorn/Assets/MyGame/Scenes/marketing/Scripts/BrotherPinkView.cs @@ -89,7 +89,7 @@ public class BrotherPinkView : SingletonMonoBehaviour }).AddTo(this); this.UpdateAsObservable().Subscribe(_ => { - if (waitMove || isMoveLocked || isPromotion) + if (waitMove || isMoveLocked) { return; } @@ -108,7 +108,7 @@ public class BrotherPinkView : SingletonMonoBehaviour moveIndex++; if (moveIndex == selectedMoves.Length) { - if (isTasting) + if (isTasting || isPromotion) { moveIndex = 0; SetPinkMove(); @@ -166,7 +166,6 @@ public class BrotherPinkView : SingletonMonoBehaviour if (animator != null) { animator.ResetTrigger(Normal); - // animator.SetTrigger(move.trigger); setTrigger.OnNext(move.trigger); } if (Vector2.Distance(wayPoint, pinkTransform.localPosition.ToVector2()) < .01f) @@ -204,23 +203,24 @@ public class BrotherPinkView : SingletonMonoBehaviour public void StartPromotion() { + moveLockDispose?.Dispose(); + isMoveLocked = false; + waitMove = false; + isPromotion = true; - animator.ResetTrigger(Normal); - animator.SetTrigger(Promotion); - Vector3 localPosition = RightPos; - localPosition += Vector3.forward * (localPosition.y + Mathf.Abs(walkSideBottomPos)); - pinkTransform.localPosition = localPosition; - pinkTransform.localRotation = Quaternion.Euler(Vector3.zero); + selectedMoves = pinkAdvertiseMoves; + SetPinkMove(); } public void StopPromotion() { - if (animator != null) + if (!isPromotion) { - animator.ResetTrigger(Promotion); + return; } - ResetMove(); isPromotion = false; + selectedMoves = pinkMoves; + SetPinkMove(); } public void StartTasting() diff --git a/popcorn/Assets/MyGame/Scenes/marketing/Scripts/MarketManager.cs b/popcorn/Assets/MyGame/Scenes/marketing/Scripts/MarketManager.cs index a30f5db8..bf6c2bd6 100644 --- a/popcorn/Assets/MyGame/Scenes/marketing/Scripts/MarketManager.cs +++ b/popcorn/Assets/MyGame/Scenes/marketing/Scripts/MarketManager.cs @@ -260,9 +260,10 @@ public class MarketManager : MonoBehaviour { if (isPromotion) { + signBoardView.SetActiveTastingBoard(false); // 宣伝ボタン表示 rewardButtonView.gameObject.SetActive(true); - signBoardView.SetActiveTastingBoard(false); + BrotherPinkView.Instance.StartPromotion(); } else if (gameData.TastingCount > 0) {