かご変化対応
This commit is contained in:
parent
c663ea59f7
commit
70ed5a22f3
|
|
@ -524,6 +524,9 @@ MonoBehaviour:
|
|||
fallTime: 0.5
|
||||
hitTime: 1.5
|
||||
hitWaitTime: 1
|
||||
level1: {fileID: 775281020594132328}
|
||||
level2: {fileID: 7545235244005095164}
|
||||
level3: {fileID: 3741799588110921262}
|
||||
--- !u!61 &6629287981537804912
|
||||
BoxCollider2D:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
@ -643,7 +646,7 @@ GameObject:
|
|||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &3831921166531092831
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
|
|||
|
|
@ -108,6 +108,7 @@ namespace MyGame.Scenes.MiniGame.Scripts
|
|||
gameData.ScrollGameLastPlayTime = DateTime.UtcNow.ToBinary();
|
||||
gameData.ScrollGameTodayPlayCount++;
|
||||
// ステージ読み込み
|
||||
stageManager.SetBeginStages(stageData.GetBeginStagePrefabs());
|
||||
ResetGame(levelPlaceList, stageData);
|
||||
menuState.Value = MenuState.Game;
|
||||
return;
|
||||
|
|
@ -119,6 +120,7 @@ namespace MyGame.Scenes.MiniGame.Scripts
|
|||
gameData.ScrollGameLastPlayTime = DateTime.UtcNow.ToBinary();
|
||||
gameData.ScrollGameTodayPlayCount++;
|
||||
// ステージ読み込み
|
||||
stageManager.SetBeginStages(stageData.GetBeginStagePrefabs());
|
||||
ResetGame(levelPlaceList, stageData);
|
||||
menuState.Value = MenuState.Game;
|
||||
});
|
||||
|
|
@ -242,6 +244,7 @@ namespace MyGame.Scenes.MiniGame.Scripts
|
|||
{
|
||||
case StageItem.Type.Item1:
|
||||
scoreCount.Value += item.Point;
|
||||
player.AddCount();
|
||||
break;
|
||||
case StageItem.Type.Obstacle:
|
||||
player.Hit();
|
||||
|
|
@ -257,6 +260,7 @@ namespace MyGame.Scenes.MiniGame.Scripts
|
|||
stageManager.ResetStage();
|
||||
player.transform.position = characterBeginPos;
|
||||
player.Stay();
|
||||
player.ResetCount();
|
||||
scoreCount.Value = 0;
|
||||
headerView.ChangeTimeCount(timeLimit);
|
||||
resultManager.Reset();
|
||||
|
|
|
|||
|
|
@ -13,6 +13,9 @@ namespace MyGame.Scenes.MiniGame.Scripts
|
|||
[SerializeField] private float fallTime = 1f;
|
||||
[SerializeField] private float hitTime = 1.5f;
|
||||
[SerializeField] private float hitWaitTime = 1f;
|
||||
[SerializeField] private GameObject level1;
|
||||
[SerializeField] private GameObject level2;
|
||||
[SerializeField] private GameObject level3;
|
||||
private Animator animator;
|
||||
private bool isJump;
|
||||
private bool isPreHit;
|
||||
|
|
@ -20,6 +23,7 @@ namespace MyGame.Scenes.MiniGame.Scripts
|
|||
private IDisposable hitDisposable;
|
||||
private Coroutine jumpCoroutine;
|
||||
private Vector3 basePos;
|
||||
private int count;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
|
|
@ -103,5 +107,18 @@ namespace MyGame.Scenes.MiniGame.Scripts
|
|||
});
|
||||
});
|
||||
}
|
||||
|
||||
public void AddCount()
|
||||
{
|
||||
count++;
|
||||
level1.SetActive(count >= 5);
|
||||
level2.SetActive(count >= 10);
|
||||
level3.SetActive(count >= 15);
|
||||
}
|
||||
|
||||
public void ResetCount()
|
||||
{
|
||||
count = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue