回答編集履歴
1
headVertices、shaftVerticesの型を変更
answer
CHANGED
@@ -14,23 +14,23 @@
|
|
14
14
|
public class DirectionArrow : Graphic
|
15
15
|
{
|
16
16
|
// 矢印の原型となる頂点の位置、およびそれらを繋ぐ順番
|
17
|
-
private static readonly
|
17
|
+
private static readonly Vector2[] headVertices =
|
18
18
|
{
|
19
|
-
|
19
|
+
Vector2.up + (Vector2.left * 0.5f),
|
20
|
-
|
20
|
+
Vector2.right,
|
21
|
-
|
21
|
+
Vector2.zero,
|
22
|
-
|
22
|
+
Vector2.down + (Vector2.left * 0.5f)
|
23
23
|
};
|
24
24
|
private static readonly int[][] headIndices =
|
25
25
|
{
|
26
26
|
new[] {0, 1, 2},
|
27
27
|
new[] {3, 2, 1}
|
28
28
|
};
|
29
|
-
private static readonly
|
29
|
+
private static readonly Vector2[] shaftVertices =
|
30
30
|
{
|
31
|
-
|
31
|
+
Vector2.zero,
|
32
|
-
|
32
|
+
Vector2.up + Vector2.right,
|
33
|
-
|
33
|
+
Vector2.down + Vector2.right
|
34
34
|
};
|
35
35
|
private static readonly int[][] shaftIndices =
|
36
36
|
{
|