回答編集履歴
1
誤編集
test
CHANGED
@@ -1,107 +1 @@
|
|
1
|
-
申し訳ないです改めた貼らせていただきます
|
2
|
-
|
3
|
-
継承したいコード
|
4
|
-
|
5
|
-
```using System.Collections;
|
6
|
-
|
7
|
-
using System.Collections.Generic;
|
8
|
-
|
9
|
-
using UnityEngine;
|
10
|
-
|
11
|
-
using UnityEngine.UI;
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
public class EditButton : MonoBehaviour
|
16
|
-
|
17
|
-
{
|
18
|
-
|
19
|
-
private enum Symbol
|
20
|
-
|
21
|
-
{
|
22
|
-
|
23
|
-
puls,
|
24
|
-
|
25
|
-
changeless,
|
26
|
-
|
27
|
-
minus
|
28
|
-
|
29
|
-
}
|
30
|
-
|
31
|
-
public void ButtonClick()
|
32
|
-
|
33
|
-
{
|
34
|
-
|
35
|
-
switch (transform.name)
|
36
|
-
|
37
|
-
{
|
38
|
-
|
39
|
-
case "Puls":
|
40
|
-
|
41
|
-
Symbol pFlg = Symbol.puls;
|
42
|
-
|
43
|
-
break;
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
case "Equal":
|
48
|
-
|
49
|
-
Symbol cFlg = Symbol.changeless;
|
50
|
-
|
51
|
-
break;
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
case "Minus":
|
56
|
-
|
57
|
-
Symbol mFlg = Symbol.minus;
|
58
|
-
|
59
|
-
break;
|
60
|
-
|
61
|
-
}
|
62
|
-
|
63
|
-
}
|
64
|
-
|
65
|
-
}
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
``````using System.Collections;
|
70
|
-
|
71
|
-
using System.Collections.Generic;
|
72
|
-
|
73
|
-
using UnityEngine;
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
[CreateAssetMenu(fileName = "Items", menuName = "Items/items")]
|
78
|
-
|
79
|
-
public class Item : ScriptableObject
|
80
|
-
|
81
|
-
{
|
82
|
-
|
83
|
-
[SerializeField]
|
84
|
-
|
85
|
-
private string itemName;
|
86
|
-
|
87
|
-
[SerializeField]
|
88
|
-
|
89
|
-
private Sprite itemImage;
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
private Symbol EditLog;//継承
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
public string MyItemName { get => itemName;}
|
98
|
-
|
99
|
-
public Sprite MyItemImage { get => itemImage;}
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
}
|
106
|
-
|
107
|
-
|
1
|
+
これは気にしないでください
|