質問編集履歴
4
ReturnPlayerVarを追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -6,8 +6,92 @@
|
|
6
6
|
|
7
7
|
教えていただけると幸いです。
|
8
8
|
|
9
|
+
|
10
|
+
|
11
|
+
###ReturnPlayerVar
|
12
|
+
|
9
13
|
```C#
|
10
14
|
|
15
|
+
//ReturnPlayerVar
|
16
|
+
|
17
|
+
public Ost.Vars ReturnPlayerVar(string Pvar)
|
18
|
+
|
19
|
+
{
|
20
|
+
|
21
|
+
Ost.Vars vars;
|
22
|
+
|
23
|
+
if (Pvar == "AngleDir")
|
24
|
+
|
25
|
+
{
|
26
|
+
|
27
|
+
vars.Operation_Init();
|
28
|
+
|
29
|
+
vars = new Ost.Vars(AngleDir);
|
30
|
+
|
31
|
+
return vars;
|
32
|
+
|
33
|
+
}
|
34
|
+
|
35
|
+
if (Pvar == "Speed")
|
36
|
+
|
37
|
+
{
|
38
|
+
|
39
|
+
vars.Operation_Init();
|
40
|
+
|
41
|
+
vars = new Ost.Vars(Speed);
|
42
|
+
|
43
|
+
return vars;
|
44
|
+
|
45
|
+
}
|
46
|
+
|
47
|
+
if (Pvar == "X_Rotation")
|
48
|
+
|
49
|
+
{
|
50
|
+
|
51
|
+
vars.Operation_Init();
|
52
|
+
|
53
|
+
vars = new Ost.Vars(X_Rotation);
|
54
|
+
|
55
|
+
return vars;
|
56
|
+
|
57
|
+
}
|
58
|
+
|
59
|
+
if (Pvar == "Y_Rotation")
|
60
|
+
|
61
|
+
{
|
62
|
+
|
63
|
+
vars.Operation_Init();
|
64
|
+
|
65
|
+
vars = new Ost.Vars(Y_Rotation);
|
66
|
+
|
67
|
+
return vars;
|
68
|
+
|
69
|
+
}
|
70
|
+
|
71
|
+
if (Pvar == "PlayerTp")
|
72
|
+
|
73
|
+
{
|
74
|
+
|
75
|
+
vars.Operation_Init();
|
76
|
+
|
77
|
+
vars = new Ost.Vars(PlayerTransform.transform.position);
|
78
|
+
|
79
|
+
return vars;
|
80
|
+
|
81
|
+
}
|
82
|
+
|
83
|
+
return new Ost.Vars();
|
84
|
+
|
85
|
+
}
|
86
|
+
|
87
|
+
```
|
88
|
+
|
89
|
+
###Omit_Rpv
|
90
|
+
|
91
|
+
```C#
|
92
|
+
|
93
|
+
//Omit_Rpv
|
94
|
+
|
11
95
|
public Ost.Vars Omit_Rpv(Ost.Vars vars, string Pver, string Tag, float Omit)
|
12
96
|
|
13
97
|
{
|
@@ -66,6 +150,8 @@
|
|
66
150
|
|
67
151
|
```c#
|
68
152
|
|
153
|
+
//Ost.Vars
|
154
|
+
|
69
155
|
public struct Vars
|
70
156
|
|
71
157
|
{
|
3
メソットをメソッドと変更しました。
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
メソッ
|
1
|
+
メソッドの内容が同じで引数の型だけ変えたい
|
test
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
###メソッ
|
1
|
+
###メソッドの内容が同じで引数の型だけ変えたい
|
2
2
|
|
3
3
|
以下のプログラムを見ていただければわかると思うのですが、内容は同じでも引数の型が違うだけで
|
4
4
|
|
2
Ost.Varsのコンストラクタを記載しました
test
CHANGED
File without changes
|
test
CHANGED
@@ -61,3 +61,103 @@
|
|
61
61
|
}
|
62
62
|
|
63
63
|
```
|
64
|
+
|
65
|
+
###Ost.Varsのコンストラクタ
|
66
|
+
|
67
|
+
```c#
|
68
|
+
|
69
|
+
public struct Vars
|
70
|
+
|
71
|
+
{
|
72
|
+
|
73
|
+
public static int MemI = 0;
|
74
|
+
|
75
|
+
public static float MemF = 0;
|
76
|
+
|
77
|
+
public static string MemS = "";
|
78
|
+
|
79
|
+
public static Vector3 MemV = new Vector3(0, 0, 0);
|
80
|
+
|
81
|
+
|
82
|
+
|
83
|
+
public Vars(int InputI)
|
84
|
+
|
85
|
+
{
|
86
|
+
|
87
|
+
MemI = InputI;
|
88
|
+
|
89
|
+
}
|
90
|
+
|
91
|
+
public Vars(float InputF)
|
92
|
+
|
93
|
+
{
|
94
|
+
|
95
|
+
MemF = InputF;
|
96
|
+
|
97
|
+
}
|
98
|
+
|
99
|
+
public Vars(Vector3 InputV)
|
100
|
+
|
101
|
+
{
|
102
|
+
|
103
|
+
MemV = InputV;
|
104
|
+
|
105
|
+
}
|
106
|
+
|
107
|
+
public Vars(string InputS)
|
108
|
+
|
109
|
+
{
|
110
|
+
|
111
|
+
MemS = InputS;
|
112
|
+
|
113
|
+
}
|
114
|
+
|
115
|
+
public float GetI()
|
116
|
+
|
117
|
+
{
|
118
|
+
|
119
|
+
return MemI;
|
120
|
+
|
121
|
+
}
|
122
|
+
|
123
|
+
public float GetF()
|
124
|
+
|
125
|
+
{
|
126
|
+
|
127
|
+
return MemF;
|
128
|
+
|
129
|
+
}
|
130
|
+
|
131
|
+
public string GetS()
|
132
|
+
|
133
|
+
{
|
134
|
+
|
135
|
+
return MemS;
|
136
|
+
|
137
|
+
}
|
138
|
+
|
139
|
+
public Vector3 GetV()
|
140
|
+
|
141
|
+
{
|
142
|
+
|
143
|
+
return MemV;
|
144
|
+
|
145
|
+
}
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
public void Operation_Init() {
|
150
|
+
|
151
|
+
MemI = 0;
|
152
|
+
|
153
|
+
MemF = 0;
|
154
|
+
|
155
|
+
MemS = "";
|
156
|
+
|
157
|
+
MemV = new Vector3(0, 0, 0);
|
158
|
+
|
159
|
+
}
|
160
|
+
|
161
|
+
}
|
162
|
+
|
163
|
+
```
|
1
Ost.Vars()の引数にOmitFを入れていたのですが、正しくはOmitが入ります。誤字すみません
test
CHANGED
File without changes
|
test
CHANGED
@@ -18,7 +18,7 @@
|
|
18
18
|
|
19
19
|
vars.Operation_Init();
|
20
20
|
|
21
|
-
vars = new Ost.Vars(Omit
|
21
|
+
vars = new Ost.Vars(Omit);
|
22
22
|
|
23
23
|
return vars;
|
24
24
|
|
@@ -44,7 +44,7 @@
|
|
44
44
|
|
45
45
|
vars.Operation_Init();
|
46
46
|
|
47
|
-
vars = new Ost.Vars(Omit
|
47
|
+
vars = new Ost.Vars(Omit);
|
48
48
|
|
49
49
|
return vars;
|
50
50
|
|