回答編集履歴
3
書式の改善
test
CHANGED
@@ -56,7 +56,7 @@
|
|
56
56
|
|
57
57
|
// ランダムでインデックスを選択
|
58
58
|
|
59
|
-
|
59
|
+
int _customerIndex = Random.Range(0, nonExistence.Count);
|
60
60
|
|
61
61
|
|
62
62
|
|
@@ -64,9 +64,9 @@
|
|
64
64
|
|
65
65
|
// キャラクターの種類を選択してインスタンス化
|
66
66
|
|
67
|
-
|
67
|
+
int _customerNum = nonExistence[_customerIndex];
|
68
68
|
|
69
|
-
|
69
|
+
GameObject obj = (GameObject) Instantiate(characters[_customerNum]);
|
70
70
|
|
71
71
|
obj.transform.parent = transform;
|
72
72
|
|
@@ -144,7 +144,7 @@
|
|
144
144
|
|
145
145
|
void LeaveStore(){
|
146
146
|
|
147
|
-
|
147
|
+
CustomerInStore _customerInStore = transform.parent.GetComponent<CustomerInStore>();
|
148
148
|
|
149
149
|
_customerInStore.AddNonExistenceList(customerNum);
|
150
150
|
|
2
修正が反映されてないため、再送信
test
CHANGED
File without changes
|
1
文法の修正
test
CHANGED
@@ -118,7 +118,9 @@
|
|
118
118
|
|
119
119
|
nextSpawnTime = Time.timeSinceLevelLoad + interval;
|
120
120
|
|
121
|
+
// リストの要素数が0より大きいときにのみ実行する
|
122
|
+
|
121
|
-
LocalInstantate();
|
123
|
+
if(0 < nonExistence.Count) LocalInstantate();
|
122
124
|
|
123
125
|
}
|
124
126
|
|