diff --git a/Assets/Resources/Games/powerCalligraphy.prefab b/Assets/Resources/Games/powerCalligraphy.prefab
index 9c4a3a4f6..5903c9bd7 100644
--- a/Assets/Resources/Games/powerCalligraphy.prefab
+++ b/Assets/Resources/Games/powerCalligraphy.prefab
@@ -178,7 +178,7 @@ GameObject:
m_Component:
- component: {fileID: 5494236614432634850}
m_Layer: 0
- m_Name: lane_left
+ m_Name: chounin_left
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
@@ -203,7 +203,7 @@ Transform:
- {fileID: 4932600158267232276}
- {fileID: 811389557195878391}
m_Father: {fileID: 5813499711186931250}
- m_RootOrder: 4
+ m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &2662027512870423090
GameObject:
@@ -235,7 +235,7 @@ Transform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 5813499711186931250}
- m_RootOrder: 1
+ m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!212 &8901463518339414129
SpriteRenderer:
@@ -457,7 +457,7 @@ Transform:
m_Children:
- {fileID: 6170574664705447794}
m_Father: {fileID: 5813499711186931250}
- m_RootOrder: 3
+ m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &3915510414087142068
GameObject:
@@ -694,90 +694,6 @@ SpriteRenderer:
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
m_SpriteSortPoint: 0
---- !u!1 &5194267614195657795
-GameObject:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- serializedVersion: 6
- m_Component:
- - component: {fileID: 4796394527236371034}
- - component: {fileID: 1948800878456749956}
- m_Layer: 0
- m_Name: ref
- m_TagString: Untagged
- m_Icon: {fileID: 0}
- m_NavMeshLayer: 0
- m_StaticEditorFlags: 0
- m_IsActive: 0
---- !u!4 &4796394527236371034
-Transform:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 5194267614195657795}
- m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
- m_LocalPosition: {x: 0, y: 0, z: 0}
- m_LocalScale: {x: 1.4, y: 1.4, z: 1.4}
- m_ConstrainProportionsScale: 1
- m_Children: []
- m_Father: {fileID: 5813499711186931250}
- m_RootOrder: 0
- m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
---- !u!212 &1948800878456749956
-SpriteRenderer:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 5194267614195657795}
- m_Enabled: 1
- m_CastShadows: 0
- m_ReceiveShadows: 0
- m_DynamicOccludee: 1
- m_StaticShadowCaster: 0
- m_MotionVectors: 1
- m_LightProbeUsage: 1
- m_ReflectionProbeUsage: 1
- m_RayTracingMode: 0
- m_RayTraceProcedural: 0
- m_RenderingLayerMask: 1
- m_RendererPriority: 0
- m_Materials:
- - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
- m_StaticBatchInfo:
- firstSubMesh: 0
- subMeshCount: 0
- m_StaticBatchRoot: {fileID: 0}
- m_ProbeAnchor: {fileID: 0}
- m_LightProbeVolumeOverride: {fileID: 0}
- m_ScaleInLightmap: 1
- m_ReceiveGI: 1
- m_PreserveUVs: 0
- m_IgnoreNormalsForChartDetection: 0
- m_ImportantGI: 0
- m_StitchLightmapSeams: 1
- m_SelectedEditorRenderState: 0
- m_MinimumChartSize: 4
- m_AutoUVMaxDistance: 0.5
- m_AutoUVMaxAngle: 89
- m_LightmapParameters: {fileID: 0}
- m_SortingLayerID: 0
- m_SortingLayer: 0
- m_SortingOrder: -130
- m_Sprite: {fileID: 21300000, guid: 3f57d2c57796d8a46b612f13f233f5f2, type: 3}
- m_Color: {r: 1, g: 1, b: 1, a: 1}
- m_FlipX: 0
- m_FlipY: 0
- m_DrawMode: 0
- m_Size: {x: 12.8, y: 7.2}
- m_AdaptiveModeThreshold: 0.5
- m_SpriteTileMode: 0
- m_WasSpriteAssigned: 1
- m_MaskInteraction: 0
- m_SpriteSortPoint: 0
--- !u!1 &5773044947997042771
GameObject:
m_ObjectHideFlags: 0
@@ -788,7 +704,7 @@ GameObject:
m_Component:
- component: {fileID: 3764246541452426563}
m_Layer: 0
- m_Name: lane_right
+ m_Name: chounin_right
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
@@ -813,7 +729,7 @@ Transform:
- {fileID: 4817197389237060046}
- {fileID: 5912770478129762467}
m_Father: {fileID: 5813499711186931250}
- m_RootOrder: 5
+ m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &5813499711186931251
GameObject:
@@ -844,14 +760,11 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- - {fileID: 4796394527236371034}
- {fileID: 9061701609461501601}
- {fileID: 2812549213709502772}
- {fileID: 5519490823886977826}
- {fileID: 5494236614432634850}
- {fileID: 3764246541452426563}
- - {fileID: 232072382068776565}
- - {fileID: 7411263367473027593}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@@ -1304,7 +1217,7 @@ Transform:
m_Children:
- {fileID: 1672921316959716958}
m_Father: {fileID: 5813499711186931250}
- m_RootOrder: 2
+ m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!95 &5605529592165697430
Animator:
@@ -1389,72 +1302,6 @@ Transform:
m_CorrespondingSourceObject: {fileID: 7796501086445010172, guid: b823a61442457e04a9ab0c0b0d69b115, type: 3}
m_PrefabInstance: {fileID: 375912151865840809}
m_PrefabAsset: {fileID: 0}
---- !u!1001 &786059185423394549
-PrefabInstance:
- m_ObjectHideFlags: 0
- serializedVersion: 2
- m_Modification:
- m_TransformParent: {fileID: 5813499711186931250}
- m_Modifications:
- - target: {fileID: 3739061067648326235, guid: b823a61442457e04a9ab0c0b0d69b115, type: 3}
- propertyPath: m_Name
- value: chounin_1 (1)
- objectReference: {fileID: 0}
- - target: {fileID: 3739061067648326235, guid: b823a61442457e04a9ab0c0b0d69b115, type: 3}
- propertyPath: m_IsActive
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 7796501086445010172, guid: b823a61442457e04a9ab0c0b0d69b115, type: 3}
- propertyPath: m_RootOrder
- value: 7
- objectReference: {fileID: 0}
- - target: {fileID: 7796501086445010172, guid: b823a61442457e04a9ab0c0b0d69b115, type: 3}
- propertyPath: m_LocalPosition.x
- value: 5.15
- objectReference: {fileID: 0}
- - target: {fileID: 7796501086445010172, guid: b823a61442457e04a9ab0c0b0d69b115, type: 3}
- propertyPath: m_LocalPosition.y
- value: -3.94
- objectReference: {fileID: 0}
- - target: {fileID: 7796501086445010172, guid: b823a61442457e04a9ab0c0b0d69b115, type: 3}
- propertyPath: m_LocalPosition.z
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 7796501086445010172, guid: b823a61442457e04a9ab0c0b0d69b115, type: 3}
- propertyPath: m_LocalRotation.w
- value: 1
- objectReference: {fileID: 0}
- - target: {fileID: 7796501086445010172, guid: b823a61442457e04a9ab0c0b0d69b115, type: 3}
- propertyPath: m_LocalRotation.x
- value: -0
- objectReference: {fileID: 0}
- - target: {fileID: 7796501086445010172, guid: b823a61442457e04a9ab0c0b0d69b115, type: 3}
- propertyPath: m_LocalRotation.y
- value: -0
- objectReference: {fileID: 0}
- - target: {fileID: 7796501086445010172, guid: b823a61442457e04a9ab0c0b0d69b115, type: 3}
- propertyPath: m_LocalRotation.z
- value: -0
- objectReference: {fileID: 0}
- - target: {fileID: 7796501086445010172, guid: b823a61442457e04a9ab0c0b0d69b115, type: 3}
- propertyPath: m_LocalEulerAnglesHint.x
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 7796501086445010172, guid: b823a61442457e04a9ab0c0b0d69b115, type: 3}
- propertyPath: m_LocalEulerAnglesHint.y
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 7796501086445010172, guid: b823a61442457e04a9ab0c0b0d69b115, type: 3}
- propertyPath: m_LocalEulerAnglesHint.z
- value: 0
- objectReference: {fileID: 0}
- m_RemovedComponents: []
- m_SourcePrefab: {fileID: 100100000, guid: b823a61442457e04a9ab0c0b0d69b115, type: 3}
---- !u!4 &7411263367473027593 stripped
-Transform:
- m_CorrespondingSourceObject: {fileID: 7796501086445010172, guid: b823a61442457e04a9ab0c0b0d69b115, type: 3}
- m_PrefabInstance: {fileID: 786059185423394549}
- m_PrefabAsset: {fileID: 0}
--- !u!1001 &1774231440261008941
PrefabInstance:
m_ObjectHideFlags: 0
@@ -1951,72 +1798,6 @@ Transform:
m_CorrespondingSourceObject: {fileID: 7057692394596315295, guid: f4a5082f2a1388b44b2735db5345aaba, type: 3}
m_PrefabInstance: {fileID: 6243007699542190023}
m_PrefabAsset: {fileID: 0}
---- !u!1001 &7118371649413508842
-PrefabInstance:
- m_ObjectHideFlags: 0
- serializedVersion: 2
- m_Modification:
- m_TransformParent: {fileID: 5813499711186931250}
- m_Modifications:
- - target: {fileID: 1831642165937260468, guid: f4a5082f2a1388b44b2735db5345aaba, type: 3}
- propertyPath: m_Name
- value: chounin_0 (1)
- objectReference: {fileID: 0}
- - target: {fileID: 1831642165937260468, guid: f4a5082f2a1388b44b2735db5345aaba, type: 3}
- propertyPath: m_IsActive
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 7057692394596315295, guid: f4a5082f2a1388b44b2735db5345aaba, type: 3}
- propertyPath: m_RootOrder
- value: 6
- objectReference: {fileID: 0}
- - target: {fileID: 7057692394596315295, guid: f4a5082f2a1388b44b2735db5345aaba, type: 3}
- propertyPath: m_LocalPosition.x
- value: 5.15
- objectReference: {fileID: 0}
- - target: {fileID: 7057692394596315295, guid: f4a5082f2a1388b44b2735db5345aaba, type: 3}
- propertyPath: m_LocalPosition.y
- value: -1.98
- objectReference: {fileID: 0}
- - target: {fileID: 7057692394596315295, guid: f4a5082f2a1388b44b2735db5345aaba, type: 3}
- propertyPath: m_LocalPosition.z
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 7057692394596315295, guid: f4a5082f2a1388b44b2735db5345aaba, type: 3}
- propertyPath: m_LocalRotation.w
- value: 1
- objectReference: {fileID: 0}
- - target: {fileID: 7057692394596315295, guid: f4a5082f2a1388b44b2735db5345aaba, type: 3}
- propertyPath: m_LocalRotation.x
- value: -0
- objectReference: {fileID: 0}
- - target: {fileID: 7057692394596315295, guid: f4a5082f2a1388b44b2735db5345aaba, type: 3}
- propertyPath: m_LocalRotation.y
- value: -0
- objectReference: {fileID: 0}
- - target: {fileID: 7057692394596315295, guid: f4a5082f2a1388b44b2735db5345aaba, type: 3}
- propertyPath: m_LocalRotation.z
- value: -0
- objectReference: {fileID: 0}
- - target: {fileID: 7057692394596315295, guid: f4a5082f2a1388b44b2735db5345aaba, type: 3}
- propertyPath: m_LocalEulerAnglesHint.x
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 7057692394596315295, guid: f4a5082f2a1388b44b2735db5345aaba, type: 3}
- propertyPath: m_LocalEulerAnglesHint.y
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 7057692394596315295, guid: f4a5082f2a1388b44b2735db5345aaba, type: 3}
- propertyPath: m_LocalEulerAnglesHint.z
- value: 0
- objectReference: {fileID: 0}
- m_RemovedComponents: []
- m_SourcePrefab: {fileID: 100100000, guid: f4a5082f2a1388b44b2735db5345aaba, type: 3}
---- !u!4 &232072382068776565 stripped
-Transform:
- m_CorrespondingSourceObject: {fileID: 7057692394596315295, guid: f4a5082f2a1388b44b2735db5345aaba, type: 3}
- m_PrefabInstance: {fileID: 7118371649413508842}
- m_PrefabAsset: {fileID: 0}
--- !u!1001 &7453491394869416715
PrefabInstance:
m_ObjectHideFlags: 0
diff --git a/Assets/Scripts/Games/PowerCalligraphy/PowerCalligraphy.cs b/Assets/Scripts/Games/PowerCalligraphy/PowerCalligraphy.cs
index 156628e77..f796c2688 100644
--- a/Assets/Scripts/Games/PowerCalligraphy/PowerCalligraphy.cs
+++ b/Assets/Scripts/Games/PowerCalligraphy/PowerCalligraphy.cs
@@ -30,44 +30,36 @@ namespace HeavenStudio.Games.Loaders
},
new GameAction("re", "Re (レ)")
{
- preFunction = delegate {var e = eventCaller.currentEntity; PowerCalligraphy.instance.QueuePaper(e.beat, (int)PowerCalligraphy.CharacterType.re); },
function = delegate {var e = eventCaller.currentEntity; PowerCalligraphy.instance.Write(e.beat, (int)PowerCalligraphy.CharacterType.re); },
defaultLength = 8f,
},
new GameAction("comma", "Comma (、)")
{
- preFunction = delegate {var e = eventCaller.currentEntity; PowerCalligraphy.instance.QueuePaper(e.beat, (int)PowerCalligraphy.CharacterType.comma); },
function = delegate {var e = eventCaller.currentEntity; PowerCalligraphy.instance.Write(e.beat, (int)PowerCalligraphy.CharacterType.comma); },
defaultLength = 8f,
},
new GameAction("chikara", "Chikara (力)")
{
- preFunction = delegate {var e = eventCaller.currentEntity; PowerCalligraphy.instance.QueuePaper(e.beat, (int)PowerCalligraphy.CharacterType.chikara); },
function = delegate {var e = eventCaller.currentEntity; PowerCalligraphy.instance.Write(e.beat, (int)PowerCalligraphy.CharacterType.chikara); },
defaultLength = 8f,
},
new GameAction("onore", "Onore (己)")
{
- preFunction = delegate {var e = eventCaller.currentEntity; PowerCalligraphy.instance.QueuePaper(e.beat, (int)PowerCalligraphy.CharacterType.onore); },
function = delegate {var e = eventCaller.currentEntity; PowerCalligraphy.instance.Write(e.beat, (int)PowerCalligraphy.CharacterType.onore); },
defaultLength = 8f,
},
new GameAction("sun", "Sun (寸)")
{
- preFunction = delegate {var e = eventCaller.currentEntity; PowerCalligraphy.instance.QueuePaper(e.beat, (int)PowerCalligraphy.CharacterType.sun); },
function = delegate {var e = eventCaller.currentEntity; PowerCalligraphy.instance.Write(e.beat, (int)PowerCalligraphy.CharacterType.sun); },
defaultLength = 8f,
},
new GameAction("kokoro", "Kokoro (心)")
{
- preFunction = delegate {var e = eventCaller.currentEntity; PowerCalligraphy.instance.QueuePaper(e.beat, (int)PowerCalligraphy.CharacterType.kokoro); },
function = delegate {var e = eventCaller.currentEntity; PowerCalligraphy.instance.Write(e.beat, (int)PowerCalligraphy.CharacterType.kokoro); },
defaultLength = 8f,
},
new GameAction("face", "Face (つるニハ○○ムし)")
{
- preFunction = delegate {var e = eventCaller.currentEntity; PowerCalligraphy.instance.QueuePaper(e.beat,
- e["korean"] ? (int)PowerCalligraphy.CharacterType.face_kr : (int)PowerCalligraphy.CharacterType.face); },
function = delegate {var e = eventCaller.currentEntity; PowerCalligraphy.instance.Write(e.beat,
e["korean"] ? (int)PowerCalligraphy.CharacterType.face_kr : (int)PowerCalligraphy.CharacterType.face); },
parameters = new List()
@@ -87,20 +79,20 @@ namespace HeavenStudio.Games.Loaders
},
defaultLength = 0.5f,
},
- new GameAction("end", "The End")
- {
- function = delegate {PowerCalligraphy.instance.TheEnd();},
- defaultLength = 0.5f,
- },
new GameAction("chounin events", "Chounin Animations")
{
function = delegate { var e = eventCaller.currentEntity; PowerCalligraphy.instance.PlayChouninAnimation(e["type"], e["pos"]); },
parameters = new List()
{
new Param("type", PowerCalligraphy.ChouninType.Dance, "Animation", "Set the animation for Chounin to perform."),
- new Param("pos", new EntityTypes.Float(0, 12, 0), "Position", "Set the position of Chounin."),
+ new Param("pos", new EntityTypes.Float(0, 14, 0), "Position", "Set the position of Chounin."),
}
},
+ new GameAction("end", "The End")
+ {
+ function = delegate {PowerCalligraphy.instance.TheEnd();},
+ defaultLength = 0.5f,
+ },
},
new List() { "agb", "normal" }, "agbCalligraphy", "en", new List() { }
);
@@ -127,8 +119,6 @@ namespace HeavenStudio.Games
public Animator shiftAnim;
public Fude playerFude;
- public static int queuedType;
-
[Header("Variables")]
public Vector3 scrollSpeed = new Vector3();
public float chouninSpeed;
@@ -171,17 +161,7 @@ namespace HeavenStudio.Games
void Update()
{
var cond = Conductor.instance;
- if (!cond.isPlaying || cond.isPaused)
- {
- if (!cond.isPaused) queuedType = (int)CharacterType.NONE;
- return;
- }
-
- if (queuedType != (int)CharacterType.NONE)
- {
- Prepare(queuedType);
- queuedType = (int)CharacterType.NONE;
- }
+ if (!cond.isPlaying || cond.isPaused) return;
if (PlayerInput.GetIsAction(InputAction_BasicPress) && !IsExpectingInputNow(InputAction_BasicPress))
{
@@ -202,7 +182,7 @@ namespace HeavenStudio.Games
}
}
- UpdateChouninPos(chouninRate * Time.deltaTime);
+ if (isChouninMove) UpdateChouninPos(chouninRate * Time.deltaTime);
}
private void SpawnPaper(int type)
@@ -231,25 +211,12 @@ namespace HeavenStudio.Games
});
}
- public void QueuePaper(double beat, int type)
- {
- if (GameManager.instance.currentGame != "powerCalligraphy")
- {
- queuedType = type;
- }
- else if(Conductor.instance.songPositionInBeats < beat)
- {
- BeatAction.New(instance, new List(){
- new BeatAction.Action(beat-1, delegate{ Prepare(type);})
- });
- }
- }
public void Prepare(int type)
{
if (!isPrepare)
{
- SpawnPaper(type);
isPrepare = true;
+ SpawnPaper(type);
}
}
public void NextPrepare(double beat) // Prepare next paper
@@ -313,7 +280,7 @@ namespace HeavenStudio.Games
public void Bop()
{
- if (!isChouninDance) return;
+ if (chouninType != (int)ChouninType.Dance) return;
isChouninMove = true;
double beat = Conductor.instance.songPositionInBeats;
@@ -339,16 +306,15 @@ namespace HeavenStudio.Games
Idle,
}
bool isChouninMove = false;
- bool isChouninDance = false;
+ int chouninType = -1;
public void PlayChouninAnimation(int type, float pos)
{
isChouninMove = false;
- isChouninDance = false;
+ chouninType = type;
switch (type)
{
case (int)ChouninType.Dance:
isChouninMove = true;
- isChouninDance = true;
Bop();
break;
case (int)ChouninType.Bow:
@@ -380,16 +346,17 @@ namespace HeavenStudio.Games
public void ChouninMiss()
{
isChouninMove = false;
- isChouninDance = false;
double beat = Conductor.instance.songPositionInBeats;
- BeatAction.New(instance, new() {new BeatAction.Action(beat + 1.5f, delegate {isChouninDance = true;})});
+ var currentChouninType = chouninType;
+ BeatAction.New(instance, new() {new BeatAction.Action(beat + 1.5f, delegate {
+ if (chouninType == -1) chouninType = currentChouninType;
+ })});
+ chouninType = -1;
ChouninAnim("fall");
}
private void UpdateChouninPos(float pos)
{
- if (!isChouninMove) return;
-
foreach (Transform child in Chounin[0].transform) {
var childPos = child.localPosition;
var newChildY = childPos.y - pos;
diff --git a/Assets/Scripts/Games/PowerCalligraphy/Writing.cs b/Assets/Scripts/Games/PowerCalligraphy/Writing.cs
index 309972175..1561c5771 100644
--- a/Assets/Scripts/Games/PowerCalligraphy/Writing.cs
+++ b/Assets/Scripts/Games/PowerCalligraphy/Writing.cs
@@ -190,10 +190,7 @@ namespace HeavenStudio.Games.Scripts_PowerCalligraphy
private void writeMiss(PlayerActionEvent caller)
{
- if (onGoing) {
- Miss();
- game.ChouninMiss();
- }
+ if (onGoing) Miss();
}
private void Empty(PlayerActionEvent caller) { }