バイブレーション追加
This commit is contained in:
parent
7f403566a6
commit
033f86417c
|
|
@ -134,7 +134,11 @@ public class CookingResult : MonoBehaviour
|
|||
perfectResultObject.SetActive(result == CornResult.Perfect);
|
||||
goodResultObject.SetActive(result == CornResult.Good);
|
||||
failureResultObject.SetActive(result == CornResult.Failure);
|
||||
|
||||
|
||||
if (result == CornResult.Failure)
|
||||
{
|
||||
VibrationManager.Instance.PlayVibrationDoubleStrong();
|
||||
}
|
||||
smokeEffect.SetActive(result == CornResult.Failure);
|
||||
glitterEffect.SetActive(result == CornResult.Perfect);
|
||||
|
||||
|
|
|
|||
|
|
@ -58,6 +58,7 @@ public class CornHarvester : MonoBehaviour
|
|||
var finishedList = new List<Collider2D>();
|
||||
for (int i = 0; i < cnt; i++)
|
||||
{
|
||||
VibrationManager.Instance.PlayVibrationOnce();
|
||||
var corn = Instantiate(harvestedPrefab, harvestedSpawnTransform.position, Quaternion.identity, harvestedSpawnTransform);
|
||||
corn.GetComponent<Rigidbody2D>().AddForce(new Vector2(Random.Range(-0.3f, 0.3f), -1).normalized * thrust, ForceMode2D.Impulse);
|
||||
finishedList.Add(corn.GetComponent<Collider2D>());
|
||||
|
|
|
|||
|
|
@ -139,6 +139,7 @@ public class MarketManager : MonoBehaviour
|
|||
private void GenerateCustomer(CustomerController controller)
|
||||
{
|
||||
var customerObject = new GameObject();
|
||||
customerObject.transform.parent = transform;
|
||||
customerObject.transform.localPosition = controller.transform.localPosition;
|
||||
// controllerが破棄のタイミングでこちらも破棄
|
||||
controller.OnDestroyAsObservable().Subscribe(_ =>
|
||||
|
|
@ -206,6 +207,7 @@ public class MarketManager : MonoBehaviour
|
|||
}
|
||||
controller.Tapped();
|
||||
customerAnimator.ShowTapReaction();
|
||||
VibrationManager.Instance.PlayVibrationOnce();
|
||||
}).AddTo(customerAnimator);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue