mirror of
https://github.com/RHeavenStudioPlus/HeavenStudioPlus.git
synced 2024-11-09 19:25:10 +00:00
More space soccer crap, like fixing some animations
This commit is contained in:
parent
19ec176092
commit
b79535168b
19 changed files with 324 additions and 117 deletions
|
@ -17667,6 +17667,7 @@ MonoBehaviour:
|
|||
- {fileID: -3530312539838775474, guid: 868cd67f05ca7c646bae00fcc2ba7eaa, type: 3}
|
||||
- {fileID: 8671423413994339737, guid: 868cd67f05ca7c646bae00fcc2ba7eaa, type: 3}
|
||||
- {fileID: -6341196331951941137, guid: 868cd67f05ca7c646bae00fcc2ba7eaa, type: 3}
|
||||
- {fileID: -6283416824598814145, guid: 868cd67f05ca7c646bae00fcc2ba7eaa, type: 3}
|
||||
BarrelSprites:
|
||||
- {fileID: 6524922379630696755, guid: 868cd67f05ca7c646bae00fcc2ba7eaa, type: 3}
|
||||
- {fileID: 1156572009758090512, guid: 868cd67f05ca7c646bae00fcc2ba7eaa, type: 3}
|
||||
|
|
BIN
Assets/Resources/Music/aids.ogg
Normal file
BIN
Assets/Resources/Music/aids.ogg
Normal file
Binary file not shown.
22
Assets/Resources/Music/aids.ogg.meta
Normal file
22
Assets/Resources/Music/aids.ogg.meta
Normal file
|
@ -0,0 +1,22 @@
|
|||
fileFormatVersion: 2
|
||||
guid: f2b3061e6e227594f84e1cc5865e6812
|
||||
AudioImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 6
|
||||
defaultSettings:
|
||||
loadType: 0
|
||||
sampleRateSetting: 0
|
||||
sampleRateOverride: 44100
|
||||
compressionFormat: 1
|
||||
quality: 1
|
||||
conversionMode: 0
|
||||
platformSettingOverrides: {}
|
||||
forceToMono: 0
|
||||
normalize: 1
|
||||
preloadAudioData: 1
|
||||
loadInBackground: 0
|
||||
ambisonic: 0
|
||||
3D: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
22
Assets/Resources/Sfx/games/karateman/tacobell.ogg.meta
Normal file
22
Assets/Resources/Sfx/games/karateman/tacobell.ogg.meta
Normal file
|
@ -0,0 +1,22 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 9a14d75a07f004e43b614c917e0ec699
|
||||
AudioImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 6
|
||||
defaultSettings:
|
||||
loadType: 0
|
||||
sampleRateSetting: 0
|
||||
sampleRateOverride: 44100
|
||||
compressionFormat: 1
|
||||
quality: 1
|
||||
conversionMode: 0
|
||||
platformSettingOverrides: {}
|
||||
forceToMono: 0
|
||||
normalize: 1
|
||||
preloadAudioData: 1
|
||||
loadInBackground: 0
|
||||
ambisonic: 0
|
||||
3D: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -212,6 +212,9 @@ TextureImporter:
|
|||
- first:
|
||||
213: 7115452968192417703
|
||||
second: karateman_num_grr
|
||||
- first:
|
||||
213: -6283416824598814145
|
||||
second: karateman_tacobell
|
||||
externalObjects: {}
|
||||
serializedVersion: 11
|
||||
mipmaps:
|
||||
|
@ -1824,6 +1827,27 @@ TextureImporter:
|
|||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: karateman_tacobell
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 3496
|
||||
y: 1932
|
||||
width: 280
|
||||
height: 280
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: 0
|
||||
bones: []
|
||||
spriteID: f32231260b1dcc8a0800000000000000
|
||||
internalID: -6283416824598814145
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
|
|
|
@ -259,20 +259,6 @@ AnimationClip:
|
|||
value: {fileID: 21300000, guid: 1fe4261905c3db044bae2465796e755d, type: 3}
|
||||
- time: 0.26666668
|
||||
value: {fileID: 21300000, guid: 919e28b312e63da4aa2eaa0362a456e7, type: 3}
|
||||
- time: 0.28333333
|
||||
value: {fileID: 21300000, guid: 2b5456868cbde2641b88b335d89e57db, type: 3}
|
||||
- time: 0.3
|
||||
value: {fileID: 21300000, guid: 173589b13bcf3a548b3dbab0ec8afef8, type: 3}
|
||||
- time: 0.31666666
|
||||
value: {fileID: 21300000, guid: b5c6bb0e9ae54444eb18629ef876e160, type: 3}
|
||||
- time: 0.33333334
|
||||
value: {fileID: 21300000, guid: 23912ac2b6744f84297edd6d0e1aea51, type: 3}
|
||||
- time: 0.35
|
||||
value: {fileID: 21300000, guid: b0bb051290046d8419dc4fd2f13d5f2f, type: 3}
|
||||
- time: 0.36666667
|
||||
value: {fileID: 21300000, guid: c3d92d250892df44583a48c37e158f46, type: 3}
|
||||
- time: 0.38333333
|
||||
value: {fileID: 21300000, guid: 13c2f5dd43b1d2b45a477b38df2d9e6d, type: 3}
|
||||
attribute: m_Sprite
|
||||
path: Square (3)
|
||||
classID: 212
|
||||
|
@ -382,13 +368,6 @@ AnimationClip:
|
|||
- {fileID: 21300000, guid: 061c7ba18db217d4caa2b997934e8e5f, type: 3}
|
||||
- {fileID: 21300000, guid: 1fe4261905c3db044bae2465796e755d, type: 3}
|
||||
- {fileID: 21300000, guid: 919e28b312e63da4aa2eaa0362a456e7, type: 3}
|
||||
- {fileID: 21300000, guid: 2b5456868cbde2641b88b335d89e57db, type: 3}
|
||||
- {fileID: 21300000, guid: 173589b13bcf3a548b3dbab0ec8afef8, type: 3}
|
||||
- {fileID: 21300000, guid: b5c6bb0e9ae54444eb18629ef876e160, type: 3}
|
||||
- {fileID: 21300000, guid: 23912ac2b6744f84297edd6d0e1aea51, type: 3}
|
||||
- {fileID: 21300000, guid: b0bb051290046d8419dc4fd2f13d5f2f, type: 3}
|
||||
- {fileID: 21300000, guid: c3d92d250892df44583a48c37e158f46, type: 3}
|
||||
- {fileID: 21300000, guid: 13c2f5dd43b1d2b45a477b38df2d9e6d, type: 3}
|
||||
- {fileID: 434938072123433104, guid: ed47c3fa4e916ff478c0f1b6fb057aa4, type: 3}
|
||||
- {fileID: 4331073688640613404, guid: ed47c3fa4e916ff478c0f1b6fb057aa4, type: 3}
|
||||
- {fileID: 569701050227369887, guid: ed47c3fa4e916ff478c0f1b6fb057aa4, type: 3}
|
||||
|
@ -398,7 +377,7 @@ AnimationClip:
|
|||
m_AdditiveReferencePoseClip: {fileID: 0}
|
||||
m_AdditiveReferencePoseTime: 0
|
||||
m_StartTime: 0
|
||||
m_StopTime: 0.4
|
||||
m_StopTime: 0.28333336
|
||||
m_OrientationOffsetY: 0
|
||||
m_Level: 0
|
||||
m_CycleOffset: 0
|
||||
|
|
|
@ -241,10 +241,6 @@ AnimationClip:
|
|||
value: {fileID: 21300000, guid: 5f2ae6b9b25e45c468fea9b30b311122, type: 3}
|
||||
- time: 0.26666668
|
||||
value: {fileID: 21300000, guid: 000f8ff15f9083a4886ceb8f7d67ce23, type: 3}
|
||||
- time: 0.28333333
|
||||
value: {fileID: 21300000, guid: ce1d7ec314cf6544c87cebb1683597ba, type: 3}
|
||||
- time: 0.3
|
||||
value: {fileID: 21300000, guid: 5625d0e9805faac4b9dd09758cd48170, type: 3}
|
||||
attribute: m_Sprite
|
||||
path: Square (3)
|
||||
classID: 212
|
||||
|
@ -368,8 +364,6 @@ AnimationClip:
|
|||
- {fileID: 21300000, guid: 8ae4bb3e4cce9804686b0e0756f52cbc, type: 3}
|
||||
- {fileID: 21300000, guid: 5f2ae6b9b25e45c468fea9b30b311122, type: 3}
|
||||
- {fileID: 21300000, guid: 000f8ff15f9083a4886ceb8f7d67ce23, type: 3}
|
||||
- {fileID: 21300000, guid: ce1d7ec314cf6544c87cebb1683597ba, type: 3}
|
||||
- {fileID: 21300000, guid: 5625d0e9805faac4b9dd09758cd48170, type: 3}
|
||||
- {fileID: -4756013695868691969, guid: ed47c3fa4e916ff478c0f1b6fb057aa4, type: 3}
|
||||
- {fileID: -4339478730206458095, guid: ed47c3fa4e916ff478c0f1b6fb057aa4, type: 3}
|
||||
- {fileID: 2914744087563887584, guid: ed47c3fa4e916ff478c0f1b6fb057aa4, type: 3}
|
||||
|
@ -383,7 +377,7 @@ AnimationClip:
|
|||
m_AdditiveReferencePoseClip: {fileID: 0}
|
||||
m_AdditiveReferencePoseTime: 0
|
||||
m_StartTime: 0
|
||||
m_StopTime: 0.3166667
|
||||
m_StopTime: 0.28333336
|
||||
m_OrientationOffsetY: 0
|
||||
m_Level: 0
|
||||
m_CycleOffset: 0
|
||||
|
|
|
@ -5977,7 +5977,7 @@ MonoBehaviour:
|
|||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0.7455157, g: 0.4481132, b: 1, a: 1}
|
||||
m_Color: {r: 0.7411765, g: 0.54901963, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
|
@ -7843,7 +7843,7 @@ MonoBehaviour:
|
|||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0.4470588, g: 0.60128987, b: 1, a: 1}
|
||||
m_Color: {r: 1, g: 0.84705883, b: 0, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
|
|
|
@ -44,7 +44,7 @@ namespace RhythmHeavenMania
|
|||
|
||||
private void Awake()
|
||||
{
|
||||
// autoplay = true;
|
||||
autoplay = true;
|
||||
instance = this;
|
||||
}
|
||||
|
||||
|
|
|
@ -255,7 +255,7 @@ namespace RhythmHeavenMania.Games.KarateMan
|
|||
}
|
||||
else
|
||||
{
|
||||
if (p.type == 2 || p.type == 3 || p.type == 4)
|
||||
if (p.type == 2 || p.type == 3 || p.type == 4 || p.type == 6)
|
||||
{
|
||||
punchLeft = false;
|
||||
}
|
||||
|
|
|
@ -133,6 +133,10 @@ namespace RhythmHeavenMania.Games.KarateMan
|
|||
new MultiSound.Sound("karateman/punchKick4", beat + 2.25f)
|
||||
});
|
||||
break;
|
||||
case 6:
|
||||
outSnd = "karateman/objectOut";
|
||||
p.hitSnd = "karateman/tacobell";
|
||||
break;
|
||||
}
|
||||
|
||||
p.endShadowThrowPos = new Vector2(-1.036f, -2.822f);
|
||||
|
|
|
@ -7,7 +7,7 @@ using RhythmHeavenMania.Util;
|
|||
|
||||
namespace RhythmHeavenMania.Games.SpaceSoccer
|
||||
{
|
||||
public class Ball : PlayerActionObject
|
||||
public class Ball : MonoBehaviour
|
||||
{
|
||||
[Header("Components")]
|
||||
[SerializeField] private Kicker kicker;
|
||||
|
@ -25,36 +25,27 @@ namespace RhythmHeavenMania.Games.SpaceSoccer
|
|||
public int hitTimes;
|
||||
private float lastSpriteRot;
|
||||
public bool canKick;
|
||||
private GameEvent kicked = new GameEvent();
|
||||
private GameEvent highKicked = new GameEvent();
|
||||
private GameEvent toe = new GameEvent();
|
||||
private bool kickPrepare = false;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
PlayerActionInit(this.gameObject, dispensedBeat);
|
||||
}
|
||||
|
||||
public override void OnAce()
|
||||
{
|
||||
kicker.Kick(this);
|
||||
}
|
||||
public GameEvent kicked = new GameEvent();
|
||||
public GameEvent highKicked = new GameEvent();
|
||||
public GameEvent toe = new GameEvent();
|
||||
private bool lastKickLeft;
|
||||
|
||||
public void Kick()
|
||||
{
|
||||
Jukebox.PlayOneShotGame("spaceSoccer/ballHit");
|
||||
kicker.Kick(this);
|
||||
|
||||
lastSpriteRot = spriteHolder.transform.eulerAngles.z;
|
||||
|
||||
dispensing = false;
|
||||
kicked.enabled = true;
|
||||
kicked.startBeat = Conductor.instance.songPositionInBeats;
|
||||
// kicked.startBeat = dispensedBeat + 2 + hitTimes;
|
||||
|
||||
lastSpriteRot = spriteHolder.transform.eulerAngles.z;
|
||||
|
||||
hitTimes++;
|
||||
|
||||
if (hitTimes % 2 == 0)
|
||||
lastKickLeft = kicker.kickLeft;
|
||||
|
||||
if (kicker.kickLeft)
|
||||
{
|
||||
kickCurve.transform.localScale = new Vector3(-1, 1);
|
||||
}
|
||||
|
@ -63,78 +54,63 @@ namespace RhythmHeavenMania.Games.SpaceSoccer
|
|||
kickCurve.transform.localScale = new Vector3(1, 1);
|
||||
}
|
||||
kickCurve.KeyPoints[0].transform.position = holder.transform.position;
|
||||
|
||||
ResetState();
|
||||
}
|
||||
|
||||
public void HighKick()
|
||||
{
|
||||
Jukebox.PlayOneShotGame("spaceSoccer/highkicktoe1_hit");
|
||||
|
||||
lastSpriteRot = spriteHolder.transform.eulerAngles.z;
|
||||
|
||||
dispensing = false;
|
||||
kicked.enabled = false;
|
||||
highKicked.enabled = true;
|
||||
highKicked.startBeat = Conductor.instance.songPositionInBeats;
|
||||
|
||||
highKickCurve.KeyPoints[0].transform.position = holder.transform.position;
|
||||
ResetState();
|
||||
}
|
||||
|
||||
public void Toe()
|
||||
{
|
||||
Jukebox.PlayOneShotGame("spaceSoccer/highkicktoe3_hit");
|
||||
|
||||
lastSpriteRot = spriteHolder.transform.eulerAngles.z;
|
||||
|
||||
highKicked.enabled = false;
|
||||
kicked.enabled = false;
|
||||
kickPrepare = false;
|
||||
|
||||
toe.enabled = true;
|
||||
toe.startBeat = Conductor.instance.songPositionInBeats;
|
||||
|
||||
toeCurve.KeyPoints[0].transform.position = holder.transform.position;
|
||||
ResetState();
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
|
||||
if (dispensing)
|
||||
{
|
||||
float normalizedBeatAnim = Conductor.instance.GetLoopPositionFromBeat(dispensedBeat, 2.5f);
|
||||
holder.transform.position = dispenseCurve.GetPoint(normalizedBeatAnim);
|
||||
spriteHolder.transform.eulerAngles = new Vector3(0, 0, Mathf.Lerp(0f, -1440f, normalizedBeatAnim));
|
||||
|
||||
float normalizedBeat = Conductor.instance.GetLoopPositionFromBeat(dispensedBeat, 2f);
|
||||
StateCheck(normalizedBeat);
|
||||
|
||||
if (PlayerInput.Pressed())
|
||||
/*if (PlayerInput.Pressed())
|
||||
{
|
||||
if (state.perfect)
|
||||
{
|
||||
Kick();
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
else if (kicked.enabled)
|
||||
{
|
||||
float normalizedBeatAnim = Conductor.instance.GetLoopPositionFromBeat(kicked.startBeat, 1.5f);
|
||||
holder.transform.position = kickCurve.GetPoint(normalizedBeatAnim);
|
||||
if (hitTimes % 2 == 0)
|
||||
{
|
||||
spriteHolder.transform.eulerAngles = new Vector3(0, 0, Mathf.Lerp(lastSpriteRot, lastSpriteRot + 360f, normalizedBeatAnim));
|
||||
}
|
||||
else
|
||||
if (!lastKickLeft)
|
||||
{
|
||||
spriteHolder.transform.eulerAngles = new Vector3(0, 0, Mathf.Lerp(lastSpriteRot, lastSpriteRot - 360f, normalizedBeatAnim));
|
||||
}
|
||||
else
|
||||
{
|
||||
spriteHolder.transform.eulerAngles = new Vector3(0, 0, Mathf.Lerp(lastSpriteRot, lastSpriteRot + 360f, normalizedBeatAnim));
|
||||
}
|
||||
|
||||
float normalizedBeat = Conductor.instance.GetLoopPositionFromBeat(kicked.startBeat, 1f);
|
||||
StateCheck(normalizedBeat);
|
||||
|
||||
if (PlayerInput.Pressed())
|
||||
/*if (PlayerInput.Pressed())
|
||||
{
|
||||
if (state.perfect)
|
||||
{
|
||||
|
@ -148,7 +124,7 @@ namespace RhythmHeavenMania.Games.SpaceSoccer
|
|||
}
|
||||
// print(normalizedBeat);
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
else if (highKicked.enabled)
|
||||
{
|
||||
|
@ -156,11 +132,9 @@ namespace RhythmHeavenMania.Games.SpaceSoccer
|
|||
holder.transform.position = highKickCurve.GetPoint(normalizedBeatAnim);
|
||||
spriteHolder.transform.eulerAngles = new Vector3(0, 0, Mathf.Lerp(lastSpriteRot, -460f, normalizedBeatAnim));
|
||||
|
||||
float normalizedBeat = Conductor.instance.GetLoopPositionFromBeat(highKicked.startBeat, 1.5f);
|
||||
StateCheck(normalizedBeat);
|
||||
// if (state.perfect) Debug.Break();
|
||||
|
||||
if (PlayerInput.Pressed())
|
||||
/*if (PlayerInput.Pressed())
|
||||
{
|
||||
kickPrepare = true;
|
||||
kicker.Kick(this);
|
||||
|
@ -174,14 +148,13 @@ namespace RhythmHeavenMania.Games.SpaceSoccer
|
|||
Toe();
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
else if (toe.enabled)
|
||||
{
|
||||
float normalizedBeatAnim = Conductor.instance.GetLoopPositionFromBeat(toe.startBeat, 1.85f);
|
||||
holder.transform.position = toeCurve.GetPoint(normalizedBeatAnim);
|
||||
spriteHolder.transform.eulerAngles = new Vector3(0, 0, Mathf.Lerp(lastSpriteRot, -860f, normalizedBeatAnim));
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,56 +6,241 @@ using RhythmHeavenMania.Util;
|
|||
|
||||
namespace RhythmHeavenMania.Games.SpaceSoccer
|
||||
{
|
||||
public class Kicker : MonoBehaviour
|
||||
public class Kicker : PlayerActionObject
|
||||
{
|
||||
private GameEvent kickEvents = new GameEvent();
|
||||
|
||||
[Header("Properties")]
|
||||
public bool canKick;
|
||||
public bool canHighKick;
|
||||
private bool kickPrepare = false;
|
||||
public bool kickLeft;
|
||||
public float dispenserBeat;
|
||||
public int kickTimes = 0;
|
||||
|
||||
[Header("Components")]
|
||||
private Animator anim;
|
||||
public Ball ball;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
anim = GetComponent<Animator>();
|
||||
}
|
||||
|
||||
public void KeepUp(float beat, float length)
|
||||
public override void OnAce()
|
||||
{
|
||||
kickEvents.startBeat = beat;
|
||||
kickEvents.length = length;
|
||||
}
|
||||
|
||||
public void Kick(Ball b)
|
||||
{
|
||||
if (b.hitTimes % 2 == 0)
|
||||
if (ball.highKicked.enabled)
|
||||
{
|
||||
anim.Play("KickRight", 0, 0);
|
||||
if (!kickPrepare)
|
||||
{
|
||||
Kick(false, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
Toe(true);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
anim.Play("KickLeft", 0, 0);
|
||||
if (canHighKick)
|
||||
{
|
||||
HighKick(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
Kick(true);
|
||||
}
|
||||
}
|
||||
Jukebox.PlayOneShotGame("spaceSoccer/kick");
|
||||
}
|
||||
|
||||
public void HighKick(float beat)
|
||||
public void Kick(bool hit, bool highKick = false)
|
||||
{
|
||||
canHighKick = true;
|
||||
// Jukebox.PlayOneShotGame("spaceSoccer/highKickToe1");
|
||||
kickTimes++;
|
||||
|
||||
if (kickLeft)
|
||||
{
|
||||
anim.Play("KickLeft", 0, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
anim.Play("KickRight", 0, 0);
|
||||
}
|
||||
if (highKick == false)
|
||||
{
|
||||
ball.Kick();
|
||||
}
|
||||
else
|
||||
{
|
||||
kickPrepare = true;
|
||||
}
|
||||
Jukebox.PlayOneShotGame("spaceSoccer/kick");
|
||||
ResetState();
|
||||
}
|
||||
|
||||
public void HighKick(bool hit)
|
||||
{
|
||||
if (hit)
|
||||
{
|
||||
Jukebox.PlayOneShotGame("spaceSoccer/highkicktoe1_hit");
|
||||
}
|
||||
else
|
||||
{
|
||||
Jukebox.PlayOneShotGame("spaceSoccer/highkicktoe1");
|
||||
}
|
||||
|
||||
ball.HighKick();
|
||||
ResetState();
|
||||
}
|
||||
|
||||
public void Toe(bool hit)
|
||||
{
|
||||
if (hit)
|
||||
{
|
||||
Jukebox.PlayOneShotGame("spaceSoccer/highkicktoe3_hit");
|
||||
}
|
||||
else
|
||||
{
|
||||
Jukebox.PlayOneShotGame("spaceSoccer/highkicktoe3");
|
||||
}
|
||||
ball.Toe();
|
||||
kickPrepare = false;
|
||||
ResetState();
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if (Conductor.instance.songPositionInBeats >= kickEvents.startBeat && Conductor.instance.songPositionInBeats < kickEvents.startBeat + kickEvents.length)
|
||||
if (kickTimes % 2 == 0)
|
||||
{
|
||||
canKick = true;
|
||||
kickLeft = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
canKick = false;
|
||||
kickLeft = true;
|
||||
}
|
||||
|
||||
List<Beatmap.Entity> keepUps = GameManager.instance.Beatmap.entities.FindAll(c => c.datamodel == "spaceSoccer/keep-up");
|
||||
List<Beatmap.Entity> highKicks = GameManager.instance.Beatmap.entities.FindAll(c => c.datamodel == "spaceSoccer/high kick-toe!");
|
||||
for (int i = 0; i < keepUps.Count; i++)
|
||||
{
|
||||
if ((keepUps[i].beat - 0.15f) <= Conductor.instance.songPositionInBeats && (keepUps[i].beat + keepUps[i].length) - 0.15f > Conductor.instance.songPositionInBeats)
|
||||
{
|
||||
canKick = true;
|
||||
canHighKick = false;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
canKick = false;
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < highKicks.Count; i++)
|
||||
{
|
||||
if ((highKicks[i].beat - 0.15f) <= Conductor.instance.songPositionInBeats && highKicks[i].beat + 1f > Conductor.instance.songPositionInBeats)
|
||||
{
|
||||
canHighKick = true;
|
||||
canKick = false;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
canHighKick = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (ball)
|
||||
{
|
||||
if (ball.dispensing)
|
||||
{
|
||||
float normalizedBeat = Conductor.instance.GetLoopPositionFromBeat(ball.dispensedBeat, 2f);
|
||||
StateCheck(normalizedBeat);
|
||||
CheckIfFall(normalizedBeat);
|
||||
|
||||
if (PlayerInput.Pressed())
|
||||
{
|
||||
if (state.perfect)
|
||||
{
|
||||
KickCheck();
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (ball.kicked.enabled)
|
||||
{
|
||||
float normalizedBeat = Conductor.instance.GetLoopPositionFromBeat(ball.kicked.startBeat, 1f);
|
||||
StateCheck(normalizedBeat);
|
||||
CheckIfFall(normalizedBeat);
|
||||
|
||||
if (PlayerInput.Pressed())
|
||||
{
|
||||
if (state.perfect)
|
||||
{
|
||||
KickCheck();
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (ball.highKicked.enabled)
|
||||
{
|
||||
float normalizedBeat = Conductor.instance.GetLoopPositionFromBeat(ball.highKicked.startBeat, 1.5f);
|
||||
if (!kickPrepare)
|
||||
{
|
||||
float normalizedBeatPrepare = Conductor.instance.GetLoopPositionFromBeat(ball.highKicked.startBeat, 1f);
|
||||
StateCheck(normalizedBeatPrepare);
|
||||
CheckIfFall(normalizedBeat);
|
||||
|
||||
if (PlayerInput.Pressed())
|
||||
{
|
||||
Kick(false, true);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
StateCheck(normalizedBeat);
|
||||
if (PlayerInput.PressedUp())
|
||||
{
|
||||
if (state.perfect)
|
||||
{
|
||||
Toe(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (ball.toe.enabled)
|
||||
{
|
||||
float normalizedBeat = Conductor.instance.GetLoopPositionFromBeat(ball.toe.startBeat, 1.5f);
|
||||
StateCheck(normalizedBeat);
|
||||
CheckIfFall(normalizedBeat);
|
||||
|
||||
if (PlayerInput.Pressed())
|
||||
{
|
||||
if (state.perfect)
|
||||
{
|
||||
KickCheck();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (PlayerInput.Pressed())
|
||||
{
|
||||
// Kick(false);
|
||||
}
|
||||
}
|
||||
|
||||
private void KickCheck()
|
||||
{
|
||||
if (canHighKick)
|
||||
{
|
||||
HighKick(true);
|
||||
}
|
||||
else if (canKick)
|
||||
{
|
||||
Kick(true);
|
||||
}
|
||||
}
|
||||
|
||||
private void CheckIfFall(float normalizedBeat)
|
||||
{
|
||||
if (normalizedBeat > 1.45f)
|
||||
{
|
||||
ball = null;
|
||||
ResetState();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,12 +31,16 @@ namespace RhythmHeavenMania.Games.SpaceSoccer
|
|||
|
||||
public void Dispense(float beat)
|
||||
{
|
||||
if (kicker.ball != null) return;
|
||||
ballDispensed = true;
|
||||
|
||||
GameObject ball = Instantiate(ballRef, this.transform);
|
||||
Ball ball_ = ball.GetComponent<Ball>();
|
||||
ball_.dispensedBeat = beat;
|
||||
ball_.dispensing = true;
|
||||
kicker.ball = ball_;
|
||||
kicker.dispenserBeat = beat;
|
||||
kicker.kickTimes = 0;
|
||||
|
||||
MultiSound.Play(new MultiSound.Sound[]
|
||||
{
|
||||
|
@ -51,16 +55,6 @@ namespace RhythmHeavenMania.Games.SpaceSoccer
|
|||
new MultiSound.Sound("spaceSoccer/dispenseTumble6B", beat + 1.75f),
|
||||
});
|
||||
}
|
||||
|
||||
public void KeepUp(float beat, float length)
|
||||
{
|
||||
kicker.KeepUp(beat, length);
|
||||
}
|
||||
|
||||
public void HighKick(float beat)
|
||||
{
|
||||
kicker.HighKick(beat);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -91,12 +91,12 @@ namespace RhythmHeavenMania.Editor
|
|||
}
|
||||
|
||||
if (CommandManager.instance.canUndo())
|
||||
UndoBTN.transform.GetChild(0).GetComponent<Image>().color = "BE72FF".Hex2RGB();
|
||||
UndoBTN.transform.GetChild(0).GetComponent<Image>().color = "BD8CFF".Hex2RGB();
|
||||
else
|
||||
UndoBTN.transform.GetChild(0).GetComponent<Image>().color = Color.gray;
|
||||
|
||||
if (CommandManager.instance.canRedo())
|
||||
RedoBTN.transform.GetChild(0).GetComponent<Image>().color = "7299FF".Hex2RGB();
|
||||
RedoBTN.transform.GetChild(0).GetComponent<Image>().color = "FFD800".Hex2RGB();
|
||||
else
|
||||
RedoBTN.transform.GetChild(0).GetComponent<Image>().color = Color.gray;
|
||||
|
||||
|
|
|
@ -97,12 +97,13 @@ namespace RhythmHeavenMania
|
|||
new GameAction("prepare", delegate { KarateMan.instance.Prepare(eventCaller.currentBeat, eventCaller.currentLength); }, 1f, true),
|
||||
new GameAction("bgfxon", delegate { KarateMan.instance.BGFXOn(); } ),
|
||||
new GameAction("bgfxoff", delegate { KarateMan.instance.BGFXOff(); }),
|
||||
new GameAction("tacobell", delegate { KarateMan.instance.Shoot(eventCaller.currentBeat, 6); }, 2),
|
||||
}),
|
||||
new Minigame("spaceSoccer", "Space Soccer", "B888F8", new List<GameAction>()
|
||||
{
|
||||
new GameAction("ball dispense", delegate { SpaceSoccer.instance.Dispense(eventCaller.currentBeat); }, 2f),
|
||||
new GameAction("keep-up", delegate { SpaceSoccer.instance.KeepUp(eventCaller.currentBeat, eventCaller.currentLength); }, 4f, true),
|
||||
new GameAction("high kick-toe!", delegate { SpaceSoccer.instance.HighKick(eventCaller.currentBeat); }, 3f),
|
||||
new GameAction("keep-up", delegate { }, 4f, true),
|
||||
new GameAction("high kick-toe!", delegate { }, 3f),
|
||||
})
|
||||
};
|
||||
}
|
||||
|
|
1
Assets/aids.json
Normal file
1
Assets/aids.json
Normal file
|
@ -0,0 +1 @@
|
|||
{"bpm":116.5,"entities":[{"beat":8.0,"track":0,"length":2.0,"datamodel":"karateman/bop"},{"beat":10.0,"track":0,"length":2.0,"datamodel":"karateman/bop"},{"beat":12.0,"track":0,"length":2.0,"datamodel":"karateman/pot"},{"beat":12.5,"track":1,"length":2.0,"datamodel":"karateman/pot"},{"beat":14.0,"track":0,"length":2.0,"datamodel":"karateman/pot"},{"beat":14.5,"track":1,"length":2.0,"datamodel":"karateman/pot"},{"beat":16.0,"track":0,"length":2.0,"datamodel":"karateman/pot"},{"beat":16.5,"track":1,"length":2.0,"datamodel":"karateman/pot"},{"beat":18.0,"track":0,"length":2.0,"datamodel":"karateman/tacobell"}]}
|
7
Assets/aids.json.meta
Normal file
7
Assets/aids.json.meta
Normal file
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 05b7099e387b94442b9a6cf46f6654c9
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -1 +1 @@
|
|||
{"bpm":130.0,"entities":[{"beat":0.0,"track":0,"length":2.0,"datamodel":"spaceSoccer/ball dispense"},{"beat":2.0,"track":1,"length":2.0,"datamodel":"spaceSoccer/keep-up"},{"beat":4.0,"track":0,"length":3.0,"datamodel":"spaceSoccer/high kick-toe!"}]}
|
||||
{"bpm":130.0,"entities":[{"beat":6.0,"track":0,"length":2.0,"datamodel":"spaceSoccer/ball dispense"},{"beat":8.0,"track":1,"length":2.0,"datamodel":"spaceSoccer/keep-up"},{"beat":10.0,"track":0,"length":3.0,"datamodel":"spaceSoccer/high kick-toe!"},{"beat":11.0,"track":2,"length":2.0,"datamodel":"spaceSoccer/ball dispense"},{"beat":13.0,"track":1,"length":1.0,"datamodel":"spaceSoccer/keep-up"},{"beat":14.0,"track":0,"length":3.0,"datamodel":"spaceSoccer/high kick-toe!"},{"beat":17.0,"track":1,"length":1.0,"datamodel":"spaceSoccer/keep-up"},{"beat":18.0,"track":0,"length":3.0,"datamodel":"spaceSoccer/high kick-toe!"},{"beat":21.0,"track":1,"length":1.0,"datamodel":"spaceSoccer/keep-up"},{"beat":22.0,"track":0,"length":3.0,"datamodel":"spaceSoccer/high kick-toe!"},{"beat":25.0,"track":1,"length":1.0,"datamodel":"spaceSoccer/keep-up"},{"beat":26.0,"track":0,"length":3.0,"datamodel":"spaceSoccer/high kick-toe!"},{"beat":29.0,"track":1,"length":13.0,"datamodel":"spaceSoccer/keep-up"},{"beat":42.0,"track":2,"length":3.0,"datamodel":"spaceSoccer/high kick-toe!"}]}
|
Loading…
Reference in a new issue