@@ -11,7 +11,7 @@ namespace Ichni.RhythmGame
|
||||
{
|
||||
public FlexibleFloat fieldOfView;
|
||||
public GameCamera targetGameCamera;
|
||||
|
||||
|
||||
public static CameraFieldOfView GenerateElement(string elementName, Guid id,
|
||||
List<string> tags, bool isFirstGenerated, GameCamera gameCamera, FlexibleFloat fieldOfView)
|
||||
{
|
||||
@@ -21,13 +21,13 @@ namespace Ichni.RhythmGame
|
||||
|
||||
camFOV.animatedObject = gameCamera;
|
||||
camFOV.targetGameCamera = gameCamera;
|
||||
|
||||
|
||||
camFOV.fieldOfView = fieldOfView;
|
||||
camFOV.animationReturnType = FlexibleReturnType.Before;
|
||||
|
||||
return camFOV;
|
||||
}
|
||||
|
||||
|
||||
public override void SetDefaultSubmodules()
|
||||
{
|
||||
timeDurationSubmodule = new TimeDurationSubmodule(this);
|
||||
@@ -42,8 +42,29 @@ namespace Ichni.RhythmGame
|
||||
targetGameCamera.perspectiveAngle = fieldOfView.value;
|
||||
targetGameCamera.gameCamera.fieldOfView = fieldOfView.value;
|
||||
}
|
||||
else if (fieldOfView.isSwitchingReturnType)
|
||||
{
|
||||
animationReturnType = FlexibleReturnType.MiddleExecuting;
|
||||
targetGameCamera.perspectiveAngle = fieldOfView.value;
|
||||
targetGameCamera.gameCamera.fieldOfView = fieldOfView.value;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!EditorManager.instance.musicPlayer.isPlaying && animationReturnType != FlexibleReturnType.MiddleInterval)
|
||||
{
|
||||
targetGameCamera.perspectiveAngle = fieldOfView.value;
|
||||
targetGameCamera.gameCamera.fieldOfView = fieldOfView.value;
|
||||
animationReturnType = FlexibleReturnType.After;
|
||||
}
|
||||
else
|
||||
{
|
||||
targetGameCamera.perspectiveAngle = fieldOfView.value;
|
||||
targetGameCamera.gameCamera.fieldOfView = fieldOfView.value;
|
||||
animationReturnType = FlexibleReturnType.Before;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public override void ApplyTimeOffset(float offset)
|
||||
{
|
||||
base.ApplyTimeOffset(offset);
|
||||
@@ -57,7 +78,7 @@ namespace Ichni.RhythmGame
|
||||
{
|
||||
matchedBM = new CameraFieldOfView_BM(elementName, elementGuid, tags, targetGameCamera.matchedBM as GameCamera_BM, fieldOfView.ConvertToBM());
|
||||
}
|
||||
|
||||
|
||||
public override void SetUpInspector()
|
||||
{
|
||||
base.SetUpInspector();
|
||||
@@ -79,9 +100,9 @@ namespace Ichni.RhythmGame
|
||||
|
||||
public CameraFieldOfView_BM()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public CameraFieldOfView_BM(string elementName, Guid elementGuid, List<string> tags,
|
||||
GameElement_BM attachedElement, FlexibleFloat_BM fieldOfView)
|
||||
: base(elementName, elementGuid, tags, attachedElement)
|
||||
@@ -91,10 +112,10 @@ namespace Ichni.RhythmGame
|
||||
|
||||
public override void ExecuteBM()
|
||||
{
|
||||
matchedElement = CameraFieldOfView.GenerateElement(elementName, elementGuid, tags, false,
|
||||
GetElement(attachedElementGuid) as GameCamera, fieldOfView.ConvertToGameType());
|
||||
matchedElement = CameraFieldOfView.GenerateElement(elementName, elementGuid, tags, false,
|
||||
GetElement(attachedElementGuid) as GameCamera, fieldOfView.ConvertToGameType());
|
||||
}
|
||||
|
||||
|
||||
public override GameElement DuplicateBM(GameElement parent)
|
||||
{
|
||||
return CameraFieldOfView.GenerateElement(elementName, Guid.NewGuid(), tags, false,
|
||||
|
||||
Reference in New Issue
Block a user