質問編集履歴

2

A

2017/09/19 17:13

投稿

BitCoin
BitCoin

スコア53

test CHANGED
File without changes
test CHANGED
@@ -52,15 +52,7 @@
52
52
 
53
53
  public class ScrollButton : MonoBehaviour {
54
54
 
55
- [SerializeField]
55
+
56
-
57
- private GameObject btnPref; //ボタンプレハブ
58
-
59
- //ボタン表示数
60
-
61
- const int BUTTON_COUNT = 7;
62
-
63
-
64
56
 
65
57
  public string[] DayOftheWeek = new string[60] ;
66
58
 
@@ -76,9 +68,7 @@
76
68
 
77
69
  [SerializeField]
78
70
 
79
- public RectTransform content;
71
+
80
-
81
-
82
72
 
83
73
 
84
74
 
@@ -104,25 +94,13 @@
104
94
 
105
95
  case "Sunday":
106
96
 
107
- for (int i = 6; i > 12; i++) {
97
+
108
-
109
-
110
-
111
- DayOftheWeek[i] = PlayerPrefs.GetString ("key_id"+i);
112
-
113
- }
114
98
 
115
99
  break;
116
100
 
117
101
  case "Monday":
118
102
 
119
- for (int i = 12; i > 18; i++) {
103
+
120
-
121
-
122
-
123
- DayOftheWeek[i] = PlayerPrefs.GetString ("key_id"+i);
124
-
125
- }
126
104
 
127
105
  break;
128
106
 
@@ -194,60 +172,6 @@
194
172
 
195
173
 
196
174
 
197
- for (int i = 1; i < BUTTON_COUNT; i++)
198
-
199
- {
200
-
201
- int no = i;
202
-
203
- //ボタン生成
204
-
205
- GameObject btn = (GameObject)Instantiate(btnPref);
206
-
207
- //ボタンをContentの子に設定
208
-
209
- btn.transform.SetParent(content, false);
210
-
211
- //ボタンのテキスト変更
212
-
213
- btn.GetComponentInChildren<Text>().text = no+"限";
214
-
215
-
216
-
217
-
218
-
219
-
220
-
221
- //btn.transform.Find("Text1").GetComponent<Text>().text = Listdow[i-1];
222
-
223
- Listdow.Add(PlayerPrefs.GetString("key_id1"));
224
-
225
- //Debug.Log ("ZZX"+Listdow[2]);
226
-
227
-
228
-
229
- Debug.Log ("XXXX"+DayOftheWeek[0]);
230
-
231
-
232
-
233
- Debug.Log ("XYXY"+PlayerPrefs.GetString("key_id1"));
234
-
235
- //ボタンのクリックイベント登録
236
-
237
- btn.GetComponent<Button>().onClick.AddListener(() => OnClick(no));
238
-
239
- }
240
-
241
- }
242
-
243
- public void OnClick(int no)
244
-
245
- {
246
-
247
- Debug.Log(no);
248
-
249
- }
250
-
251
175
 
252
176
 
253
177
  public void loop(){

1

A

2017/09/19 17:13

投稿

BitCoin
BitCoin

スコア53

test CHANGED
File without changes
test CHANGED
@@ -132,6 +132,12 @@
132
132
 
133
133
  break;
134
134
 
135
+
136
+
137
+
138
+
139
+ /////////////////////ここです!////////////////////////////
140
+
135
141
  case "Wednesday":
136
142
 
137
143
  Debug.Log ("XRR");
@@ -154,6 +160,10 @@
154
160
 
155
161
  break;
156
162
 
163
+
164
+
165
+ ////////////////////////////////////////////////////////////////////
166
+
157
167
  case "Thursday":
158
168
 
159
169
  Debug.Log("The color is blue");