This commit is contained in:
fu-majime 2024-04-10 08:27:17 +09:00
parent a71e211c3b
commit 156997425b
5 changed files with 163 additions and 93 deletions

View file

@ -286,6 +286,39 @@ SpriteRenderer:
m_WasSpriteAssigned: 1 m_WasSpriteAssigned: 1
m_MaskInteraction: 0 m_MaskInteraction: 0
m_SpriteSortPoint: 0 m_SpriteSortPoint: 0
--- !u!1 &789588272241029949
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 388198374454737866}
m_Layer: 0
m_Name: CameraPosition
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &388198374454737866
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 789588272241029949}
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: 1456846289975751900}
- {fileID: 7473549872959051133}
m_Father: {fileID: 5813499711186931250}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &967808775455514862 --- !u!1 &967808775455514862
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -370,6 +403,37 @@ SpriteRenderer:
m_WasSpriteAssigned: 1 m_WasSpriteAssigned: 1
m_MaskInteraction: 0 m_MaskInteraction: 0
m_SpriteSortPoint: 0 m_SpriteSortPoint: 0
--- !u!1 &1512593904198044229
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7473549872959051133}
m_Layer: 0
m_Name: CameraPOVNear
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &7473549872959051133
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1512593904198044229}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 3.16, z: -2.5}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 388198374454737866}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1530308677217274733 --- !u!1 &1530308677217274733
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -454,90 +518,6 @@ SpriteRenderer:
m_WasSpriteAssigned: 1 m_WasSpriteAssigned: 1
m_MaskInteraction: 0 m_MaskInteraction: 0
m_SpriteSortPoint: 0 m_SpriteSortPoint: 0
--- !u!1 &1647682820151985809
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1597452148325669458}
- component: {fileID: 2157800002452541002}
m_Layer: 0
m_Name: ref
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
--- !u!4 &1597452148325669458
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1647682820151985809}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1.3888888, y: 1.388889, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 5813499711186931250}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!212 &2157800002452541002
SpriteRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1647682820151985809}
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: 1961
m_Sprite: {fileID: 21300000, guid: e5c3f37161476f8429ca18f6e4b22d74, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 0.65882355}
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 &1677706708810515850 --- !u!1 &1677706708810515850
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -563,7 +543,7 @@ Transform:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1677706708810515850} m_GameObject: {fileID: 1677706708810515850}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -6.37, y: -3.55, z: 0} m_LocalPosition: {x: -6.37, y: -3.6, z: 0}
m_LocalScale: {x: 2.15, y: 2.15, z: 2.15} m_LocalScale: {x: 2.15, y: 2.15, z: 2.15}
m_ConstrainProportionsScale: 1 m_ConstrainProportionsScale: 1
m_Children: m_Children:
@ -1859,7 +1839,7 @@ Transform:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3897180064379191413} m_GameObject: {fileID: 3897180064379191413}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 2.6, z: 0} m_LocalPosition: {x: 0, y: 2.5, z: 0}
m_LocalScale: {x: 2.15, y: 2.15, z: 2.15} m_LocalScale: {x: 2.15, y: 2.15, z: 2.15}
m_ConstrainProportionsScale: 1 m_ConstrainProportionsScale: 1
m_Children: [] m_Children: []
@ -2423,6 +2403,37 @@ SpriteRenderer:
m_WasSpriteAssigned: 1 m_WasSpriteAssigned: 1
m_MaskInteraction: 0 m_MaskInteraction: 0
m_SpriteSortPoint: 0 m_SpriteSortPoint: 0
--- !u!1 &4676519879196160375
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1456846289975751900}
m_Layer: 0
m_Name: CameraPOVFar
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1456846289975751900
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4676519879196160375}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: -10}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 388198374454737866}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &4708590086296941672 --- !u!1 &4708590086296941672
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -2448,7 +2459,7 @@ Transform:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4708590086296941672} m_GameObject: {fileID: 4708590086296941672}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 2.85, z: 0} m_LocalPosition: {x: 0, y: 2.65, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: m_Children:
@ -2934,7 +2945,7 @@ Transform:
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: m_Children:
- {fileID: 9061701609461501601} - {fileID: 9061701609461501601}
- {fileID: 1597452148325669458} - {fileID: 388198374454737866}
- {fileID: 8089933404275364030} - {fileID: 8089933404275364030}
- {fileID: 3796399451338504015} - {fileID: 3796399451338504015}
- {fileID: 8253104053543559283} - {fileID: 8253104053543559283}
@ -2961,6 +2972,9 @@ MonoBehaviour:
girlLeftAnim: {fileID: 6192695431832796514} girlLeftAnim: {fileID: 6192695431832796514}
girlRightAnim: {fileID: 66317316438045827} girlRightAnim: {fileID: 66317316438045827}
goalAnim: {fileID: 9089251421432992824} goalAnim: {fileID: 9089251421432992824}
CameraPosition:
- {fileID: 1456846289975751900}
- {fileID: 7473549872959051133}
BGPlane: {fileID: 8901463518339414129} BGPlane: {fileID: 8901463518339414129}
--- !u!1 &5899487115088411623 --- !u!1 &5899487115088411623
GameObject: GameObject:
@ -3967,7 +3981,7 @@ Transform:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7779652374659991824} m_GameObject: {fileID: 7779652374659991824}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: -0.72, z: 0} m_LocalPosition: {x: 0, y: -0.7, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: [] m_Children: []

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

View file

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: e5c3f37161476f8429ca18f6e4b22d74 guid: cf10f3090541aeb459a06bdefc3e35dd
TextureImporter: TextureImporter:
internalIDToNameTable: [] internalIDToNameTable: []
externalObjects: {} externalObjects: {}
@ -33,7 +33,7 @@ TextureImporter:
maxTextureSize: 2048 maxTextureSize: 2048
textureSettings: textureSettings:
serializedVersion: 2 serializedVersion: 2
filterMode: 1 filterMode: 2
aniso: 1 aniso: 1
mipBias: 0 mipBias: 0
wrapU: 1 wrapU: 1
@ -67,10 +67,10 @@ TextureImporter:
platformSettings: platformSettings:
- serializedVersion: 3 - serializedVersion: 3
buildTarget: DefaultTexturePlatform buildTarget: DefaultTexturePlatform
maxTextureSize: 2048 maxTextureSize: 256
resizeAlgorithm: 0 resizeAlgorithm: 0
textureFormat: -1 textureFormat: -1
textureCompression: 1 textureCompression: 0
compressionQuality: 50 compressionQuality: 50
crunchedCompression: 0 crunchedCompression: 0
allowsAlphaSplitting: 0 allowsAlphaSplitting: 0

Binary file not shown.

Before

Width:  |  Height:  |  Size: 532 KiB

View file

@ -33,6 +33,17 @@ namespace HeavenStudio.Games.Loaders
function = delegate {var e = eventCaller.currentEntity; BasketballGirls.instance.SpawnBall(e.beat); }, function = delegate {var e = eventCaller.currentEntity; BasketballGirls.instance.SpawnBall(e.beat); },
defaultLength = 2f, defaultLength = 2f,
}, },
new GameAction("zoom", "Zoom In/Out")
{
function = delegate { var e = eventCaller.currentEntity; BasketballGirls.instance.ToggleZoom(e.beat, e.length, e["ease"], e["toggle"]);},
defaultLength = 4f,
resizable = true,
parameters = new List<Param>()
{
new Param("toggle", true, "Zoom In", "Toggle if the camera should zoom in."),
new Param("ease", Util.EasingFunction.Ease.Linear, "Ease", "Set the easing of the action."),
}
},
new GameAction("background appearance", "Background Appearance") new GameAction("background appearance", "Background Appearance")
{ {
function = delegate { function = delegate {
@ -69,6 +80,12 @@ namespace HeavenStudio.Games
girlRightNoBopIntervals = new(); girlRightNoBopIntervals = new();
public Animator goalAnim; public Animator goalAnim;
public Transform[] CameraPosition;
double cameraMoveBeat = double.MaxValue;
double cameraMoveLength;
Util.EasingFunction.Ease cameraMoveEase;
bool cameraMoveIn;
[SerializeField] private SpriteRenderer BGPlane; [SerializeField] private SpriteRenderer BGPlane;
private ColorEase bgColorEase = new(new Color(1f, 0.937f, 0.224f)); private ColorEase bgColorEase = new(new Color(1f, 0.937f, 0.224f));
@ -112,6 +129,7 @@ namespace HeavenStudio.Games
} }
} }
UpdateCamera(cond.songPositionInBeatsAsDouble);
UpdateBackgroundColor(); UpdateBackgroundColor();
} }
} }
@ -175,6 +193,44 @@ namespace HeavenStudio.Games
}); });
} }
public void ToggleZoom(double beat, double length, int ease, bool toggle)
{
cameraMoveBeat = beat;
cameraMoveLength = length;
cameraMoveEase = (Util.EasingFunction.Ease)ease;
cameraMoveIn = toggle;
}
private void UpdateCamera(double beat)
{
Vector3 cameraPosition;
if (beat >= cameraMoveBeat)
{
Util.EasingFunction.Function func = Util.EasingFunction.GetEasingFunction(cameraMoveEase);
float prog = conductor.GetPositionFromBeat(cameraMoveBeat, cameraMoveLength, true);
prog = Mathf.Clamp01(prog);
if (cameraMoveIn)
{
cameraPosition.x = func(CameraPosition[0].position.x, CameraPosition[1].position.x, prog);
cameraPosition.y = func(CameraPosition[0].position.y, CameraPosition[1].position.y, prog);
cameraPosition.z = func(CameraPosition[0].position.z, CameraPosition[1].position.z, prog);
}
else
{
cameraPosition.x = func(CameraPosition[1].position.x, CameraPosition[0].position.x, prog);
cameraPosition.y = func(CameraPosition[1].position.y, CameraPosition[0].position.y, prog);
cameraPosition.z = func(CameraPosition[1].position.z, CameraPosition[0].position.z, prog);
}
}
else
{
if (cameraMoveIn) cameraPosition = CameraPosition[1].position;
else cameraPosition = CameraPosition[0].position;
}
GameCamera.AdditionalPosition = cameraPosition - GameCamera.defaultPosition;
}
public void BackgroundColorSet(double beat, float length, Color BGStart, Color BGEnd, int colorEaseSet) public void BackgroundColorSet(double beat, float length, Color BGStart, Color BGEnd, int colorEaseSet)
{ {
bgColorEase = new(beat, length, BGStart, BGEnd, colorEaseSet); bgColorEase = new(beat, length, BGStart, BGEnd, colorEaseSet);