modified: Assets/Resources/Games/bouncyRoad.prefab

This commit is contained in:
fu-majime 2024-04-04 12:40:51 +09:00
parent a47572d8e2
commit fb0e522dfb
18 changed files with 1831 additions and 702 deletions

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 15f22c8c260a6054987555505ec2090e
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,237 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &3728467143531728301
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5824484732720336883}
- component: {fileID: 45642538932462577}
m_Layer: 0
m_Name: Thing Top
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &5824484732720336883
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3728467143531728301}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.5, y: 0.5, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 5860934180505614771}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!212 &45642538932462577
SpriteRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3728467143531728301}
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: 0
m_Sprite: {fileID: 1472720816, guid: b1573b9bbfeef24468e4b72a1c110a69, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_FlipX: 0
m_FlipY: 0
m_DrawMode: 0
m_Size: {x: 1.43, y: 1.27}
m_AdaptiveModeThreshold: 0.5
m_SpriteTileMode: 0
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
m_SpriteSortPoint: 0
--- !u!1 &4296581059594265130
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 129954338505823532}
- component: {fileID: 9211768242693002051}
m_Layer: 0
m_Name: Thing
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &129954338505823532
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4296581059594265130}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: -0.725, z: 0}
m_LocalScale: {x: 0.5, y: 0.5, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 5860934180505614771}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!212 &9211768242693002051
SpriteRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4296581059594265130}
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: -1
m_Sprite: {fileID: 1384131445, guid: b1573b9bbfeef24468e4b72a1c110a69, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_FlipX: 0
m_FlipY: 0
m_DrawMode: 0
m_Size: {x: 1.45, y: 0.82}
m_AdaptiveModeThreshold: 0.5
m_SpriteTileMode: 0
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
m_SpriteSortPoint: 0
--- !u!1 &6681551255766222910
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5860934180505614771}
- component: {fileID: 8756588228161982170}
- component: {fileID: 4543615920853278967}
m_Layer: 0
m_Name: Thing
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &5860934180505614771
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6681551255766222910}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 5824484732720336883}
- {fileID: 129954338505823532}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!95 &8756588228161982170
Animator:
serializedVersion: 5
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6681551255766222910}
m_Enabled: 1
m_Avatar: {fileID: 0}
m_Controller: {fileID: 9100000, guid: 9438cc97ba9302849807607dc4df557b, type: 2}
m_CullingMode: 0
m_UpdateMode: 0
m_ApplyRootMotion: 0
m_LinearVelocityBlending: 0
m_StabilizeFeet: 0
m_WarningMessage:
m_HasTransformHierarchy: 1
m_AllowConstantClipSamplingOptimization: 1
m_KeepAnimatorStateOnDisable: 0
m_WriteDefaultValuesOnDisable: 0
--- !u!210 &4543615920853278967
SortingGroup:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6681551255766222910}
m_Enabled: 1
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0

View file

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 1a184ba123ced3944863abbdb7d41709
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 343519224b36f7848b9e2165fcd2cdfa
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View file

@ -0,0 +1,22 @@
fileFormatVersion: 2
guid: c2ad6de1fabe1a347a67811dcc14cc41
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:

Binary file not shown.

View file

@ -0,0 +1,22 @@
fileFormatVersion: 2
guid: e688e5ce7d29c17409f04028717dff58
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:

Binary file not shown.

View file

@ -0,0 +1,22 @@
fileFormatVersion: 2
guid: 15ea4ffa0443d6948850ea688fd4b64e
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:

Binary file not shown.

View file

@ -0,0 +1,22 @@
fileFormatVersion: 2
guid: f5c932d9f27f4134d8cf0700af5c37c7
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:

View file

@ -6,7 +6,7 @@ AnimationClip:
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Thing
m_Name: Thing Podium
serializedVersion: 6
m_Legacy: 0
m_Compressed: 0

View file

@ -108,12 +108,12 @@ TextureImporter:
name: D-Pad Thing
rect:
serializedVersion: 2
x: 41
x: 32
y: 320
width: 285
width: 284
height: 918
alignment: 0
pivot: {x: 0.5, y: 0.5}
alignment: 9
pivot: {x: 0.5633803, y: 0.9553377}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
@ -129,12 +129,12 @@ TextureImporter:
name: A Button Thing
rect:
serializedVersion: 2
x: 354
x: 356
y: 320
width: 285
width: 284
height: 918
alignment: 0
pivot: {x: 0.5, y: 0.5}
alignment: 9
pivot: {x: 0.43661973, y: 0.9553377}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
@ -150,9 +150,9 @@ TextureImporter:
name: Thing
rect:
serializedVersion: 2
x: 745
y: 1155
width: 145
x: 740
y: 1156
width: 152
height: 82
alignment: 0
pivot: {x: 0.5, y: 0.5}
@ -213,12 +213,12 @@ TextureImporter:
name: D-Pad Thing Top
rect:
serializedVersion: 2
x: 121
y: 1353
width: 143
x: 116
y: 1350
width: 152
height: 127
alignment: 0
pivot: {x: 0, y: 0}
pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
@ -234,12 +234,12 @@ TextureImporter:
name: A Button Thing Top
rect:
serializedVersion: 2
x: 405
y: 1354
width: 143
x: 404
y: 1350
width: 152
height: 127
alignment: 0
pivot: {x: 0, y: 0}
pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
@ -255,12 +255,12 @@ TextureImporter:
name: Thing Top
rect:
serializedVersion: 2
x: 742
x: 740
y: 1350
width: 143
width: 152
height: 127
alignment: 0
pivot: {x: 0, y: 0}
pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
@ -286,6 +286,9 @@ TextureImporter:
A Button Thing: -1195577708
A Button Thing Top: -696068414
Ball: -90921525
Bouncy Road_0: -889360013
Bouncy Road_1: -1546852772
Bouncy Road_2: -340609972
D-Pad Thing: 1750167488
D-Pad Thing Top: -2107092334
Gradient (Prolly will be replaced): -2010126057

