キッチンアニメーションに確認用処理を入れた
This commit is contained in:
parent
4712b86d67
commit
1f7f6f437c
|
|
@ -24,6 +24,23 @@ public class KitchenManager : MonoBehaviour
|
|||
CoinManager.Instance.ChangeCoin(gameData.coin);
|
||||
HeartMeter.Instance.Initialize();
|
||||
HeartMeter.Instance.SetHeart(gameData.Heart);
|
||||
|
||||
kitchenView.Initialize();
|
||||
adButton.gameObject.SetActive(false);
|
||||
kitchenView.SetNormalAnimation();
|
||||
#if UNITY_EDITOR || DEVELOPMENT_BUILD
|
||||
Observable.Timer(TimeSpan.FromSeconds(3f)).Subscribe(_ =>
|
||||
{
|
||||
adButton.gameObject.SetActive(true);
|
||||
kitchenView.SetTiredAnimation();
|
||||
}).AddTo(this);
|
||||
adButton.OnClickAsObservable().Subscribe(_ =>
|
||||
{
|
||||
// 動画視聴POP
|
||||
adButton.gameObject.SetActive(false);
|
||||
kitchenView.SetNormalAnimation();
|
||||
}).AddTo(this);
|
||||
#endif
|
||||
|
||||
SetData();
|
||||
|
||||
|
|
|
|||
|
|
@ -35,8 +35,6 @@ public class KitchenView : MonoBehaviour
|
|||
private bool isTired;
|
||||
private void Start()
|
||||
{
|
||||
moveIndex = 0;
|
||||
SetPinkMove();
|
||||
this.UpdateAsObservable().Subscribe(_ =>
|
||||
{
|
||||
if (isTired)
|
||||
|
|
@ -64,6 +62,11 @@ public class KitchenView : MonoBehaviour
|
|||
}).AddTo(this);
|
||||
}
|
||||
|
||||
public void Initialize()
|
||||
{
|
||||
moveIndex = 0;
|
||||
}
|
||||
|
||||
private void SetPinkMove()
|
||||
{
|
||||
var move = pinkMoves[moveIndex];
|
||||
|
|
@ -86,6 +89,7 @@ public class KitchenView : MonoBehaviour
|
|||
public void SetNormalAnimation()
|
||||
{
|
||||
isTired = false;
|
||||
SetPinkMove();
|
||||
blueBrotherAnimator.SetTrigger(Normal);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue