回答編集履歴

8

あああああああああああああああああ

2018/09/25 14:05

投稿

flan
flan

スコア146

test CHANGED
@@ -24,7 +24,7 @@
24
24
 
25
25
  int i = 0;
26
26
 
27
-
27
+ int j=0;
28
28
 
29
29
  float[] timespan ;
30
30
 
@@ -68,9 +68,9 @@
68
68
 
69
69
  {
70
70
 
71
- x += Time.deltaTime;
71
+ timespan [j] += Time.deltaTime;
72
72
 
73
- if(x >= 10.0f) {
73
+ if(timespan [j] >= 10.0f) {
74
74
 
75
75
 
76
76
 
@@ -78,17 +78,17 @@
78
78
 
79
79
 
80
80
 
81
-
81
+ ///if j+1一回目のタップエフェクト終了時にアクション~ 回数指定することも可能・・・
82
82
 
83
83
  }
84
84
 
85
-
85
+ j++;
86
86
 
87
87
  }
88
88
 
89
89
 
90
90
 
91
-
91
+ j=0;
92
92
 
93
93
  }
94
94
 

7

a

2018/09/25 14:05

投稿

flan
flan

スコア146

test CHANGED
@@ -24,7 +24,7 @@
24
24
 
25
25
  int i = 0;
26
26
 
27
- int j =0;
27
+
28
28
 
29
29
  float[] timespan ;
30
30
 
@@ -74,19 +74,21 @@
74
74
 
75
75
 
76
76
 
77
- ///j+1回目のタップエフェクトが終わったときに何かアクションをおす。
77
+ ///タップエフェクトが終わったときに何かアクションをおす。
78
+
79
+
78
80
 
79
81
 
80
82
 
81
83
  }
82
84
 
83
- j++;
85
+
84
86
 
85
87
  }
86
88
 
87
89
 
88
90
 
89
- j = 0;
91
+
90
92
 
91
93
  }
92
94
 
@@ -170,7 +172,7 @@
170
172
 
171
173
  particle_system.Play ();
172
174
 
173
-
175
+
174
176
 
175
177
  }
176
178
 

6

aaaaaaaaaaaaaa

2018/09/25 13:58

投稿

flan
flan

スコア146

test CHANGED
@@ -64,7 +64,7 @@
64
64
 
65
65
 
66
66
 
67
- foreach(int x in timespan)
67
+ foreach(float x in timespan)
68
68
 
69
69
  {
70
70
 

5

aaaaaaaaaaaaaa

2018/09/25 13:51

投稿

flan
flan

スコア146

test CHANGED
File without changes

4

aaaaaaaaaaaaaaaaaa

2018/09/25 13:51

投稿

flan
flan

スコア146

test CHANGED
@@ -74,7 +74,7 @@
74
74
 
75
75
 
76
76
 
77
- ///j+1回目のタップエフェクトが終わったときに何かアクションをお起す。
77
+ ///j+1回目のタップエフェクトが終わったときに何かアクションをお起す。
78
78
 
79
79
 
80
80
 

3

あああああああああああ

2018/09/25 13:50

投稿

flan
flan

スコア146

test CHANGED
@@ -1,4 +1,4 @@
1
- ### 追記 
1
+ ###追記 
2
2
 
3
3
  リファレンスをぱっと見ましたがそれらしいものはなかったですね。英文をしっかり読めばあるかもしれませんが・・・
4
4
 

2

ああああああああああああああああ

2018/09/25 13:29

投稿

flan
flan

スコア146

test CHANGED
@@ -1,4 +1,4 @@
1
- ### ヘディングのテキスト追記 
1
+ ### 追記 
2
2
 
3
3
  リファレンスをぱっと見ましたがそれらしいものはなかったですね。英文をしっかり読めばあるかもしれませんが・・・
4
4
 

1

あああああああああああああ

2018/09/25 13:28

投稿

flan
flan

スコア146

test CHANGED
@@ -1,3 +1,113 @@
1
+ ### ヘディングのテキスト追記 
2
+
3
+ リファレンスをぱっと見ましたがそれらしいものはなかったですね。英文をしっかり読めばあるかもしれませんが・・・
4
+
5
+ ですので自作しました。
6
+
7
+ 考え方でわからないところがあれば聞いて下さい・・・
8
+
9
+ 因みに試していないのでコンパイルエラー吐くかもしれないです。
10
+
11
+ 特にusingあたり
12
+
13
+ ```C#
14
+
15
+ using System.Collections.Generic;
16
+
17
+ using UnityEngine;
18
+
19
+ using・・・他のクラス
20
+
21
+
22
+
23
+ public class timedeltetime_sample : MonoBehaviour {
24
+
25
+ int i = 0;
26
+
27
+ int j =0;
28
+
29
+ float[] timespan ;
30
+
31
+ // Use this for initialization
32
+
33
+ void Start () {
34
+
35
+
36
+
37
+ }
38
+
39
+
40
+
41
+ // Update is called once per frame
42
+
43
+ void Update () {
44
+
45
+ if(Input.GetMouseButtonDown(0)){
46
+
47
+ mousePos = Input.mousePosition;
48
+
49
+ pos = _camera.ScreenToWorldPoint(mousePos + _camera.transform.forward * 10);
50
+
51
+ var ma = tapEffect.main;
52
+
53
+ ma.startLifetime = 10.0f;
54
+
55
+ tapEffect.Emit (1);
56
+
57
+ timespan [i] = Time.deltaTime;
58
+
59
+ i++;
60
+
61
+ }
62
+
63
+
64
+
65
+
66
+
67
+ foreach(int x in timespan)
68
+
69
+ {
70
+
71
+ x += Time.deltaTime;
72
+
73
+ if(x >= 10.0f) {
74
+
75
+
76
+
77
+ ///j+1回目のタップエフェクトが終わったときに何かアクションをお起こす。
78
+
79
+
80
+
81
+ }
82
+
83
+ j++;
84
+
85
+ }
86
+
87
+
88
+
89
+ j = 0;
90
+
91
+ }
92
+
93
+
94
+
95
+
96
+
97
+ }
98
+
99
+
100
+
101
+ ```
102
+
103
+
104
+
105
+
106
+
107
+
108
+
109
+
110
+
1
111
  提示されたコードの中身は把握していませんが
2
112
 
3
113