質問編集履歴
1
ObjectManagar.csのコードを記載しました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -22,7 +22,7 @@
|
|
22
22
|
|
23
23
|
|
24
24
|
|
25
|
-
|
25
|
+
GameManagar.cs
|
26
26
|
|
27
27
|
```
|
28
28
|
|
@@ -314,6 +314,76 @@
|
|
314
314
|
|
315
315
|
|
316
316
|
|
317
|
+
|
318
|
+
|
319
|
+
##ObjectManagar.cs
|
320
|
+
|
321
|
+
```
|
322
|
+
|
323
|
+
using System.Collections;
|
324
|
+
|
325
|
+
using System.Collections.Generic;
|
326
|
+
|
327
|
+
using UnityEngine;
|
328
|
+
|
329
|
+
|
330
|
+
|
331
|
+
using UnityEngine.UI;
|
332
|
+
|
333
|
+
|
334
|
+
|
335
|
+
public class ObjectManager : MonoBehaviour {
|
336
|
+
|
337
|
+
|
338
|
+
|
339
|
+
public Sprite[] rankupPicture = new Sprite[3];//レベルアップ用のイラスト表示
|
340
|
+
|
341
|
+
|
342
|
+
|
343
|
+
// Start is called before the first frame update
|
344
|
+
|
345
|
+
void Start()
|
346
|
+
|
347
|
+
{
|
348
|
+
|
349
|
+
|
350
|
+
|
351
|
+
}
|
352
|
+
|
353
|
+
|
354
|
+
|
355
|
+
// Update is called once per frame
|
356
|
+
|
357
|
+
void Update()
|
358
|
+
|
359
|
+
{
|
360
|
+
|
361
|
+
|
362
|
+
|
363
|
+
}
|
364
|
+
|
365
|
+
|
366
|
+
|
367
|
+
//レベルアップ差分の絵を追加
|
368
|
+
|
369
|
+
public void SetLvupPicture (int level) {
|
370
|
+
|
371
|
+
GetComponent<Image> ().sprite = rankupPicture [level];
|
372
|
+
|
373
|
+
|
374
|
+
|
375
|
+
}
|
376
|
+
|
377
|
+
|
378
|
+
|
379
|
+
}
|
380
|
+
|
381
|
+
```
|
382
|
+
|
383
|
+
|
384
|
+
|
385
|
+
|
386
|
+
|
317
387
|
試したこと
|
318
388
|
|
319
389
|
int型でコンバートできないというエラーなので、
|