View file

@ -20,6 +20,12 @@ namespace HeavenStudio.Games.Loaders
{
return new Minigame("bouncyRoad", "Bouncy Road", "0296FF", false, false, new List<GameAction>()
{
new GameAction("ball", "Ball")
{
function = delegate { var e = eventCaller.currentEntity; BouncyRoad.instance.SpawnBall(e.beat, e.length); },
defaultLength = 1f,
resizable = true,
},
}
);
}
@ -28,8 +34,84 @@ namespace HeavenStudio.Games.Loaders
namespace HeavenStudio.Games
{
public class BouncyRoad : Minigame
{
public static BouncyRoad instance;
[SerializeField] Animator[] Things;
const int IALeft = 0;
const int IARight = 1;
protected static bool IA_PadLeft(out double dt)
{
return PlayerInput.GetPadDown(InputController.ActionsPad.Up, out dt)
|| PlayerInput.GetPadDown(InputController.ActionsPad.Down, out dt)
|| PlayerInput.GetPadDown(InputController.ActionsPad.Left, out dt)
|| PlayerInput.GetPadDown(InputController.ActionsPad.Right, out dt);
}
protected static bool IA_TouchLeft(out double dt)
{
return PlayerInput.GetTouchDown(InputController.ActionsTouch.Left, out dt);
}
protected static bool IA_PadRight(out double dt)
{
return PlayerInput.GetPadDown(InputController.ActionsPad.East, out dt);
}
protected static bool IA_TouchRight(out double dt)
{
return PlayerInput.GetTouchDown(InputController.ActionsTouch.Right, out dt);
}
public static PlayerInput.InputAction InputAction_Left =
new("AgbBouncyLeft", new int[] { IALeft, IALeft, IALeft },
IA_PadLeft, IA_TouchLeft, IA_BatonBasicPress);
public static PlayerInput.InputAction InputAction_Right =
new("AgbBouncyRight", new int[] { IARight, IARight, IAEmptyCat },
IA_PadRight, IA_TouchRight, IA_Empty);
void Awake()
{
instance = this;
}
void Update()
{
var cond = Conductor.instance;
if (!cond.isPlaying || cond.isPaused) return;
if (PlayerInput.GetIsAction(InputAction_Right) && !IsExpectingInputNow(InputAction_Right))
{
Things[12].Play("podium", 0, 0);
}
if (PlayerInput.GetIsAction(InputAction_Left) && !IsExpectingInputNow(InputAction_Left))
{
Things[13].Play("podium", 0, 0);
}
}
public void SpawnBall(double beat, double length)
{
var sounds = new List<MultiSound.Sound>();
for (int i = 0; i < 12 ; i++)
{
sounds.Add(new MultiSound.Sound("bouncyRoad/ballBounce", beat + i * length));
}
sounds.Add(new MultiSound.Sound("bouncyRoad/ballRight", beat + 12 * length));
sounds.Add(new MultiSound.Sound("bouncyRoad/ballLeft", beat + 13 * length));
sounds.Add(new MultiSound.Sound("bouncyRoad/goal", beat + 14 * length));
MultiSound.Play(sounds.ToArray());
var actions = new List<BeatAction.Action>();
for (int i = 0; i < 15 ; i++)
{
int currentItr = i;
actions.Add(new BeatAction.Action(beat + i * length, delegate {
Things[currentItr].Play("podium", 0, 0);
}));
}
BeatAction.New(instance, actions);
}
}
}

View file

@ -63,6 +63,16 @@ namespace HeavenStudio
Debug.LogWarning("Game loader AgbBonOdoriLoader failed!");
}
game = AgbBouncyRoadLoader.AddGame(eventCaller);
if (game != null)
{
eventCaller.minigames.Add(game.name, game);
}
else
{
Debug.LogWarning("Game loader AgbBouncyRoadLoader failed!");
}
game = NtrFlickLoader.AddGame(eventCaller);
if (game != null)
{