宣伝処理修正

This commit is contained in:
kimura 2022-02-07 15:47:15 +09:00
parent eaad34dcfe
commit 4a9bcecd5a
2 changed files with 14 additions and 13 deletions

View File

@ -89,7 +89,7 @@ public class BrotherPinkView : SingletonMonoBehaviour<BrotherPinkView>
}).AddTo(this);
this.UpdateAsObservable().Subscribe(_ =>
{
if (waitMove || isMoveLocked || isPromotion)
if (waitMove || isMoveLocked)
{
return;
}
@ -108,7 +108,7 @@ public class BrotherPinkView : SingletonMonoBehaviour<BrotherPinkView>
moveIndex++;
if (moveIndex == selectedMoves.Length)
{
if (isTasting)
if (isTasting || isPromotion)
{
moveIndex = 0;
SetPinkMove();
@ -166,7 +166,6 @@ public class BrotherPinkView : SingletonMonoBehaviour<BrotherPinkView>
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<BrotherPinkView>
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()

View File

@ -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)
{