質問編集履歴
1
誤字がひどいので修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -38,15 +38,15 @@
|
|
38
38
|
|
39
39
|
|
40
40
|
|
41
|
-
[SerializeField] private float speed = 3f;
|
41
|
+
[SerializeField] private float speed = 3f;
|
42
42
|
|
43
|
-
public bool searchPlayer = false;
|
43
|
+
public bool searchPlayer = false;
|
44
44
|
|
45
|
-
public bool Hostile = true;
|
45
|
+
public bool Hostile = true;
|
46
46
|
|
47
|
-
public float chaseSpeed = 1;
|
47
|
+
public float chaseSpeed = 1;
|
48
48
|
|
49
|
-
public float time2 = 0;
|
49
|
+
public float time2 = 0;
|
50
50
|
|
51
51
|
|
52
52
|
|
@@ -56,7 +56,7 @@
|
|
56
56
|
|
57
57
|
startPos = this.transform.position;
|
58
58
|
|
59
|
-
target = Player.transform;
|
59
|
+
target = Player.transform;
|
60
60
|
|
61
61
|
returnPos = returm.transform;
|
62
62
|
|
@@ -112,7 +112,9 @@
|
|
112
112
|
|
113
113
|
}
|
114
114
|
|
115
|
-
|
115
|
+
}
|
116
|
+
|
117
|
+
}
|
116
118
|
|
117
119
|
else if(エネミーが特定のX座標ににきたら)
|
118
120
|
|
@@ -122,15 +124,13 @@
|
|
122
124
|
|
123
125
|
}
|
124
126
|
|
125
|
-
else
|
127
|
+
else if(searchPlayer == false)
|
126
128
|
|
127
129
|
{
|
128
130
|
|
129
131
|
突進前の座標に移動する
|
130
132
|
|
131
133
|
}
|
132
|
-
|
133
|
-
}
|
134
134
|
|
135
135
|
}
|
136
136
|
|