質問編集履歴
1
コードを貼りました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,3 +1,45 @@
|
|
1
1
|
バーを動かすスクリプトを書いたのですがlocalScaleでバーを動かすと両端が伸びてしまいます。
|
2
2
|
|
3
3
|
片方だけを伸ばすにはどうすればいいでしょうか?
|
4
|
+
|
5
|
+
|
6
|
+
|
7
|
+
```
|
8
|
+
|
9
|
+
public class ActionPointUIController : MonoBehaviour
|
10
|
+
|
11
|
+
{
|
12
|
+
|
13
|
+
|
14
|
+
|
15
|
+
[SerializeField]
|
16
|
+
|
17
|
+
ActionPointManager apManager;
|
18
|
+
|
19
|
+
void Start()
|
20
|
+
|
21
|
+
{
|
22
|
+
|
23
|
+
apManager.Init(15, 15, System.DateTime.Now);
|
24
|
+
|
25
|
+
apManager.UseActionPoint(10);
|
26
|
+
|
27
|
+
}
|
28
|
+
|
29
|
+
|
30
|
+
|
31
|
+
void Update()
|
32
|
+
|
33
|
+
{
|
34
|
+
|
35
|
+
|
36
|
+
|
37
|
+
hpBar.localScale = new Vector3(apManager.ActionPointRatio(), 0.5f,0.5f);
|
38
|
+
|
39
|
+
}
|
40
|
+
|
41
|
+
|
42
|
+
|
43
|
+
}
|
44
|
+
|
45
|
+
```
|