Skip to content

Commit 561e2e1

Browse files
committed
[add] 適当な種類のコマを出せるよう変更
1 parent f7ab224 commit 561e2e1

22 files changed

+1920
-112
lines changed
0 Bytes
Binary file not shown.

Assets/VectorShogi/Game.unity

Lines changed: 507 additions & 107 deletions
Large diffs are not rendered by default.

Assets/VectorShogi/ImgChanger.cs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
using System.Collections;
2+
using System.Collections.Generic;
3+
using System;
4+
using UnityEngine;
5+
using UnityEngine.UI;
6+
7+
public class ImgChanger : MonoBehaviour {
8+
public Sprite[] splites;
9+
public Image view;
10+
private int nowIndex;
11+
12+
public void ChangeSplite()
13+
{
14+
nowIndex++;
15+
nowIndex %= splites.Length;
16+
Instantiater.prefabName = $"koma{nowIndex+1}";
17+
view.sprite = splites[nowIndex];
18+
}
19+
}

Assets/VectorShogi/ImgChanger.cs.meta

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/VectorShogi/Instantiater.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
using UnityEngine;
44

55
public class Instantiater : MonoBehaviour {
6-
public GameObject prefab;
6+
public static string prefabName = "koma1";
77

88
public void DoInstantiate(Transform root)
99
{
10-
PhotonNetwork.Instantiate(prefab.name, root.position, root.rotation, 0);
10+
PhotonNetwork.Instantiate(prefabName, root.position, root.rotation, 0);
1111
}
1212
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ GameObject:
2525
- component: {fileID: 114937181511382738}
2626
- component: {fileID: 114080011679960840}
2727
m_Layer: 5
28-
m_Name: koma
28+
m_Name: koma1
2929
m_TagString: Untagged
3030
m_Icon: {fileID: 0}
3131
m_NavMeshLayer: 0
File renamed without changes.
Lines changed: 186 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,186 @@
1+
%YAML 1.1
2+
%TAG !u! tag:unity3d.com,2011:
3+
--- !u!1001 &100100000
4+
Prefab:
5+
m_ObjectHideFlags: 1
6+
serializedVersion: 2
7+
m_Modification:
8+
m_TransformParent: {fileID: 0}
9+
m_Modifications: []
10+
m_RemovedComponents: []
11+
m_ParentPrefab: {fileID: 0}
12+
m_RootGameObject: {fileID: 1154349960410258}
13+
m_IsPrefabParent: 1
14+
--- !u!1 &1154349960410258
15+
GameObject:
16+
m_ObjectHideFlags: 0
17+
m_PrefabParentObject: {fileID: 0}
18+
m_PrefabInternal: {fileID: 100100000}
19+
serializedVersion: 5
20+
m_Component:
21+
- component: {fileID: 224442996991706170}
22+
- component: {fileID: 222553891337062200}
23+
- component: {fileID: 114275864744501788}
24+
- component: {fileID: 114978313779047552}
25+
- component: {fileID: 114512258769308004}
26+
- component: {fileID: 114473833814081478}
27+
m_Layer: 5
28+
m_Name: koma2
29+
m_TagString: Untagged
30+
m_Icon: {fileID: 0}
31+
m_NavMeshLayer: 0
32+
m_StaticEditorFlags: 0
33+
m_IsActive: 1
34+
--- !u!114 &114275864744501788
35+
MonoBehaviour:
36+
m_ObjectHideFlags: 1
37+
m_PrefabParentObject: {fileID: 0}
38+
m_PrefabInternal: {fileID: 100100000}
39+
m_GameObject: {fileID: 1154349960410258}
40+
m_Enabled: 1
41+
m_EditorHideFlags: 0
42+
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
43+
m_Name:
44+
m_EditorClassIdentifier:
45+
m_Material: {fileID: 0}
46+
m_Color: {r: 0.85294116, g: 0.82941175, b: 0, a: 1}
47+
m_RaycastTarget: 1
48+
m_OnCullStateChanged:
49+
m_PersistentCalls:
50+
m_Calls: []
51+
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
52+
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
53+
m_Sprite: {fileID: 21300000, guid: 7d9077b81f2ccca4e99ffdb16fb6f9d1, type: 3}
54+
m_Type: 0
55+
m_PreserveAspect: 0
56+
m_FillCenter: 1
57+
m_FillMethod: 4
58+
m_FillAmount: 1
59+
m_FillClockwise: 1
60+
m_FillOrigin: 0
61+
--- !u!114 &114473833814081478
62+
MonoBehaviour:
63+
m_ObjectHideFlags: 1
64+
m_PrefabParentObject: {fileID: 0}
65+
m_PrefabInternal: {fileID: 100100000}
66+
m_GameObject: {fileID: 1154349960410258}
67+
m_Enabled: 1
68+
m_EditorHideFlags: 0
69+
m_Script: {fileID: 11500000, guid: 627855c7f81362d41938ffe0b1475957, type: 3}
70+
m_Name:
71+
m_EditorClassIdentifier:
72+
m_PositionModel:
73+
SynchronizeEnabled: 1
74+
TeleportEnabled: 1
75+
TeleportIfDistanceGreaterThan: 3
76+
InterpolateOption: 2
77+
InterpolateMoveTowardsSpeed: 1
78+
InterpolateLerpSpeed: 1
79+
InterpolateMoveTowardsAcceleration: 2
80+
InterpolateMoveTowardsDeceleration: 2
81+
InterpolateSpeedCurve:
82+
serializedVersion: 2
83+
m_Curve:
84+
- serializedVersion: 2
85+
time: -1
86+
value: 0
87+
inSlope: 0
88+
outSlope: Infinity
89+
tangentMode: 0
90+
- serializedVersion: 2
91+
time: 0
92+
value: 1
93+
inSlope: 0
94+
outSlope: 0
95+
tangentMode: 0
96+
- serializedVersion: 2
97+
time: 1
98+
value: 1
99+
inSlope: 0
100+
outSlope: 1
101+
tangentMode: 0
102+
- serializedVersion: 2
103+
time: 4
104+
value: 4
105+
inSlope: 1
106+
outSlope: 0
107+
tangentMode: 0
108+
m_PreInfinity: 2
109+
m_PostInfinity: 2
110+
m_RotationOrder: 4
111+
ExtrapolateOption: 0
112+
ExtrapolateSpeed: 1
113+
ExtrapolateIncludingRoundTripTime: 1
114+
ExtrapolateNumberOfStoredPositions: 1
115+
DrawErrorGizmo: 1
116+
m_RotationModel:
117+
SynchronizeEnabled: 1
118+
InterpolateOption: 1
119+
InterpolateRotateTowardsSpeed: 180
120+
InterpolateLerpSpeed: 5
121+
m_ScaleModel:
122+
SynchronizeEnabled: 0
123+
InterpolateOption: 0
124+
InterpolateMoveTowardsSpeed: 1
125+
InterpolateLerpSpeed: 0
126+
--- !u!114 &114512258769308004
127+
MonoBehaviour:
128+
m_ObjectHideFlags: 1
129+
m_PrefabParentObject: {fileID: 0}
130+
m_PrefabInternal: {fileID: 100100000}
131+
m_GameObject: {fileID: 1154349960410258}
132+
m_Enabled: 1
133+
m_EditorHideFlags: 0
134+
m_Script: {fileID: 11500000, guid: aa584fbee541324448dd18d8409c7a41, type: 3}
135+
m_Name:
136+
m_EditorClassIdentifier:
137+
ownerId: 0
138+
group: 0
139+
OwnerShipWasTransfered: 0
140+
prefixBackup: -1
141+
synchronization: 3
142+
onSerializeTransformOption: 3
143+
onSerializeRigidBodyOption: 2
144+
ownershipTransfer: 1
145+
ObservedComponents:
146+
- {fileID: 114473833814081478}
147+
ObservedComponentsFoldoutOpen: 1
148+
viewIdField: 0
149+
instantiationId: -1
150+
currentMasterID: -1
151+
isRuntimeInstantiated: 0
152+
--- !u!114 &114978313779047552
153+
MonoBehaviour:
154+
m_ObjectHideFlags: 1
155+
m_PrefabParentObject: {fileID: 0}
156+
m_PrefabInternal: {fileID: 100100000}
157+
m_GameObject: {fileID: 1154349960410258}
158+
m_Enabled: 1
159+
m_EditorHideFlags: 0
160+
m_Script: {fileID: 11500000, guid: 7623d16c13475a84e8cb4978dd825fcb, type: 3}
161+
m_Name:
162+
m_EditorClassIdentifier:
163+
--- !u!222 &222553891337062200
164+
CanvasRenderer:
165+
m_ObjectHideFlags: 1
166+
m_PrefabParentObject: {fileID: 0}
167+
m_PrefabInternal: {fileID: 100100000}
168+
m_GameObject: {fileID: 1154349960410258}
169+
--- !u!224 &224442996991706170
170+
RectTransform:
171+
m_ObjectHideFlags: 1
172+
m_PrefabParentObject: {fileID: 0}
173+
m_PrefabInternal: {fileID: 100100000}
174+
m_GameObject: {fileID: 1154349960410258}
175+
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
176+
m_LocalPosition: {x: 0, y: 0, z: 0}
177+
m_LocalScale: {x: 1, y: 1, z: 1}
178+
m_Children: []
179+
m_Father: {fileID: 0}
180+
m_RootOrder: 0
181+
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
182+
m_AnchorMin: {x: 0.5, y: 0.5}
183+
m_AnchorMax: {x: 0.5, y: 0.5}
184+
m_AnchoredPosition: {x: 0, y: 0}
185+
m_SizeDelta: {x: 50, y: 50}
186+
m_Pivot: {x: 0.5, y: 0.5}

Assets/VectorShogi/Resources/koma2.prefab.meta

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)