Stars background + Camera zooming *UNFINISHED*
This commit is contained in:
parent
6729eec8dc
commit
417986c08c
|
@ -165,7 +165,7 @@ AnimatorStateMachine:
|
||||||
m_Position: {x: 360, y: 120, z: 0}
|
m_Position: {x: 360, y: 120, z: 0}
|
||||||
- serializedVersion: 1
|
- serializedVersion: 1
|
||||||
m_State: {fileID: 4663746626472684145}
|
m_State: {fileID: 4663746626472684145}
|
||||||
m_Position: {x: 470, y: 230, z: 0}
|
m_Position: {x: 440, y: -70, z: 0}
|
||||||
m_ChildStateMachines: []
|
m_ChildStateMachines: []
|
||||||
m_AnyStateTransitions: []
|
m_AnyStateTransitions: []
|
||||||
m_EntryTransitions: []
|
m_EntryTransitions: []
|
||||||
|
|
|
@ -48,8 +48,34 @@ AnimationClip:
|
||||||
m_RotationOrder: 4
|
m_RotationOrder: 4
|
||||||
path: HandVisual/hand_shadow1
|
path: HandVisual/hand_shadow1
|
||||||
m_ScaleCurves: []
|
m_ScaleCurves: []
|
||||||
m_FloatCurves: []
|
m_FloatCurves:
|
||||||
m_PPtrCurves: []
|
- curve:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Curve:
|
||||||
|
- serializedVersion: 3
|
||||||
|
time: 0
|
||||||
|
value: 0
|
||||||
|
inSlope: Infinity
|
||||||
|
outSlope: Infinity
|
||||||
|
tangentMode: 103
|
||||||
|
weightedMode: 0
|
||||||
|
inWeight: 0
|
||||||
|
outWeight: 0
|
||||||
|
m_PreInfinity: 2
|
||||||
|
m_PostInfinity: 2
|
||||||
|
m_RotationOrder: 4
|
||||||
|
attribute: m_IsActive
|
||||||
|
path: fast_1
|
||||||
|
classID: 1
|
||||||
|
script: {fileID: 0}
|
||||||
|
m_PPtrCurves:
|
||||||
|
- curve:
|
||||||
|
- time: 0
|
||||||
|
value: {fileID: -3456084564025576355, guid: 52117e1d5cd298c42adfea952676c7d6, type: 3}
|
||||||
|
attribute: m_Sprite
|
||||||
|
path: HandVisual
|
||||||
|
classID: 212
|
||||||
|
script: {fileID: 0}
|
||||||
m_SampleRate: 60
|
m_SampleRate: 60
|
||||||
m_WrapMode: 0
|
m_WrapMode: 0
|
||||||
m_Bounds:
|
m_Bounds:
|
||||||
|
@ -57,6 +83,20 @@ AnimationClip:
|
||||||
m_Extent: {x: 0, y: 0, z: 0}
|
m_Extent: {x: 0, y: 0, z: 0}
|
||||||
m_ClipBindingConstant:
|
m_ClipBindingConstant:
|
||||||
genericBindings:
|
genericBindings:
|
||||||
|
- serializedVersion: 2
|
||||||
|
path: 2377293126
|
||||||
|
attribute: 2086281974
|
||||||
|
script: {fileID: 0}
|
||||||
|
typeID: 1
|
||||||
|
customType: 0
|
||||||
|
isPPtrCurve: 0
|
||||||
|
- serializedVersion: 2
|
||||||
|
path: 3267382320
|
||||||
|
attribute: 0
|
||||||
|
script: {fileID: 0}
|
||||||
|
typeID: 212
|
||||||
|
customType: 23
|
||||||
|
isPPtrCurve: 1
|
||||||
- serializedVersion: 2
|
- serializedVersion: 2
|
||||||
path: 3267382320
|
path: 3267382320
|
||||||
attribute: 1
|
attribute: 1
|
||||||
|
@ -71,13 +111,14 @@ AnimationClip:
|
||||||
typeID: 4
|
typeID: 4
|
||||||
customType: 0
|
customType: 0
|
||||||
isPPtrCurve: 0
|
isPPtrCurve: 0
|
||||||
pptrCurveMapping: []
|
pptrCurveMapping:
|
||||||
|
- {fileID: -3456084564025576355, guid: 52117e1d5cd298c42adfea952676c7d6, type: 3}
|
||||||
m_AnimationClipSettings:
|
m_AnimationClipSettings:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_AdditiveReferencePoseClip: {fileID: 0}
|
m_AdditiveReferencePoseClip: {fileID: 0}
|
||||||
m_AdditiveReferencePoseTime: 0
|
m_AdditiveReferencePoseTime: 0
|
||||||
m_StartTime: 0
|
m_StartTime: 0
|
||||||
m_StopTime: 0
|
m_StopTime: 0.016666668
|
||||||
m_OrientationOffsetY: 0
|
m_OrientationOffsetY: 0
|
||||||
m_Level: 0
|
m_Level: 0
|
||||||
m_CycleOffset: 0
|
m_CycleOffset: 0
|
||||||
|
@ -207,6 +248,25 @@ AnimationClip:
|
||||||
path: HandVisual/hand_shadow1
|
path: HandVisual/hand_shadow1
|
||||||
classID: 4
|
classID: 4
|
||||||
script: {fileID: 0}
|
script: {fileID: 0}
|
||||||
|
- curve:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Curve:
|
||||||
|
- serializedVersion: 3
|
||||||
|
time: 0
|
||||||
|
value: 0
|
||||||
|
inSlope: Infinity
|
||||||
|
outSlope: Infinity
|
||||||
|
tangentMode: 103
|
||||||
|
weightedMode: 0
|
||||||
|
inWeight: 0
|
||||||
|
outWeight: 0
|
||||||
|
m_PreInfinity: 2
|
||||||
|
m_PostInfinity: 2
|
||||||
|
m_RotationOrder: 4
|
||||||
|
attribute: m_IsActive
|
||||||
|
path: fast_1
|
||||||
|
classID: 1
|
||||||
|
script: {fileID: 0}
|
||||||
m_EulerEditorCurves: []
|
m_EulerEditorCurves: []
|
||||||
m_HasGenericRootTransform: 0
|
m_HasGenericRootTransform: 0
|
||||||
m_HasMotionFloatCurves: 0
|
m_HasMotionFloatCurves: 0
|
||||||
|
|
105
Assets/Resources/Sprites/Games/Spaceball/star.mat
Normal file
105
Assets/Resources/Sprites/Games/Spaceball/star.mat
Normal file
|
@ -0,0 +1,105 @@
|
||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!21 &2100000
|
||||||
|
Material:
|
||||||
|
serializedVersion: 6
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: star
|
||||||
|
m_Shader: {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0}
|
||||||
|
m_ShaderKeywords:
|
||||||
|
m_LightmapFlags: 0
|
||||||
|
m_EnableInstancingVariants: 0
|
||||||
|
m_DoubleSidedGI: 0
|
||||||
|
m_CustomRenderQueue: -1
|
||||||
|
stringTagMap: {}
|
||||||
|
disabledShaderPasses: []
|
||||||
|
m_SavedProperties:
|
||||||
|
serializedVersion: 3
|
||||||
|
m_TexEnvs:
|
||||||
|
- _AlphaTex:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _BumpMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _DetailAlbedoMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _DetailMask:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _DetailNormalMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _EmissionMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _MainTex:
|
||||||
|
m_Texture: {fileID: 2800000, guid: 7282243b380b13546a2b9bf0701991d2, type: 3}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _MetallicGlossMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _OcclusionMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _ParallaxMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
m_Floats:
|
||||||
|
- PixelSnap: 0
|
||||||
|
- _BlendOp: 0
|
||||||
|
- _BumpScale: 1
|
||||||
|
- _CameraFadingEnabled: 0
|
||||||
|
- _CameraFarFadeDistance: 2
|
||||||
|
- _CameraNearFadeDistance: 1
|
||||||
|
- _ColorMode: 0
|
||||||
|
- _Cull: 2
|
||||||
|
- _Cutoff: 0.5
|
||||||
|
- _DetailNormalMapScale: 1
|
||||||
|
- _DistortionBlend: 0.5
|
||||||
|
- _DistortionEnabled: 0
|
||||||
|
- _DistortionStrength: 1
|
||||||
|
- _DistortionStrengthScaled: 0
|
||||||
|
- _DstBlend: 0
|
||||||
|
- _EmissionEnabled: 0
|
||||||
|
- _EnableExternalAlpha: 0
|
||||||
|
- _FlipbookMode: 0
|
||||||
|
- _GlossMapScale: 1
|
||||||
|
- _Glossiness: 0.5
|
||||||
|
- _GlossyReflections: 1
|
||||||
|
- _LightingEnabled: 1
|
||||||
|
- _Metallic: 0
|
||||||
|
- _Mode: 0
|
||||||
|
- _OcclusionStrength: 1
|
||||||
|
- _Parallax: 0.02
|
||||||
|
- _SmoothnessTextureChannel: 0
|
||||||
|
- _SoftParticlesEnabled: 0
|
||||||
|
- _SoftParticlesFarFadeDistance: 1
|
||||||
|
- _SoftParticlesNearFadeDistance: 0
|
||||||
|
- _SpecularHighlights: 1
|
||||||
|
- _SrcBlend: 1
|
||||||
|
- _UVSec: 0
|
||||||
|
- _ZWrite: 1
|
||||||
|
m_Colors:
|
||||||
|
- _CameraFadeParams: {r: 0, g: Infinity, b: 0, a: 0}
|
||||||
|
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
- _ColorAddSubDiff: {r: 0, g: 0, b: 0, a: 0}
|
||||||
|
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||||
|
- _Flip: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
- _RendererColor: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
- _SoftParticleFadeParams: {r: 0, g: 0, b: 0, a: 0}
|
||||||
|
m_BuildTextureStacks: []
|
8
Assets/Resources/Sprites/Games/Spaceball/star.mat.meta
Normal file
8
Assets/Resources/Sprites/Games/Spaceball/star.mat.meta
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: ac0e1b6fa4ac4404ba36dd6e341fa024
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 2100000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
BIN
Assets/Resources/Sprites/Games/Spaceball/star.png
Normal file
BIN
Assets/Resources/Sprites/Games/Spaceball/star.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 333 B |
96
Assets/Resources/Sprites/Games/Spaceball/star.png.meta
Normal file
96
Assets/Resources/Sprites/Games/Spaceball/star.png.meta
Normal file
|
@ -0,0 +1,96 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 7282243b380b13546a2b9bf0701991d2
|
||||||
|
TextureImporter:
|
||||||
|
internalIDToNameTable: []
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 11
|
||||||
|
mipmaps:
|
||||||
|
mipMapMode: 0
|
||||||
|
enableMipMap: 0
|
||||||
|
sRGBTexture: 1
|
||||||
|
linearTexture: 0
|
||||||
|
fadeOut: 0
|
||||||
|
borderMipMap: 0
|
||||||
|
mipMapsPreserveCoverage: 0
|
||||||
|
alphaTestReferenceValue: 0.5
|
||||||
|
mipMapFadeDistanceStart: 1
|
||||||
|
mipMapFadeDistanceEnd: 3
|
||||||
|
bumpmap:
|
||||||
|
convertToNormalMap: 0
|
||||||
|
externalNormalMap: 0
|
||||||
|
heightScale: 0.25
|
||||||
|
normalMapFilter: 0
|
||||||
|
isReadable: 0
|
||||||
|
streamingMipmaps: 0
|
||||||
|
streamingMipmapsPriority: 0
|
||||||
|
vTOnly: 0
|
||||||
|
grayScaleToAlpha: 0
|
||||||
|
generateCubemap: 6
|
||||||
|
cubemapConvolution: 0
|
||||||
|
seamlessCubemap: 0
|
||||||
|
textureFormat: 1
|
||||||
|
maxTextureSize: 2048
|
||||||
|
textureSettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
filterMode: 1
|
||||||
|
aniso: 1
|
||||||
|
mipBias: 0
|
||||||
|
wrapU: 1
|
||||||
|
wrapV: 1
|
||||||
|
wrapW: 1
|
||||||
|
nPOTScale: 0
|
||||||
|
lightmap: 0
|
||||||
|
compressionQuality: 50
|
||||||
|
spriteMode: 1
|
||||||
|
spriteExtrude: 1
|
||||||
|
spriteMeshType: 1
|
||||||
|
alignment: 0
|
||||||
|
spritePivot: {x: 0.5, y: 0.5}
|
||||||
|
spritePixelsToUnits: 100
|
||||||
|
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
spriteGenerateFallbackPhysicsShape: 1
|
||||||
|
alphaUsage: 1
|
||||||
|
alphaIsTransparency: 1
|
||||||
|
spriteTessellationDetail: -1
|
||||||
|
textureType: 8
|
||||||
|
textureShape: 1
|
||||||
|
singleChannelComponent: 0
|
||||||
|
flipbookRows: 1
|
||||||
|
flipbookColumns: 1
|
||||||
|
maxTextureSizeSet: 0
|
||||||
|
compressionQualitySet: 0
|
||||||
|
textureFormatSet: 0
|
||||||
|
ignorePngGamma: 0
|
||||||
|
applyGammaDecoding: 0
|
||||||
|
platformSettings:
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: DefaultTexturePlatform
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
spriteSheet:
|
||||||
|
serializedVersion: 2
|
||||||
|
sprites: []
|
||||||
|
outline: []
|
||||||
|
physicsShape: []
|
||||||
|
bones: []
|
||||||
|
spriteID: 5e97eb03825dee720800000000000000
|
||||||
|
internalID: 0
|
||||||
|
vertices: []
|
||||||
|
indices:
|
||||||
|
edges: []
|
||||||
|
weights: []
|
||||||
|
secondaryTextures: []
|
||||||
|
spritePackingTag:
|
||||||
|
pSDRemoveMatte: 0
|
||||||
|
pSDShowRemoveMatteOption: 0
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
File diff suppressed because it is too large
Load diff
|
@ -15,6 +15,7 @@ namespace RhythmHeavenMania
|
||||||
public float beat;
|
public float beat;
|
||||||
public int track;
|
public int track;
|
||||||
public float length;
|
public float length;
|
||||||
|
public float valA;
|
||||||
public string type;
|
public string type;
|
||||||
public string datamodel;
|
public string datamodel;
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ namespace RhythmHeavenMania
|
||||||
[Header("DSGuy")]
|
[Header("DSGuy")]
|
||||||
[SerializeField] private GameObject Eyes;
|
[SerializeField] private GameObject Eyes;
|
||||||
[SerializeField] private GameObject OuterCircle;
|
[SerializeField] private GameObject OuterCircle;
|
||||||
[SerializeField] private GameObject InnerCircle;
|
public GameObject InnerCircle;
|
||||||
[SerializeField] private GameObject Circle;
|
[SerializeField] private GameObject Circle;
|
||||||
private Tween outerCircleTween, eyesTween;
|
private Tween outerCircleTween, eyesTween;
|
||||||
|
|
||||||
|
|
|
@ -17,6 +17,7 @@ namespace RhythmHeavenMania
|
||||||
public Transform GamesHolder;
|
public Transform GamesHolder;
|
||||||
private float currentBeat;
|
private float currentBeat;
|
||||||
private float currentLength;
|
private float currentLength;
|
||||||
|
private float currentValA;
|
||||||
private string currentSwitchGame;
|
private string currentSwitchGame;
|
||||||
private string currentType;
|
private string currentType;
|
||||||
|
|
||||||
|
@ -30,12 +31,14 @@ namespace RhythmHeavenMania
|
||||||
public class MiniGame
|
public class MiniGame
|
||||||
{
|
{
|
||||||
public string name;
|
public string name;
|
||||||
|
public string color;
|
||||||
public GameObject holder;
|
public GameObject holder;
|
||||||
public List<GameAction> actions = new List<GameAction>();
|
public List<GameAction> actions = new List<GameAction>();
|
||||||
|
|
||||||
public MiniGame(string name, List<GameAction> actions)
|
public MiniGame(string name, string color, List<GameAction> actions)
|
||||||
{
|
{
|
||||||
this.name = name;
|
this.name = name;
|
||||||
|
this.color = color;
|
||||||
this.actions = actions;
|
this.actions = actions;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -58,12 +61,12 @@ namespace RhythmHeavenMania
|
||||||
{
|
{
|
||||||
minigames = new List<MiniGame>()
|
minigames = new List<MiniGame>()
|
||||||
{
|
{
|
||||||
new MiniGame("gameManager", new List<GameAction>()
|
new MiniGame("gameManager", "", new List<GameAction>()
|
||||||
{
|
{
|
||||||
new GameAction("end", delegate { Debug.Log("end"); }),
|
new GameAction("end", delegate { Debug.Log("end"); }),
|
||||||
new GameAction("switchGame", delegate { GameManager.instance.SwitchGame(currentSwitchGame); })
|
new GameAction("switchGame", delegate { GameManager.instance.SwitchGame(currentSwitchGame); })
|
||||||
}),
|
}),
|
||||||
new MiniGame("forkLifter", new List<GameAction>()
|
new MiniGame("forkLifter", "FFFFFF", new List<GameAction>()
|
||||||
{
|
{
|
||||||
new GameAction("pea", delegate { ForkLifter.instance.Flick(currentBeat, 0); }, true ),
|
new GameAction("pea", delegate { ForkLifter.instance.Flick(currentBeat, 0); }, true ),
|
||||||
new GameAction("topbun", delegate { ForkLifter.instance.Flick(currentBeat, 1); }, true ),
|
new GameAction("topbun", delegate { ForkLifter.instance.Flick(currentBeat, 1); }, true ),
|
||||||
|
@ -73,7 +76,7 @@ namespace RhythmHeavenMania
|
||||||
new GameAction("gulp", delegate { ForkLifterPlayer.instance.Eat(); }),
|
new GameAction("gulp", delegate { ForkLifterPlayer.instance.Eat(); }),
|
||||||
new GameAction("sigh", delegate { Jukebox.PlayOneShot("sigh"); })
|
new GameAction("sigh", delegate { Jukebox.PlayOneShot("sigh"); })
|
||||||
}),
|
}),
|
||||||
new MiniGame("clappyTrio", new List<GameAction>()
|
new MiniGame("clappyTrio", "29E7FF", new List<GameAction>()
|
||||||
{
|
{
|
||||||
// Claps
|
// Claps
|
||||||
new GameAction("clap", delegate { ClappyTrio.instance.Clap(currentBeat, currentLength); }, true ),
|
new GameAction("clap", delegate { ClappyTrio.instance.Clap(currentBeat, currentLength); }, true ),
|
||||||
|
@ -83,9 +86,11 @@ namespace RhythmHeavenMania
|
||||||
new GameAction("prepare", delegate { ClappyTrio.instance.Prepare(0); } ),
|
new GameAction("prepare", delegate { ClappyTrio.instance.Prepare(0); } ),
|
||||||
new GameAction("prepare_alt", delegate { ClappyTrio.instance.Prepare(3); } ),
|
new GameAction("prepare_alt", delegate { ClappyTrio.instance.Prepare(3); } ),
|
||||||
}),
|
}),
|
||||||
new MiniGame("spaceball", new List<GameAction>()
|
new MiniGame("spaceball", "00A518", new List<GameAction>()
|
||||||
{
|
{
|
||||||
new GameAction("shoot", delegate { Spaceball.instance.Shoot(currentBeat, currentType); }, true )
|
new GameAction("shoot", delegate { Spaceball.instance.Shoot(currentBeat, false, currentType); }, true ),
|
||||||
|
new GameAction("shootHigh", delegate { Spaceball.instance.Shoot(currentBeat, true, currentType); }, true ),
|
||||||
|
new GameAction("cameraZoom", delegate { Spaceball.instance.CameraZoom(currentBeat, currentLength, currentValA); } ),
|
||||||
})
|
})
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -126,6 +131,7 @@ namespace RhythmHeavenMania
|
||||||
{
|
{
|
||||||
currentLength = GameManager.instance.Beatmap.entities[GameManager.instance.currentEvent].length;
|
currentLength = GameManager.instance.Beatmap.entities[GameManager.instance.currentEvent].length;
|
||||||
currentType = GameManager.instance.Beatmap.entities[GameManager.instance.currentEvent].type;
|
currentType = GameManager.instance.Beatmap.entities[GameManager.instance.currentEvent].type;
|
||||||
|
currentValA = GameManager.instance.Beatmap.entities[GameManager.instance.currentEvent].valA;
|
||||||
|
|
||||||
if (details.Length > 2) currentSwitchGame = details[2];
|
if (details.Length > 2) currentSwitchGame = details[2];
|
||||||
|
|
||||||
|
|
|
@ -25,10 +25,11 @@ namespace RhythmHeavenMania
|
||||||
public float startOffset;
|
public float startOffset;
|
||||||
|
|
||||||
public Camera GameCamera, CursorCam;
|
public Camera GameCamera, CursorCam;
|
||||||
|
public CircleCursor CircleCursor;
|
||||||
|
|
||||||
[Header("Games")]
|
[Header("Games")]
|
||||||
Coroutine currentGameSwitchIE;
|
Coroutine currentGameSwitchIE;
|
||||||
private string currentGame;
|
public string currentGame;
|
||||||
|
|
||||||
|
|
||||||
private void Awake()
|
private void Awake()
|
||||||
|
@ -53,7 +54,7 @@ namespace RhythmHeavenMania
|
||||||
|
|
||||||
StartCoroutine(Begin());
|
StartCoroutine(Begin());
|
||||||
|
|
||||||
currentGame = eventCaller.GamesHolder.GetComponentsInChildren<Transform>()[1].name;
|
SetCurrentGame(eventCaller.GamesHolder.transform.GetComponentsInChildren<Transform>()[1].name);
|
||||||
}
|
}
|
||||||
|
|
||||||
private IEnumerator Begin()
|
private IEnumerator Begin()
|
||||||
|
@ -116,21 +117,37 @@ namespace RhythmHeavenMania
|
||||||
{
|
{
|
||||||
this.GetComponent<SpriteRenderer>().enabled = true;
|
this.GetComponent<SpriteRenderer>().enabled = true;
|
||||||
|
|
||||||
eventCaller.minigames.Find(c => c.name == currentGame).holder.SetActive(false);
|
GetGame(currentGame).holder.GetComponent<Minigame>().OnGameSwitch();
|
||||||
eventCaller.minigames.Find(c => c.name == game).holder.SetActive(true);
|
|
||||||
|
GetGame(currentGame).holder.SetActive(false);
|
||||||
|
GetGame(game).holder.SetActive(true);
|
||||||
|
|
||||||
GameCamera.orthographic = true;
|
GameCamera.orthographic = true;
|
||||||
eventCaller.minigames.Find(c => c.name == game).holder.GetComponent<Minigame>().OnGameSwitch();
|
|
||||||
currentGame = game;
|
GetGame(game).holder.GetComponent<Minigame>().OnGameSwitch();
|
||||||
|
|
||||||
|
SetCurrentGame(game);
|
||||||
|
|
||||||
yield return new WaitForSeconds(0.1666f);
|
yield return new WaitForSeconds(0.1666f);
|
||||||
|
|
||||||
|
|
||||||
this.GetComponent<SpriteRenderer>().enabled = false;
|
this.GetComponent<SpriteRenderer>().enabled = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnGUI()
|
public EventCaller.MiniGame GetGame(string name)
|
||||||
{
|
{
|
||||||
// GUI.Box(new Rect(0, 0, 300, 50), $"SongPosInBeats: {Conductor.instance.songPositionInBeats}");
|
return eventCaller.minigames.Find(c => c.name == name);
|
||||||
|
}
|
||||||
|
|
||||||
|
// never gonna use this
|
||||||
|
public EventCaller.MiniGame GetCurrentGame()
|
||||||
|
{
|
||||||
|
return eventCaller.minigames.Find(c => c.name == transform.GetComponentsInChildren<Transform>()[1].name);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetCurrentGame(string game)
|
||||||
|
{
|
||||||
|
currentGame = game;
|
||||||
|
CircleCursor.InnerCircle.GetComponent<SpriteRenderer>().color = Colors.Hex2RGB(GetGame(currentGame).color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -37,6 +37,7 @@ namespace RhythmHeavenMania.Games.ForkLifter
|
||||||
{
|
{
|
||||||
ForkLifterHand.CheckNextFlick();
|
ForkLifterHand.CheckNextFlick();
|
||||||
ForkLifterPlayer.instance.RemoveObjFromFork();
|
ForkLifterPlayer.instance.RemoveObjFromFork();
|
||||||
|
ForkLifterHand.GetComponent<Animator>().Play("Hand_Idle", 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Start()
|
private void Start()
|
||||||
|
|
|
@ -50,7 +50,7 @@ namespace RhythmHeavenMania.Games.ForkLifter
|
||||||
public void Prepare()
|
public void Prepare()
|
||||||
{
|
{
|
||||||
Jukebox.PlayOneShotGame("forkLifter/flickPrepare");
|
Jukebox.PlayOneShotGame("forkLifter/flickPrepare");
|
||||||
GetComponent<Animator>().Play("Hand_Prepare");
|
GetComponent<Animator>().Play("Hand_Prepare", 0, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -14,6 +14,14 @@ namespace RhythmHeavenMania.Games.Spaceball
|
||||||
public GameObject Dispenser;
|
public GameObject Dispenser;
|
||||||
public GameObject Dust;
|
public GameObject Dust;
|
||||||
|
|
||||||
|
private float lastCamDistance;
|
||||||
|
private bool zoomingCamera = false;
|
||||||
|
private float lastZoomCamBeat;
|
||||||
|
private float lastZoomCamLength;
|
||||||
|
private float lastZoomCamDistance;
|
||||||
|
|
||||||
|
public Sprite[] Balls;
|
||||||
|
|
||||||
public static Spaceball instance { get; set; }
|
public static Spaceball instance { get; set; }
|
||||||
|
|
||||||
public override void OnGameSwitch()
|
public override void OnGameSwitch()
|
||||||
|
@ -21,6 +29,7 @@ namespace RhythmHeavenMania.Games.Spaceball
|
||||||
for (int i = 1; i < BallsHolder.transform.childCount; i++)
|
for (int i = 1; i < BallsHolder.transform.childCount; i++)
|
||||||
Destroy(BallsHolder.transform.GetChild(i).gameObject);
|
Destroy(BallsHolder.transform.GetChild(i).gameObject);
|
||||||
GameManager.instance.GameCamera.orthographic = false;
|
GameManager.instance.GameCamera.orthographic = false;
|
||||||
|
SpaceballPlayer.instance.EligibleHits.RemoveRange(0, SpaceballPlayer.instance.EligibleHits.Count);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Awake()
|
private void Awake()
|
||||||
|
@ -40,15 +49,40 @@ namespace RhythmHeavenMania.Games.Spaceball
|
||||||
Dispenser.GetComponent<Animator>().Play("DispenserPrepare", 0, 0);
|
Dispenser.GetComponent<Animator>().Play("DispenserPrepare", 0, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (zoomingCamera)
|
||||||
|
{
|
||||||
|
float normalizedBeat = Conductor.instance.GetLoopPositionFromBeat(lastZoomCamBeat, lastZoomCamLength);
|
||||||
|
float newPosZ = Mathf.Lerp(lastCamDistance, lastZoomCamDistance, normalizedBeat);
|
||||||
|
GameManager.instance.GameCamera.transform.localPosition = new Vector3(0, 0, newPosZ);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Shoot(float beat, string type)
|
|
||||||
|
public void CameraZoom(float beat, float length, float distance)
|
||||||
|
{
|
||||||
|
lastZoomCamBeat = beat;
|
||||||
|
lastZoomCamLength = length;
|
||||||
|
|
||||||
|
float dist = distance;
|
||||||
|
dist = dist * -1;
|
||||||
|
|
||||||
|
if (dist > 0)
|
||||||
|
lastZoomCamDistance = 0;
|
||||||
|
else
|
||||||
|
lastZoomCamDistance = dist;
|
||||||
|
|
||||||
|
zoomingCamera = true;
|
||||||
|
lastCamDistance = GameManager.instance.GameCamera.transform.localPosition.z;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Shoot(float beat, bool high, string type)
|
||||||
{
|
{
|
||||||
GameObject ball = Instantiate(Ball);
|
GameObject ball = Instantiate(Ball);
|
||||||
ball.transform.parent = Ball.transform.parent;
|
ball.transform.parent = Ball.transform.parent;
|
||||||
ball.SetActive(true);
|
ball.SetActive(true);
|
||||||
ball.GetComponent<SpaceballBall>().startBeat = beat;
|
ball.GetComponent<SpaceballBall>().startBeat = beat;
|
||||||
if (type == "high")
|
if (high)
|
||||||
{
|
{
|
||||||
ball.GetComponent<SpaceballBall>().high = true;
|
ball.GetComponent<SpaceballBall>().high = true;
|
||||||
Jukebox.PlayOneShotGame("spaceball/longShoot");
|
Jukebox.PlayOneShotGame("spaceball/longShoot");
|
||||||
|
@ -58,6 +92,11 @@ namespace RhythmHeavenMania.Games.Spaceball
|
||||||
Jukebox.PlayOneShotGame("spaceball/shoot");
|
Jukebox.PlayOneShotGame("spaceball/shoot");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (type == "riceball")
|
||||||
|
{
|
||||||
|
ball.GetComponent<SpaceballBall>().Sprite.sprite = Balls[1];
|
||||||
|
}
|
||||||
|
|
||||||
Dispenser.GetComponent<Animator>().Play("DispenserShoot", 0, 0);
|
Dispenser.GetComponent<Animator>().Play("DispenserShoot", 0, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,7 @@ namespace RhythmHeavenMania.Games.Spaceball
|
||||||
private Minigame.Eligible e = new Minigame.Eligible();
|
private Minigame.Eligible e = new Minigame.Eligible();
|
||||||
|
|
||||||
public GameObject Holder;
|
public GameObject Holder;
|
||||||
|
public SpriteRenderer Sprite;
|
||||||
|
|
||||||
private void Start()
|
private void Start()
|
||||||
{
|
{
|
||||||
|
@ -31,7 +32,7 @@ namespace RhythmHeavenMania.Games.Spaceball
|
||||||
float beatLength = 1f;
|
float beatLength = 1f;
|
||||||
if (high) beatLength = 2f;
|
if (high) beatLength = 2f;
|
||||||
|
|
||||||
float normalizedBeatAnim = Conductor.instance.GetLoopPositionFromBeat(startBeat, beatLength + 0.25f);
|
float normalizedBeatAnim = Conductor.instance.GetLoopPositionFromBeat(startBeat, beatLength + 0.2f);
|
||||||
|
|
||||||
if (high)
|
if (high)
|
||||||
anim.Play("BallHigh", -1, normalizedBeatAnim);
|
anim.Play("BallHigh", -1, normalizedBeatAnim);
|
||||||
|
@ -63,8 +64,8 @@ namespace RhythmHeavenMania.Games.Spaceball
|
||||||
}
|
}
|
||||||
|
|
||||||
// too lazy to make a proper fix for this
|
// too lazy to make a proper fix for this
|
||||||
float endTime = 1.25f;
|
float endTime = 1.2f;
|
||||||
if (high) endTime = 1.15f;
|
if (high) endTime = 1.1f;
|
||||||
|
|
||||||
if (normalizedBeat > endTime)
|
if (normalizedBeat > endTime)
|
||||||
{
|
{
|
||||||
|
|
|
@ -51,7 +51,8 @@ namespace RhythmHeavenMania.Util
|
||||||
|
|
||||||
public static void PlayOneShotGame(string name)
|
public static void PlayOneShotGame(string name)
|
||||||
{
|
{
|
||||||
PlayOneShot($"games/{name}");
|
if (GameManager.instance.currentGame == name.Split('/')[0])
|
||||||
|
PlayOneShot($"games/{name}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,8 +3,21 @@
|
||||||
"entities": [
|
"entities": [
|
||||||
{
|
{
|
||||||
"beat": 4,
|
"beat": 4,
|
||||||
|
"type": "riceball",
|
||||||
"datamodel": "spaceball/shoot"
|
"datamodel": "spaceball/shoot"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"beat": 4,
|
||||||
|
"length": 42,
|
||||||
|
"valA": 30,
|
||||||
|
"datamodel": "spaceball/cameraZoom"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"beat": 44,
|
||||||
|
"length": 2,
|
||||||
|
"valA": 170,
|
||||||
|
"datamodel": "spaceball/cameraZoom"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"beat": 6,
|
"beat": 6,
|
||||||
"datamodel": "spaceball/shoot"
|
"datamodel": "spaceball/shoot"
|
||||||
|
@ -40,8 +53,57 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"beat": 22,
|
"beat": 22,
|
||||||
"type": "high",
|
"type": "riceball",
|
||||||
|
"datamodel": "spaceball/shootHigh"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"beat": 26,
|
||||||
"datamodel": "spaceball/shoot"
|
"datamodel": "spaceball/shoot"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"beat": 28,
|
||||||
|
"type": "high",
|
||||||
|
"datamodel": "spaceball/shootHigh"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"beat": 28,
|
||||||
|
"datamodel": "spaceball/shoot"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"beat": 28,
|
||||||
|
"datamodel": "forkLifter/pea"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"beat": 29.5,
|
||||||
|
"datamodel": "gameManager/switchGame/forkLifter"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"beat": 32,
|
||||||
|
"datamodel": "gameManager/switchGame/spaceball"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"beat": 34,
|
||||||
|
"datamodel": "spaceball/shoot"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"beat": 36,
|
||||||
|
"datamodel": "spaceball/shoot"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"beat": 38,
|
||||||
|
"datamodel": "spaceball/shoot"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"beat": 40,
|
||||||
|
"datamodel": "spaceball/shoot"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"beat": 42,
|
||||||
|
"datamodel": "spaceball/shoot"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"beat": 44,
|
||||||
|
"datamodel": "spaceball/shootHigh"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
Loading…
Reference in a new issue