Marketクラスのポーズ中に販売シーンの兄弟を消す処理を追加
This commit is contained in:
parent
29173dd2f1
commit
8d267befd7
|
|
@ -9,6 +9,12 @@ public class BrotherBlueView : MonoBehaviour
|
|||
private static readonly int CleaningB = Animator.StringToHash("CleaningB");
|
||||
private static readonly int MoveSideways = Animator.StringToHash("MoveSideways");
|
||||
private static readonly int[] CloseTriggerArray = {CleaningA, CleaningB, MoveSideways};
|
||||
private Vector3 initScale;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
initScale = transform.localScale;
|
||||
}
|
||||
|
||||
public void SellAction()
|
||||
{
|
||||
|
|
@ -24,4 +30,9 @@ public class BrotherBlueView : MonoBehaviour
|
|||
{
|
||||
animator.SetTrigger(CloseTriggerArray.RandomChoose());
|
||||
}
|
||||
|
||||
public void SetActive(bool active)
|
||||
{
|
||||
transform.localScale = active ? initScale : Vector3.zero;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -263,4 +263,12 @@ public class BrotherPinkView : SingletonMonoBehaviour<BrotherPinkView>
|
|||
waitMove = false;
|
||||
SetPinkMove();
|
||||
}
|
||||
|
||||
public void SetActive(bool active)
|
||||
{
|
||||
if (animator != null)
|
||||
{
|
||||
animator.transform.localScale = active ? Vector3.one : Vector3.zero;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -81,12 +81,23 @@ public class MarketManager : MonoBehaviour
|
|||
CoinManager.Instance.ChangeCoin(gameData.Coin);
|
||||
HeartMeter.Instance.Initialize(gameData.ViewedShopLevel, gameData.Heart);
|
||||
|
||||
market.IsPause.Subscribe(isPause =>
|
||||
{
|
||||
// ポーズ中非表示
|
||||
blueView.SetActive(!isPause);
|
||||
BrotherPinkView.Instance.SetActive(!isPause);
|
||||
}).AddTo(this);
|
||||
|
||||
// ハートゲージがフルかつダイアログが開いていない場合レベルアップ
|
||||
HeartMeter.Instance.FulledHeart
|
||||
.DelaySubscription(TimeSpan.FromSeconds(.4f))
|
||||
.Subscribe(_ =>
|
||||
{
|
||||
ShopLevelUp.ShowDialog(gameData.ViewedShopLevel + 1);
|
||||
market.IsPause.Value = true;
|
||||
ShopLevelUp.ShowDialog(gameData.ViewedShopLevel + 1, () =>
|
||||
{
|
||||
market.IsPause.Value = false;
|
||||
});
|
||||
}).AddTo(this);
|
||||
|
||||
productDataList = SpreadsheetDataManager.Instance.GetBaseDataList<ProductData>(Const.ProductDataSheet);
|
||||
|
|
|
|||
Loading…
Reference in New Issue