チュートリアル時の兄弟非表示に対応
This commit is contained in:
parent
dafb584739
commit
ade2634303
|
|
@ -90,10 +90,12 @@ public class KitchenManager : MonoBehaviour
|
|||
gameData.ResetDailyTotalCount();
|
||||
|
||||
// 店舗レベル1達成表示
|
||||
kitchenView.SetActive(false);
|
||||
ShopLevelUp.ShowDialog(1, () =>
|
||||
{
|
||||
TutorialManager.Instance.ShowTutorialConversation(1, () =>
|
||||
{
|
||||
kitchenView.SetActive(true);
|
||||
// マスク表示
|
||||
var buttonRectTransform = cookingButton.transform as RectTransform;
|
||||
var go = TutorialManager.Instance.ShowTutorialMask(buttonRectTransform.parent, buttonRectTransform);
|
||||
|
|
@ -107,8 +109,10 @@ public class KitchenManager : MonoBehaviour
|
|||
else
|
||||
{
|
||||
// チュートリアル調理終了後
|
||||
kitchenView.SetActive(false);
|
||||
TutorialManager.Instance.ShowTutorialConversation(3, () =>
|
||||
{
|
||||
kitchenView.SetActive(true);
|
||||
var go = FindObjectOfType<FooterManager>().transform;
|
||||
go.transform.FindChildByName("Button_shop", t =>
|
||||
{
|
||||
|
|
|
|||
|
|
@ -47,9 +47,11 @@ public class MarketManager : MonoBehaviour
|
|||
// SetShopViewを使わず表示構築
|
||||
rewardButtonView.gameObject.SetActive(false);
|
||||
blueView.OpenAction();
|
||||
|
||||
|
||||
market.IsPause.Value = true;
|
||||
TutorialManager.Instance.ShowTutorialConversation(4, () =>
|
||||
{
|
||||
market.IsPause.Value = false;
|
||||
walkerMask.gameObject.SetActive(true);
|
||||
// お客さん配置
|
||||
var controller = market.SetTutorialCustomer();
|
||||
|
|
@ -81,10 +83,11 @@ public class MarketManager : MonoBehaviour
|
|||
CoinManager.Instance.ChangeCoin(gameData.Coin);
|
||||
HeartMeter.Instance.Initialize(gameData.ViewedShopLevel, gameData.Heart);
|
||||
|
||||
// ポーズ中動作指定
|
||||
market.IsPause.Subscribe(isPause =>
|
||||
{
|
||||
vipCustomerButtonView.IsPause.Value = isPause;
|
||||
// ポーズ中非表示
|
||||
vipCustomerButtonView.SetActive(isPause);
|
||||
// 兄弟非表示
|
||||
blueView.SetActive(!isPause);
|
||||
BrotherPinkView.Instance.SetActive(!isPause);
|
||||
}).AddTo(this);
|
||||
|
|
|
|||
|
|
@ -15,7 +15,8 @@ namespace MyGame.Scenes.marketing.Scripts
|
|||
[SerializeField] private GameObject vipSpeechBubbleObject;
|
||||
[SerializeField] private Transform vipStayPosTransform;
|
||||
[SerializeField] private float vipMoveSpeed;
|
||||
public readonly BoolReactiveProperty IsPause = new BoolReactiveProperty();
|
||||
private readonly BoolReactiveProperty isPause = new BoolReactiveProperty();
|
||||
|
||||
public IObservable<Unit> VipButton { get; private set; }
|
||||
private IDisposable timerDisposable;
|
||||
private IDisposable moveDisposable;
|
||||
|
|
@ -30,8 +31,8 @@ namespace MyGame.Scenes.marketing.Scripts
|
|||
VipButton = vipButton.OnClickAsObservable()
|
||||
.Merge(eventTrigger.OnPointerClickAsObservable().AsUnitObservable())
|
||||
.TakeUntilDestroy(this);
|
||||
IsPause.AddTo(this);
|
||||
IsPause.DistinctUntilChanged().Subscribe(x =>
|
||||
isPause.AddTo(this);
|
||||
isPause.DistinctUntilChanged().Subscribe(x =>
|
||||
{
|
||||
vipSpeechBubbleObject.transform.SetLocalScale(x ? 0f : 1f);
|
||||
buttonAnimator.speed = x ? 0f : 1f;
|
||||
|
|
@ -56,7 +57,7 @@ namespace MyGame.Scenes.marketing.Scripts
|
|||
.TakeWhile(_ => Vector2.Distance(vipTransform.localPosition, vipStayPosTransform.localPosition) > .01f)
|
||||
.Subscribe(_ =>
|
||||
{
|
||||
if (IsPause.Value)
|
||||
if (isPause.Value)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
@ -94,7 +95,7 @@ namespace MyGame.Scenes.marketing.Scripts
|
|||
.TakeWhile(_ => Vector2.Distance(vipTransform.localPosition, initialPos) > .01f)
|
||||
.Subscribe(_ =>
|
||||
{
|
||||
if (IsPause.Value)
|
||||
if (isPause.Value)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
@ -119,5 +120,7 @@ namespace MyGame.Scenes.marketing.Scripts
|
|||
CloseButton();
|
||||
}).AddTo(this);
|
||||
}
|
||||
|
||||
public void SetActive(bool active) => isPause.Value = active;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue