チュートリアルマスクの背景透明度を変更できるようにした/ 畑のチュートリアル修正

This commit is contained in:
kimura 2021-11-18 17:08:13 +09:00
parent b2c6dc574a
commit 45eda7c134
3 changed files with 10 additions and 0 deletions

View File

@ -178,6 +178,7 @@ MonoBehaviour:
unmask: {fileID: 4293843007976718248}
unmaskArrow: {fileID: 5618796564699367770}
unMaskImage: {fileID: 4293843007976718250}
backgroundImage: {fileID: 4293843007207798080}
arrowAnimator: {fileID: 7626766843417898212}
--- !u!223 &1057350325820014940
Canvas:

View File

@ -319,6 +319,9 @@ public class CornField : MonoBehaviour
.Take(3)
.Subscribe(_ => { }, () =>
{
// マスクの透明度変更
cornFieldMask.SetBGAlpha(0f);
cornFieldMask.SetArrowActive(false);
this.CallWaitForSeconds(4f, () =>
{
cornFieldMask.gameObject.SetActive(false);

View File

@ -9,6 +9,7 @@ namespace MyGame.Scripts
[SerializeField] private Unmask unmask;
[SerializeField] private Unmask unmaskArrow;
[SerializeField] private Image unMaskImage;
[SerializeField] private Image backgroundImage;
[SerializeField] private Animator arrowAnimator;
private static readonly int Under = Animator.StringToHash("Under");
@ -70,5 +71,10 @@ namespace MyGame.Scripts
// rt.sizeDelta = target.rect.size;
rt.anchorMax = rt.anchorMin = new Vector2(0.5f, 0.5f);
}
public void SetBGAlpha(float a)
{
backgroundImage.color = backgroundImage.color.SetA(a);
}
}
}