店舗情報.記録POPシーン情報追加/ prefab化
This commit is contained in:
parent
1730d148e5
commit
df78423906
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: a902d8212546c4a6a89b58a1fdf47d3b
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: b9106333bdbe2421486d8af844a9b8cb
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
using System;
|
||||
using UniRx;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class Information : MonoBehaviour
|
||||
{
|
||||
private static readonly int OpenTrigger = Animator.StringToHash("OpenTrigger");
|
||||
private static readonly int CloseTrigger = Animator.StringToHash("CloseTrigger");
|
||||
|
||||
[SerializeField] private Animator backgroundAnimator;
|
||||
[SerializeField] private Button closeButton;
|
||||
|
||||
[SerializeField] private GameObject shopInfoEnabled;
|
||||
[SerializeField] private GameObject recordEnabled;
|
||||
[SerializeField] private Button shopInfoButton;
|
||||
[SerializeField] private Button recordButton;
|
||||
|
||||
[SerializeField] private GameObject shopInfoObject;
|
||||
[SerializeField] private GameObject recordObject;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
closeButton.OnClickAsObservable().Subscribe(_ =>
|
||||
{
|
||||
transform.SetLocalScale(0);
|
||||
backgroundAnimator.SetTrigger(CloseTrigger);
|
||||
this.CallWaitForSeconds(.25f, () =>
|
||||
{
|
||||
TransitionManager.Instance.UnloadScene(GameScenes.Information);
|
||||
});
|
||||
}).AddTo(this);
|
||||
shopInfoButton.OnClickAsObservable().Select(_ => true)
|
||||
.Merge(recordButton.OnClickAsObservable().Select(_ => false))
|
||||
.Subscribe( isShopInfo =>
|
||||
{
|
||||
shopInfoButton.gameObject.SetActive(!isShopInfo);
|
||||
shopInfoEnabled.SetActive(isShopInfo);
|
||||
shopInfoObject.SetActive(isShopInfo);
|
||||
recordButton.gameObject.SetActive(isShopInfo);
|
||||
recordEnabled.SetActive(!isShopInfo);
|
||||
recordObject.SetActive(!isShopInfo);
|
||||
}).AddTo(this);
|
||||
shopInfoButton.onClick.Invoke();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 9865c80917814eff864670c3279bb85a
|
||||
timeCreated: 1634206724
|
||||
|
|
@ -20,6 +20,7 @@ public class HeaderManager : MonoBehaviour
|
|||
});
|
||||
informationButton.OnClickAsObservable().ThrottleFirst(TimeSpan.FromSeconds(1f)).Subscribe(_ =>
|
||||
{
|
||||
TransitionManager.Instance.LoadSceneAdditive(GameScenes.Information);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ public enum GameScenes
|
|||
BulkOrderTelephone,
|
||||
StoreLevel,
|
||||
Conversation,
|
||||
Information,
|
||||
SettingsDialog,
|
||||
DebugOption,
|
||||
UnableWatchVideoDialog,
|
||||
|
|
|
|||
|
|
@ -77,4 +77,7 @@ EditorBuildSettings:
|
|||
- enabled: 1
|
||||
path: Assets/MyGame/Scenes/marketing/Conversation.unity
|
||||
guid: 92908ec648b4a114c80cb309941b14f4
|
||||
- enabled: 1
|
||||
path: Assets/MyGame/Scenes/Main/Information.unity
|
||||
guid: 492d370a1a11f7e4ba2860fa98a0addb
|
||||
m_configObjects: {}
|
||||
|
|
|
|||
Loading…
Reference in New Issue