コーンマネージャ追加

This commit is contained in:
kimura 2021-07-01 18:35:05 +09:00
parent 3868a71d79
commit 8c1b82287a
2 changed files with 23 additions and 0 deletions

View File

@ -0,0 +1,20 @@
using System;
using UnityEngine;
namespace MyGame.Scenes.Main
{
public class CornManager : MonoBehaviour
{
[SerializeField] private Transform cornSpawnTarget;
[SerializeField] private Corn cornPrefab;
[SerializeField] private int cornSpawnCount = 20;
private void Start()
{
for (int i = 0; i < cornSpawnCount; i++)
{
Instantiate(cornPrefab, cornSpawnTarget);
}
}
}
}

View File

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: f16b861cdcc84ae9a3bf105ff59a1f49
timeCreated: 1625130512