change: fixing of many issues in handler, deprecation/deletion of variables, cleanup of UnitMovementHandler, cleaning up of inspector
This commit is contained in:
@@ -1,37 +1,8 @@
|
||||
using System;
|
||||
using Reset.Core;
|
||||
using Sirenix.OdinInspector;
|
||||
using Unity.Cinemachine;
|
||||
using UnityEngine;
|
||||
|
||||
public struct CameraSettingData : ICloneable{
|
||||
public SettingValue<float> mainFieldOfView;
|
||||
|
||||
public SettingValue<Vector3> orbitPositionDamping;
|
||||
public SettingValue<Vector3> orbitTargetOffset;
|
||||
|
||||
public SettingValue<bool> axisLookEnabledX;
|
||||
public SettingValue<bool> axisLookEnabledY;
|
||||
|
||||
public SettingValue<float> axisLookGainX;
|
||||
public SettingValue<float> axisLookGainY;
|
||||
|
||||
public SettingValue<float> orbitFollowTopHeight;
|
||||
public SettingValue<float> orbitFollowTopRadius;
|
||||
public SettingValue<float> orbitFollowCenterHeight;
|
||||
public SettingValue<float> orbitFollowCenterRadius;
|
||||
public SettingValue<float> orbitFollowBottomHeight;
|
||||
public SettingValue<float> orbitFollowBottomRadius;
|
||||
|
||||
public SettingValue<Vector2> rotationComposerScreenPos;
|
||||
|
||||
public SettingValue<Vector3> cameraOffsetOffset;
|
||||
|
||||
public object Clone(){
|
||||
return MemberwiseClone();
|
||||
}
|
||||
}
|
||||
|
||||
public class CameraSettingsProcessor : MonoBehaviour{
|
||||
public static CameraSettingsProcessor Instance{ get; private set; }
|
||||
|
||||
@@ -89,7 +60,7 @@ public class CameraSettingsProcessor : MonoBehaviour{
|
||||
|
||||
data.rotationComposerScreenPos.targetValue = rotComp.Composition.ScreenPosition;
|
||||
data.cameraOffsetOffset.targetValue = offset.Offset;
|
||||
|
||||
|
||||
// And copy to the original
|
||||
original = (CameraSettingData)data.Clone();
|
||||
}
|
||||
@@ -142,4 +113,13 @@ public class CameraSettingsProcessor : MonoBehaviour{
|
||||
|
||||
offset.Offset = data.cameraOffsetOffset.Value;
|
||||
}
|
||||
|
||||
[Button]
|
||||
void InitializeAllSettings(){
|
||||
var allSettings = data.GetAllSettings();
|
||||
for (int i = 0; i < allSettings.Count; i++) {
|
||||
allSettings[i].Initialize();
|
||||
allSettings[i].Verify();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user