Added camera zoom

This commit is contained in:
Carson Kompon 2022-02-28 15:43:32 -05:00
parent ed57295e9d
commit 594158cee3
3 changed files with 7 additions and 4 deletions

View file

@ -865,6 +865,7 @@ MonoBehaviour:
eligibleHitsList: []
aceTimes: 0
isEligible: 0
triggersAutoplay: 1
--- !u!1 &3340141389927785323
GameObject:
m_ObjectHideFlags: 0
@ -1739,7 +1740,6 @@ MonoBehaviour:
EligibleHits: []
firstEnable: 0
renderQuadTrans: {fileID: 743597382397742394}
cameraPos: {fileID: 6509993024069972873}
cameraPivot: {fileID: 5472155158897914726}
ball: {fileID: 1668061868608559892}
ballShadow: {fileID: 7207398029238753263}

View file

@ -341,9 +341,11 @@ namespace RhythmHeavenMania.Games.RhythmRally
inPose = true;
}
public void ChangeCameraAngle(Vector3 rotation, float length, Ease ease, RotateMode rotateMode)
public void ChangeCameraAngle(Vector3 rotation, float camZoom, float length, Ease ease, RotateMode rotateMode)
{
cameraPivot.DORotate(rotation, length * Conductor.instance.secPerBeat, rotateMode).SetEase(ease);
var len = length * Conductor.instance.secPerBeat;
cameraPivot.DORotate(rotation, len, rotateMode).SetEase(ease);
cameraPivot.DOScale(camZoom, len).SetEase(ease);
}
public void PrepareFastRally(float beat, RallySpeed speedChange)

View file

@ -330,9 +330,10 @@ namespace RhythmHeavenMania
new GameAction("camera", delegate {
var e = eventCaller.currentEntity;
var rotation = new Vector3(0, e.valA, 0);
RhythmRally.instance.ChangeCameraAngle(rotation, e.length, (Ease)e.type, (RotateMode)e.type2);
RhythmRally.instance.ChangeCameraAngle(rotation, e.valB, e.length, (Ease)e.type, (RotateMode)e.type2);
}, 4, true, new List<Param>() {
new Param("valA", new EntityTypes.Integer(-360, 360, 0), "Angle"),
new Param("valB", new EntityTypes.Float(0.5f, 4f, 1), "Zoom"),
new Param("type", Ease.Linear, "Ease"),
new Param("type2", RotateMode.Fast, "Rotation Mode")
} ),