Def load selection and basic def alteration
| 
						 | 
				
			
			@ -77,13 +77,24 @@
 | 
			
		|||
    <Compile Include="Assets\Scripts\AnimationComponents\KeyFrames\PawnKeyframe.cs" />
 | 
			
		||||
    <Compile Include="Assets\Scripts\AnimationComponents\KeyFrames\ThingKeyFrame.cs" />
 | 
			
		||||
    <Compile Include="Assets\Scripts\AnimationController.cs" />
 | 
			
		||||
    <Compile Include="Assets\Scripts\AnimationDefCard.cs" />
 | 
			
		||||
    <Compile Include="Assets\Scripts\ApplicationManager.cs" />
 | 
			
		||||
    <Compile Include="Assets\Scripts\CameraController.cs" />
 | 
			
		||||
    <Compile Include="Assets\Scripts\CurvePoint.cs" />
 | 
			
		||||
    <Compile Include="Assets\Scripts\Defs.cs" />
 | 
			
		||||
    <Compile Include="Assets\Scripts\DialogBox.cs" />
 | 
			
		||||
    <Compile Include="Assets\Scripts\Enums.cs" />
 | 
			
		||||
    <Compile Include="Assets\Scripts\DialogBoxes\DialogBox.cs" />
 | 
			
		||||
    <Compile Include="Assets\Scripts\DialogBoxes\SelectAnimationDialog.cs" />
 | 
			
		||||
    <Compile Include="Assets\Scripts\DialogBoxes\SelectBodyDefTypesDialog.cs" />
 | 
			
		||||
    <Compile Include="Assets\Scripts\DialogBoxes\SelectBodyPartsDialog.cs" />
 | 
			
		||||
    <Compile Include="Assets\Scripts\DialogBoxes\SelectDefNamesDialog.cs" />
 | 
			
		||||
    <Compile Include="Assets\Scripts\DialogBoxes\SelectInteractionDefsDialog.cs" />
 | 
			
		||||
    <Compile Include="Assets\Scripts\DialogBoxes\SelectSexTypesDialog.cs" />
 | 
			
		||||
    <Compile Include="Assets\Scripts\Extensions\IListExtensions.cs" />
 | 
			
		||||
    <Compile Include="Assets\Scripts\Extensions\TransformExtensions.cs" />
 | 
			
		||||
    <Compile Include="Assets\Scripts\GenMath.cs" />
 | 
			
		||||
    <Compile Include="Assets\Scripts\PawnUtility.cs" />
 | 
			
		||||
    <Compile Include="Assets\Scripts\SimpleCurve.cs" />
 | 
			
		||||
    <Compile Include="Assets\Scripts\Singleton.cs" />
 | 
			
		||||
    <Compile Include="Assets\Scripts\StandaloneFileBrowser\IStandaloneFileBrowser.cs" />
 | 
			
		||||
    <Compile Include="Assets\Scripts\StandaloneFileBrowser\Sample\BasicSample.cs" />
 | 
			
		||||
    <Compile Include="Assets\Scripts\StandaloneFileBrowser\Sample\CanvasSampleOpenFileImage.cs" />
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										8
									
								
								Assets/Resources/Materials.meta
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
						 | 
				
			
			@ -0,0 +1,8 @@
 | 
			
		|||
fileFormatVersion: 2
 | 
			
		||||
guid: 7204be46978676a47952e9bc34298f49
 | 
			
		||||
folderAsset: yes
 | 
			
		||||
DefaultImporter:
 | 
			
		||||
  externalObjects: {}
 | 
			
		||||
  userData: 
 | 
			
		||||
  assetBundleName: 
 | 
			
		||||
  assetBundleVariant: 
 | 
			
		||||
							
								
								
									
										85
									
								
								Assets/Resources/Materials/LineMaterial.mat
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
						 | 
				
			
			@ -0,0 +1,85 @@
 | 
			
		|||
%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: LineMaterial
 | 
			
		||||
  m_Shader: {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0}
 | 
			
		||||
  m_ShaderKeywords: 
 | 
			
		||||
  m_LightmapFlags: 4
 | 
			
		||||
  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: 0}
 | 
			
		||||
        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
 | 
			
		||||
    - _BumpScale: 1
 | 
			
		||||
    - _Cutoff: 0.5
 | 
			
		||||
    - _DetailNormalMapScale: 1
 | 
			
		||||
    - _DstBlend: 0
 | 
			
		||||
    - _EnableExternalAlpha: 0
 | 
			
		||||
    - _GlossMapScale: 1
 | 
			
		||||
    - _Glossiness: 0.5
 | 
			
		||||
    - _GlossyReflections: 1
 | 
			
		||||
    - _Metallic: 0
 | 
			
		||||
    - _Mode: 0
 | 
			
		||||
    - _OcclusionStrength: 1
 | 
			
		||||
    - _Parallax: 0.02
 | 
			
		||||
    - _SmoothnessTextureChannel: 0
 | 
			
		||||
    - _SpecularHighlights: 1
 | 
			
		||||
    - _SrcBlend: 1
 | 
			
		||||
    - _UVSec: 0
 | 
			
		||||
    - _ZWrite: 1
 | 
			
		||||
    m_Colors:
 | 
			
		||||
    - _Color: {r: 0.5, g: 0.5, b: 0.5, a: 1}
 | 
			
		||||
    - _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}
 | 
			
		||||
							
								
								
									
										8
									
								
								Assets/Resources/Materials/LineMaterial.mat.meta
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
						 | 
				
			
			@ -0,0 +1,8 @@
 | 
			
		|||
fileFormatVersion: 2
 | 
			
		||||
guid: f0b171738be0e714ca9172d3b464274a
 | 
			
		||||
NativeFormatImporter:
 | 
			
		||||
  externalObjects: {}
 | 
			
		||||
  mainObjectFileID: 2100000
 | 
			
		||||
  userData: 
 | 
			
		||||
  assetBundleName: 
 | 
			
		||||
  assetBundleVariant: 
 | 
			
		||||
| 
						 | 
				
			
			@ -67,8 +67,8 @@ SpriteRenderer:
 | 
			
		|||
  m_AutoUVMaxDistance: 0.5
 | 
			
		||||
  m_AutoUVMaxAngle: 89
 | 
			
		||||
  m_LightmapParameters: {fileID: 0}
 | 
			
		||||
  m_SortingLayerID: -975737453
 | 
			
		||||
  m_SortingLayer: 1
 | 
			
		||||
  m_SortingLayerID: -2115984483
 | 
			
		||||
  m_SortingLayer: 22
 | 
			
		||||
  m_SortingOrder: 1
 | 
			
		||||
  m_Sprite: {fileID: 0}
 | 
			
		||||
  m_Color: {r: 1, g: 1, b: 1, a: 1}
 | 
			
		||||
| 
						 | 
				
			
			@ -150,8 +150,8 @@ SpriteRenderer:
 | 
			
		|||
  m_AutoUVMaxDistance: 0.5
 | 
			
		||||
  m_AutoUVMaxAngle: 89
 | 
			
		||||
  m_LightmapParameters: {fileID: 0}
 | 
			
		||||
  m_SortingLayerID: -975737453
 | 
			
		||||
  m_SortingLayer: 1
 | 
			
		||||
  m_SortingLayerID: -2115984483
 | 
			
		||||
  m_SortingLayer: 22
 | 
			
		||||
  m_SortingOrder: 0
 | 
			
		||||
  m_Sprite: {fileID: 0}
 | 
			
		||||
  m_Color: {r: 1, g: 1, b: 1, a: 1}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										3644
									
								
								Assets/Resources/Prefabs/ActorCard Orig.prefab
									
										
									
									
									
										Normal file
									
								
							
							
						
						
							
								
								
									
										7
									
								
								Assets/Resources/Prefabs/ActorCard Orig.prefab.meta
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
						 | 
				
			
			@ -0,0 +1,7 @@
 | 
			
		|||
fileFormatVersion: 2
 | 
			
		||||
guid: 03afc196af1cd0d48acaf5d63fa41039
 | 
			
		||||
PrefabImporter:
 | 
			
		||||
  externalObjects: {}
 | 
			
		||||
  userData: 
 | 
			
		||||
  assetBundleName: 
 | 
			
		||||
  assetBundleVariant: 
 | 
			
		||||
							
								
								
									
										220
									
								
								Assets/Resources/Prefabs/OptionButton.prefab
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
						 | 
				
			
			@ -0,0 +1,220 @@
 | 
			
		|||
%YAML 1.1
 | 
			
		||||
%TAG !u! tag:unity3d.com,2011:
 | 
			
		||||
--- !u!1 &999942642962796566
 | 
			
		||||
GameObject:
 | 
			
		||||
  m_ObjectHideFlags: 0
 | 
			
		||||
  m_CorrespondingSourceObject: {fileID: 0}
 | 
			
		||||
  m_PrefabInstance: {fileID: 0}
 | 
			
		||||
  m_PrefabAsset: {fileID: 0}
 | 
			
		||||
  serializedVersion: 6
 | 
			
		||||
  m_Component:
 | 
			
		||||
  - component: {fileID: 8203100493891388538}
 | 
			
		||||
  - component: {fileID: 8847150349349997488}
 | 
			
		||||
  - component: {fileID: 2073073151658264442}
 | 
			
		||||
  m_Layer: 5
 | 
			
		||||
  m_Name: Text
 | 
			
		||||
  m_TagString: Untagged
 | 
			
		||||
  m_Icon: {fileID: 0}
 | 
			
		||||
  m_NavMeshLayer: 0
 | 
			
		||||
  m_StaticEditorFlags: 0
 | 
			
		||||
  m_IsActive: 1
 | 
			
		||||
--- !u!224 &8203100493891388538
 | 
			
		||||
RectTransform:
 | 
			
		||||
  m_ObjectHideFlags: 0
 | 
			
		||||
  m_CorrespondingSourceObject: {fileID: 0}
 | 
			
		||||
  m_PrefabInstance: {fileID: 0}
 | 
			
		||||
  m_PrefabAsset: {fileID: 0}
 | 
			
		||||
  m_GameObject: {fileID: 999942642962796566}
 | 
			
		||||
  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_Children: []
 | 
			
		||||
  m_Father: {fileID: 2587503141886277293}
 | 
			
		||||
  m_RootOrder: 0
 | 
			
		||||
  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 | 
			
		||||
  m_AnchorMin: {x: 0, y: 0}
 | 
			
		||||
  m_AnchorMax: {x: 1, y: 1}
 | 
			
		||||
  m_AnchoredPosition: {x: 0, y: 0}
 | 
			
		||||
  m_SizeDelta: {x: 0, y: 0}
 | 
			
		||||
  m_Pivot: {x: 0.5, y: 0.5}
 | 
			
		||||
--- !u!222 &8847150349349997488
 | 
			
		||||
CanvasRenderer:
 | 
			
		||||
  m_ObjectHideFlags: 0
 | 
			
		||||
  m_CorrespondingSourceObject: {fileID: 0}
 | 
			
		||||
  m_PrefabInstance: {fileID: 0}
 | 
			
		||||
  m_PrefabAsset: {fileID: 0}
 | 
			
		||||
  m_GameObject: {fileID: 999942642962796566}
 | 
			
		||||
  m_CullTransparentMesh: 0
 | 
			
		||||
--- !u!114 &2073073151658264442
 | 
			
		||||
MonoBehaviour:
 | 
			
		||||
  m_ObjectHideFlags: 0
 | 
			
		||||
  m_CorrespondingSourceObject: {fileID: 0}
 | 
			
		||||
  m_PrefabInstance: {fileID: 0}
 | 
			
		||||
  m_PrefabAsset: {fileID: 0}
 | 
			
		||||
  m_GameObject: {fileID: 999942642962796566}
 | 
			
		||||
  m_Enabled: 1
 | 
			
		||||
  m_EditorHideFlags: 0
 | 
			
		||||
  m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
 | 
			
		||||
  m_Name: 
 | 
			
		||||
  m_EditorClassIdentifier: 
 | 
			
		||||
  m_Material: {fileID: 0}
 | 
			
		||||
  m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
 | 
			
		||||
  m_RaycastTarget: 1
 | 
			
		||||
  m_Maskable: 1
 | 
			
		||||
  m_OnCullStateChanged:
 | 
			
		||||
    m_PersistentCalls:
 | 
			
		||||
      m_Calls: []
 | 
			
		||||
  m_FontData:
 | 
			
		||||
    m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
 | 
			
		||||
    m_FontSize: 14
 | 
			
		||||
    m_FontStyle: 0
 | 
			
		||||
    m_BestFit: 0
 | 
			
		||||
    m_MinSize: 10
 | 
			
		||||
    m_MaxSize: 40
 | 
			
		||||
    m_Alignment: 4
 | 
			
		||||
    m_AlignByGeometry: 0
 | 
			
		||||
    m_RichText: 1
 | 
			
		||||
    m_HorizontalOverflow: 0
 | 
			
		||||
    m_VerticalOverflow: 0
 | 
			
		||||
    m_LineSpacing: 1
 | 
			
		||||
  m_Text: Button
 | 
			
		||||
--- !u!1 &3736683260661080863
 | 
			
		||||
GameObject:
 | 
			
		||||
  m_ObjectHideFlags: 0
 | 
			
		||||
  m_CorrespondingSourceObject: {fileID: 0}
 | 
			
		||||
  m_PrefabInstance: {fileID: 0}
 | 
			
		||||
  m_PrefabAsset: {fileID: 0}
 | 
			
		||||
  serializedVersion: 6
 | 
			
		||||
  m_Component:
 | 
			
		||||
  - component: {fileID: 2587503141886277293}
 | 
			
		||||
  - component: {fileID: 1299783525975706047}
 | 
			
		||||
  - component: {fileID: 1216812542036263904}
 | 
			
		||||
  - component: {fileID: 183453519571911134}
 | 
			
		||||
  - component: {fileID: 8166808142109248999}
 | 
			
		||||
  m_Layer: 5
 | 
			
		||||
  m_Name: OptionButton
 | 
			
		||||
  m_TagString: Untagged
 | 
			
		||||
  m_Icon: {fileID: 0}
 | 
			
		||||
  m_NavMeshLayer: 0
 | 
			
		||||
  m_StaticEditorFlags: 0
 | 
			
		||||
  m_IsActive: 1
 | 
			
		||||
--- !u!224 &2587503141886277293
 | 
			
		||||
RectTransform:
 | 
			
		||||
  m_ObjectHideFlags: 0
 | 
			
		||||
  m_CorrespondingSourceObject: {fileID: 0}
 | 
			
		||||
  m_PrefabInstance: {fileID: 0}
 | 
			
		||||
  m_PrefabAsset: {fileID: 0}
 | 
			
		||||
  m_GameObject: {fileID: 3736683260661080863}
 | 
			
		||||
  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_Children:
 | 
			
		||||
  - {fileID: 8203100493891388538}
 | 
			
		||||
  m_Father: {fileID: 0}
 | 
			
		||||
  m_RootOrder: 0
 | 
			
		||||
  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 | 
			
		||||
  m_AnchorMin: {x: 0, y: 0}
 | 
			
		||||
  m_AnchorMax: {x: 0, y: 0}
 | 
			
		||||
  m_AnchoredPosition: {x: 0, y: 0}
 | 
			
		||||
  m_SizeDelta: {x: 200, y: 30}
 | 
			
		||||
  m_Pivot: {x: 0.5, y: 0.5}
 | 
			
		||||
--- !u!222 &1299783525975706047
 | 
			
		||||
CanvasRenderer:
 | 
			
		||||
  m_ObjectHideFlags: 0
 | 
			
		||||
  m_CorrespondingSourceObject: {fileID: 0}
 | 
			
		||||
  m_PrefabInstance: {fileID: 0}
 | 
			
		||||
  m_PrefabAsset: {fileID: 0}
 | 
			
		||||
  m_GameObject: {fileID: 3736683260661080863}
 | 
			
		||||
  m_CullTransparentMesh: 0
 | 
			
		||||
--- !u!114 &1216812542036263904
 | 
			
		||||
MonoBehaviour:
 | 
			
		||||
  m_ObjectHideFlags: 0
 | 
			
		||||
  m_CorrespondingSourceObject: {fileID: 0}
 | 
			
		||||
  m_PrefabInstance: {fileID: 0}
 | 
			
		||||
  m_PrefabAsset: {fileID: 0}
 | 
			
		||||
  m_GameObject: {fileID: 3736683260661080863}
 | 
			
		||||
  m_Enabled: 1
 | 
			
		||||
  m_EditorHideFlags: 0
 | 
			
		||||
  m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
 | 
			
		||||
  m_Name: 
 | 
			
		||||
  m_EditorClassIdentifier: 
 | 
			
		||||
  m_Material: {fileID: 0}
 | 
			
		||||
  m_Color: {r: 1, g: 1, b: 1, a: 1}
 | 
			
		||||
  m_RaycastTarget: 1
 | 
			
		||||
  m_Maskable: 1
 | 
			
		||||
  m_OnCullStateChanged:
 | 
			
		||||
    m_PersistentCalls:
 | 
			
		||||
      m_Calls: []
 | 
			
		||||
  m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
 | 
			
		||||
  m_Type: 1
 | 
			
		||||
  m_PreserveAspect: 0
 | 
			
		||||
  m_FillCenter: 1
 | 
			
		||||
  m_FillMethod: 4
 | 
			
		||||
  m_FillAmount: 1
 | 
			
		||||
  m_FillClockwise: 1
 | 
			
		||||
  m_FillOrigin: 0
 | 
			
		||||
  m_UseSpriteMesh: 0
 | 
			
		||||
  m_PixelsPerUnitMultiplier: 1
 | 
			
		||||
--- !u!114 &183453519571911134
 | 
			
		||||
MonoBehaviour:
 | 
			
		||||
  m_ObjectHideFlags: 0
 | 
			
		||||
  m_CorrespondingSourceObject: {fileID: 0}
 | 
			
		||||
  m_PrefabInstance: {fileID: 0}
 | 
			
		||||
  m_PrefabAsset: {fileID: 0}
 | 
			
		||||
  m_GameObject: {fileID: 3736683260661080863}
 | 
			
		||||
  m_Enabled: 1
 | 
			
		||||
  m_EditorHideFlags: 0
 | 
			
		||||
  m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
 | 
			
		||||
  m_Name: 
 | 
			
		||||
  m_EditorClassIdentifier: 
 | 
			
		||||
  m_Navigation:
 | 
			
		||||
    m_Mode: 3
 | 
			
		||||
    m_SelectOnUp: {fileID: 0}
 | 
			
		||||
    m_SelectOnDown: {fileID: 0}
 | 
			
		||||
    m_SelectOnLeft: {fileID: 0}
 | 
			
		||||
    m_SelectOnRight: {fileID: 0}
 | 
			
		||||
  m_Transition: 1
 | 
			
		||||
  m_Colors:
 | 
			
		||||
    m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
 | 
			
		||||
    m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
 | 
			
		||||
    m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
 | 
			
		||||
    m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
 | 
			
		||||
    m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
 | 
			
		||||
    m_ColorMultiplier: 1
 | 
			
		||||
    m_FadeDuration: 0.1
 | 
			
		||||
  m_SpriteState:
 | 
			
		||||
    m_HighlightedSprite: {fileID: 0}
 | 
			
		||||
    m_PressedSprite: {fileID: 0}
 | 
			
		||||
    m_SelectedSprite: {fileID: 0}
 | 
			
		||||
    m_DisabledSprite: {fileID: 0}
 | 
			
		||||
  m_AnimationTriggers:
 | 
			
		||||
    m_NormalTrigger: Normal
 | 
			
		||||
    m_HighlightedTrigger: Highlighted
 | 
			
		||||
    m_PressedTrigger: Pressed
 | 
			
		||||
    m_SelectedTrigger: Selected
 | 
			
		||||
    m_DisabledTrigger: Disabled
 | 
			
		||||
  m_Interactable: 1
 | 
			
		||||
  m_TargetGraphic: {fileID: 1216812542036263904}
 | 
			
		||||
  m_OnClick:
 | 
			
		||||
    m_PersistentCalls:
 | 
			
		||||
      m_Calls: []
 | 
			
		||||
--- !u!114 &8166808142109248999
 | 
			
		||||
MonoBehaviour:
 | 
			
		||||
  m_ObjectHideFlags: 0
 | 
			
		||||
  m_CorrespondingSourceObject: {fileID: 0}
 | 
			
		||||
  m_PrefabInstance: {fileID: 0}
 | 
			
		||||
  m_PrefabAsset: {fileID: 0}
 | 
			
		||||
  m_GameObject: {fileID: 3736683260661080863}
 | 
			
		||||
  m_Enabled: 1
 | 
			
		||||
  m_EditorHideFlags: 0
 | 
			
		||||
  m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3}
 | 
			
		||||
  m_Name: 
 | 
			
		||||
  m_EditorClassIdentifier: 
 | 
			
		||||
  m_IgnoreLayout: 0
 | 
			
		||||
  m_MinWidth: -1
 | 
			
		||||
  m_MinHeight: -1
 | 
			
		||||
  m_PreferredWidth: -1
 | 
			
		||||
  m_PreferredHeight: -1
 | 
			
		||||
  m_FlexibleWidth: -1
 | 
			
		||||
  m_FlexibleHeight: -1
 | 
			
		||||
  m_LayoutPriority: 1
 | 
			
		||||
							
								
								
									
										7
									
								
								Assets/Resources/Prefabs/OptionButton.prefab.meta
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
						 | 
				
			
			@ -0,0 +1,7 @@
 | 
			
		|||
fileFormatVersion: 2
 | 
			
		||||
guid: 2e25165f0cb6d6f4e903a785d77097d9
 | 
			
		||||
PrefabImporter:
 | 
			
		||||
  externalObjects: {}
 | 
			
		||||
  userData: 
 | 
			
		||||
  assetBundleName: 
 | 
			
		||||
  assetBundleVariant: 
 | 
			
		||||
							
								
								
									
										320
									
								
								Assets/Resources/Prefabs/OptionField.prefab
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
						 | 
				
			
			@ -0,0 +1,320 @@
 | 
			
		|||
%YAML 1.1
 | 
			
		||||
%TAG !u! tag:unity3d.com,2011:
 | 
			
		||||
--- !u!1 &567861683340653947
 | 
			
		||||
GameObject:
 | 
			
		||||
  m_ObjectHideFlags: 0
 | 
			
		||||
  m_CorrespondingSourceObject: {fileID: 0}
 | 
			
		||||
  m_PrefabInstance: {fileID: 0}
 | 
			
		||||
  m_PrefabAsset: {fileID: 0}
 | 
			
		||||
  serializedVersion: 6
 | 
			
		||||
  m_Component:
 | 
			
		||||
  - component: {fileID: 2881686491829515444}
 | 
			
		||||
  - component: {fileID: 4575271359858537334}
 | 
			
		||||
  - component: {fileID: 5918406714279843560}
 | 
			
		||||
  - component: {fileID: 8814511095938472540}
 | 
			
		||||
  - component: {fileID: 3997469219987850626}
 | 
			
		||||
  m_Layer: 5
 | 
			
		||||
  m_Name: OptionField
 | 
			
		||||
  m_TagString: Untagged
 | 
			
		||||
  m_Icon: {fileID: 0}
 | 
			
		||||
  m_NavMeshLayer: 0
 | 
			
		||||
  m_StaticEditorFlags: 0
 | 
			
		||||
  m_IsActive: 1
 | 
			
		||||
--- !u!224 &2881686491829515444
 | 
			
		||||
RectTransform:
 | 
			
		||||
  m_ObjectHideFlags: 0
 | 
			
		||||
  m_CorrespondingSourceObject: {fileID: 0}
 | 
			
		||||
  m_PrefabInstance: {fileID: 0}
 | 
			
		||||
  m_PrefabAsset: {fileID: 0}
 | 
			
		||||
  m_GameObject: {fileID: 567861683340653947}
 | 
			
		||||
  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_Children:
 | 
			
		||||
  - {fileID: 1881123203552871070}
 | 
			
		||||
  - {fileID: 3827337785720708782}
 | 
			
		||||
  m_Father: {fileID: 0}
 | 
			
		||||
  m_RootOrder: 0
 | 
			
		||||
  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 | 
			
		||||
  m_AnchorMin: {x: 0, y: 0}
 | 
			
		||||
  m_AnchorMax: {x: 0, y: 0}
 | 
			
		||||
  m_AnchoredPosition: {x: 0, y: 0}
 | 
			
		||||
  m_SizeDelta: {x: 0, y: 30}
 | 
			
		||||
  m_Pivot: {x: 0.5, y: 0.5}
 | 
			
		||||
--- !u!222 &4575271359858537334
 | 
			
		||||
CanvasRenderer:
 | 
			
		||||
  m_ObjectHideFlags: 0
 | 
			
		||||
  m_CorrespondingSourceObject: {fileID: 0}
 | 
			
		||||
  m_PrefabInstance: {fileID: 0}
 | 
			
		||||
  m_PrefabAsset: {fileID: 0}
 | 
			
		||||
  m_GameObject: {fileID: 567861683340653947}
 | 
			
		||||
  m_CullTransparentMesh: 0
 | 
			
		||||
--- !u!114 &5918406714279843560
 | 
			
		||||
MonoBehaviour:
 | 
			
		||||
  m_ObjectHideFlags: 0
 | 
			
		||||
  m_CorrespondingSourceObject: {fileID: 0}
 | 
			
		||||
  m_PrefabInstance: {fileID: 0}
 | 
			
		||||
  m_PrefabAsset: {fileID: 0}
 | 
			
		||||
  m_GameObject: {fileID: 567861683340653947}
 | 
			
		||||
  m_Enabled: 1
 | 
			
		||||
  m_EditorHideFlags: 0
 | 
			
		||||
  m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
 | 
			
		||||
  m_Name: 
 | 
			
		||||
  m_EditorClassIdentifier: 
 | 
			
		||||
  m_Material: {fileID: 0}
 | 
			
		||||
  m_Color: {r: 1, g: 1, b: 1, a: 1}
 | 
			
		||||
  m_RaycastTarget: 1
 | 
			
		||||
  m_Maskable: 1
 | 
			
		||||
  m_OnCullStateChanged:
 | 
			
		||||
    m_PersistentCalls:
 | 
			
		||||
      m_Calls: []
 | 
			
		||||
  m_Sprite: {fileID: 10911, guid: 0000000000000000f000000000000000, type: 0}
 | 
			
		||||
  m_Type: 1
 | 
			
		||||
  m_PreserveAspect: 0
 | 
			
		||||
  m_FillCenter: 1
 | 
			
		||||
  m_FillMethod: 4
 | 
			
		||||
  m_FillAmount: 1
 | 
			
		||||
  m_FillClockwise: 1
 | 
			
		||||
  m_FillOrigin: 0
 | 
			
		||||
  m_UseSpriteMesh: 0
 | 
			
		||||
  m_PixelsPerUnitMultiplier: 1
 | 
			
		||||
--- !u!114 &8814511095938472540
 | 
			
		||||
MonoBehaviour:
 | 
			
		||||
  m_ObjectHideFlags: 0
 | 
			
		||||
  m_CorrespondingSourceObject: {fileID: 0}
 | 
			
		||||
  m_PrefabInstance: {fileID: 0}
 | 
			
		||||
  m_PrefabAsset: {fileID: 0}
 | 
			
		||||
  m_GameObject: {fileID: 567861683340653947}
 | 
			
		||||
  m_Enabled: 1
 | 
			
		||||
  m_EditorHideFlags: 0
 | 
			
		||||
  m_Script: {fileID: 11500000, guid: d199490a83bb2b844b9695cbf13b01ef, type: 3}
 | 
			
		||||
  m_Name: 
 | 
			
		||||
  m_EditorClassIdentifier: 
 | 
			
		||||
  m_Navigation:
 | 
			
		||||
    m_Mode: 3
 | 
			
		||||
    m_SelectOnUp: {fileID: 0}
 | 
			
		||||
    m_SelectOnDown: {fileID: 0}
 | 
			
		||||
    m_SelectOnLeft: {fileID: 0}
 | 
			
		||||
    m_SelectOnRight: {fileID: 0}
 | 
			
		||||
  m_Transition: 1
 | 
			
		||||
  m_Colors:
 | 
			
		||||
    m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
 | 
			
		||||
    m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
 | 
			
		||||
    m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
 | 
			
		||||
    m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
 | 
			
		||||
    m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
 | 
			
		||||
    m_ColorMultiplier: 1
 | 
			
		||||
    m_FadeDuration: 0.1
 | 
			
		||||
  m_SpriteState:
 | 
			
		||||
    m_HighlightedSprite: {fileID: 0}
 | 
			
		||||
    m_PressedSprite: {fileID: 0}
 | 
			
		||||
    m_SelectedSprite: {fileID: 0}
 | 
			
		||||
    m_DisabledSprite: {fileID: 0}
 | 
			
		||||
  m_AnimationTriggers:
 | 
			
		||||
    m_NormalTrigger: Normal
 | 
			
		||||
    m_HighlightedTrigger: Highlighted
 | 
			
		||||
    m_PressedTrigger: Pressed
 | 
			
		||||
    m_SelectedTrigger: Selected
 | 
			
		||||
    m_DisabledTrigger: Disabled
 | 
			
		||||
  m_Interactable: 1
 | 
			
		||||
  m_TargetGraphic: {fileID: 5918406714279843560}
 | 
			
		||||
  m_TextComponent: {fileID: 192786065162510962}
 | 
			
		||||
  m_Placeholder: {fileID: 1379880338115507795}
 | 
			
		||||
  m_ContentType: 0
 | 
			
		||||
  m_InputType: 0
 | 
			
		||||
  m_AsteriskChar: 42
 | 
			
		||||
  m_KeyboardType: 0
 | 
			
		||||
  m_LineType: 0
 | 
			
		||||
  m_HideMobileInput: 0
 | 
			
		||||
  m_CharacterValidation: 0
 | 
			
		||||
  m_CharacterLimit: 0
 | 
			
		||||
  m_OnEndEdit:
 | 
			
		||||
    m_PersistentCalls:
 | 
			
		||||
      m_Calls: []
 | 
			
		||||
  m_OnValueChanged:
 | 
			
		||||
    m_PersistentCalls:
 | 
			
		||||
      m_Calls: []
 | 
			
		||||
  m_CaretColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
 | 
			
		||||
  m_CustomCaretColor: 0
 | 
			
		||||
  m_SelectionColor: {r: 0.65882355, g: 0.80784315, b: 1, a: 0.7529412}
 | 
			
		||||
  m_Text: 
 | 
			
		||||
  m_CaretBlinkRate: 0.85
 | 
			
		||||
  m_CaretWidth: 1
 | 
			
		||||
  m_ReadOnly: 0
 | 
			
		||||
  m_ShouldActivateOnSelect: 1
 | 
			
		||||
--- !u!114 &3997469219987850626
 | 
			
		||||
MonoBehaviour:
 | 
			
		||||
  m_ObjectHideFlags: 0
 | 
			
		||||
  m_CorrespondingSourceObject: {fileID: 0}
 | 
			
		||||
  m_PrefabInstance: {fileID: 0}
 | 
			
		||||
  m_PrefabAsset: {fileID: 0}
 | 
			
		||||
  m_GameObject: {fileID: 567861683340653947}
 | 
			
		||||
  m_Enabled: 1
 | 
			
		||||
  m_EditorHideFlags: 0
 | 
			
		||||
  m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3}
 | 
			
		||||
  m_Name: 
 | 
			
		||||
  m_EditorClassIdentifier: 
 | 
			
		||||
  m_IgnoreLayout: 0
 | 
			
		||||
  m_MinWidth: -1
 | 
			
		||||
  m_MinHeight: -1
 | 
			
		||||
  m_PreferredWidth: -1
 | 
			
		||||
  m_PreferredHeight: -1
 | 
			
		||||
  m_FlexibleWidth: -1
 | 
			
		||||
  m_FlexibleHeight: -1
 | 
			
		||||
  m_LayoutPriority: 1
 | 
			
		||||
--- !u!1 &2447800805692704629
 | 
			
		||||
GameObject:
 | 
			
		||||
  m_ObjectHideFlags: 0
 | 
			
		||||
  m_CorrespondingSourceObject: {fileID: 0}
 | 
			
		||||
  m_PrefabInstance: {fileID: 0}
 | 
			
		||||
  m_PrefabAsset: {fileID: 0}
 | 
			
		||||
  serializedVersion: 6
 | 
			
		||||
  m_Component:
 | 
			
		||||
  - component: {fileID: 1881123203552871070}
 | 
			
		||||
  - component: {fileID: 2681437479713856466}
 | 
			
		||||
  - component: {fileID: 1379880338115507795}
 | 
			
		||||
  m_Layer: 5
 | 
			
		||||
  m_Name: Placeholder
 | 
			
		||||
  m_TagString: Untagged
 | 
			
		||||
  m_Icon: {fileID: 0}
 | 
			
		||||
  m_NavMeshLayer: 0
 | 
			
		||||
  m_StaticEditorFlags: 0
 | 
			
		||||
  m_IsActive: 1
 | 
			
		||||
--- !u!224 &1881123203552871070
 | 
			
		||||
RectTransform:
 | 
			
		||||
  m_ObjectHideFlags: 0
 | 
			
		||||
  m_CorrespondingSourceObject: {fileID: 0}
 | 
			
		||||
  m_PrefabInstance: {fileID: 0}
 | 
			
		||||
  m_PrefabAsset: {fileID: 0}
 | 
			
		||||
  m_GameObject: {fileID: 2447800805692704629}
 | 
			
		||||
  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_Children: []
 | 
			
		||||
  m_Father: {fileID: 2881686491829515444}
 | 
			
		||||
  m_RootOrder: 0
 | 
			
		||||
  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 | 
			
		||||
  m_AnchorMin: {x: 0, y: 0}
 | 
			
		||||
  m_AnchorMax: {x: 1, y: 1}
 | 
			
		||||
  m_AnchoredPosition: {x: 0, y: -0.5}
 | 
			
		||||
  m_SizeDelta: {x: -20, y: -13}
 | 
			
		||||
  m_Pivot: {x: 0.5, y: 0.5}
 | 
			
		||||
--- !u!222 &2681437479713856466
 | 
			
		||||
CanvasRenderer:
 | 
			
		||||
  m_ObjectHideFlags: 0
 | 
			
		||||
  m_CorrespondingSourceObject: {fileID: 0}
 | 
			
		||||
  m_PrefabInstance: {fileID: 0}
 | 
			
		||||
  m_PrefabAsset: {fileID: 0}
 | 
			
		||||
  m_GameObject: {fileID: 2447800805692704629}
 | 
			
		||||
  m_CullTransparentMesh: 0
 | 
			
		||||
--- !u!114 &1379880338115507795
 | 
			
		||||
MonoBehaviour:
 | 
			
		||||
  m_ObjectHideFlags: 0
 | 
			
		||||
  m_CorrespondingSourceObject: {fileID: 0}
 | 
			
		||||
  m_PrefabInstance: {fileID: 0}
 | 
			
		||||
  m_PrefabAsset: {fileID: 0}
 | 
			
		||||
  m_GameObject: {fileID: 2447800805692704629}
 | 
			
		||||
  m_Enabled: 1
 | 
			
		||||
  m_EditorHideFlags: 0
 | 
			
		||||
  m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
 | 
			
		||||
  m_Name: 
 | 
			
		||||
  m_EditorClassIdentifier: 
 | 
			
		||||
  m_Material: {fileID: 0}
 | 
			
		||||
  m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 0.5}
 | 
			
		||||
  m_RaycastTarget: 1
 | 
			
		||||
  m_Maskable: 1
 | 
			
		||||
  m_OnCullStateChanged:
 | 
			
		||||
    m_PersistentCalls:
 | 
			
		||||
      m_Calls: []
 | 
			
		||||
  m_FontData:
 | 
			
		||||
    m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
 | 
			
		||||
    m_FontSize: 14
 | 
			
		||||
    m_FontStyle: 2
 | 
			
		||||
    m_BestFit: 0
 | 
			
		||||
    m_MinSize: 10
 | 
			
		||||
    m_MaxSize: 40
 | 
			
		||||
    m_Alignment: 0
 | 
			
		||||
    m_AlignByGeometry: 0
 | 
			
		||||
    m_RichText: 1
 | 
			
		||||
    m_HorizontalOverflow: 0
 | 
			
		||||
    m_VerticalOverflow: 0
 | 
			
		||||
    m_LineSpacing: 1
 | 
			
		||||
  m_Text: Enter text...
 | 
			
		||||
--- !u!1 &6900237356508662960
 | 
			
		||||
GameObject:
 | 
			
		||||
  m_ObjectHideFlags: 0
 | 
			
		||||
  m_CorrespondingSourceObject: {fileID: 0}
 | 
			
		||||
  m_PrefabInstance: {fileID: 0}
 | 
			
		||||
  m_PrefabAsset: {fileID: 0}
 | 
			
		||||
  serializedVersion: 6
 | 
			
		||||
  m_Component:
 | 
			
		||||
  - component: {fileID: 3827337785720708782}
 | 
			
		||||
  - component: {fileID: 7661550734325087226}
 | 
			
		||||
  - component: {fileID: 192786065162510962}
 | 
			
		||||
  m_Layer: 5
 | 
			
		||||
  m_Name: Text
 | 
			
		||||
  m_TagString: Untagged
 | 
			
		||||
  m_Icon: {fileID: 0}
 | 
			
		||||
  m_NavMeshLayer: 0
 | 
			
		||||
  m_StaticEditorFlags: 0
 | 
			
		||||
  m_IsActive: 1
 | 
			
		||||
--- !u!224 &3827337785720708782
 | 
			
		||||
RectTransform:
 | 
			
		||||
  m_ObjectHideFlags: 0
 | 
			
		||||
  m_CorrespondingSourceObject: {fileID: 0}
 | 
			
		||||
  m_PrefabInstance: {fileID: 0}
 | 
			
		||||
  m_PrefabAsset: {fileID: 0}
 | 
			
		||||
  m_GameObject: {fileID: 6900237356508662960}
 | 
			
		||||
  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_Children: []
 | 
			
		||||
  m_Father: {fileID: 2881686491829515444}
 | 
			
		||||
  m_RootOrder: 1
 | 
			
		||||
  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 | 
			
		||||
  m_AnchorMin: {x: 0, y: 0}
 | 
			
		||||
  m_AnchorMax: {x: 1, y: 1}
 | 
			
		||||
  m_AnchoredPosition: {x: 0, y: -0.5}
 | 
			
		||||
  m_SizeDelta: {x: -20, y: -13}
 | 
			
		||||
  m_Pivot: {x: 0.5, y: 0.5}
 | 
			
		||||
--- !u!222 &7661550734325087226
 | 
			
		||||
CanvasRenderer:
 | 
			
		||||
  m_ObjectHideFlags: 0
 | 
			
		||||
  m_CorrespondingSourceObject: {fileID: 0}
 | 
			
		||||
  m_PrefabInstance: {fileID: 0}
 | 
			
		||||
  m_PrefabAsset: {fileID: 0}
 | 
			
		||||
  m_GameObject: {fileID: 6900237356508662960}
 | 
			
		||||
  m_CullTransparentMesh: 0
 | 
			
		||||
--- !u!114 &192786065162510962
 | 
			
		||||
MonoBehaviour:
 | 
			
		||||
  m_ObjectHideFlags: 0
 | 
			
		||||
  m_CorrespondingSourceObject: {fileID: 0}
 | 
			
		||||
  m_PrefabInstance: {fileID: 0}
 | 
			
		||||
  m_PrefabAsset: {fileID: 0}
 | 
			
		||||
  m_GameObject: {fileID: 6900237356508662960}
 | 
			
		||||
  m_Enabled: 1
 | 
			
		||||
  m_EditorHideFlags: 0
 | 
			
		||||
  m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
 | 
			
		||||
  m_Name: 
 | 
			
		||||
  m_EditorClassIdentifier: 
 | 
			
		||||
  m_Material: {fileID: 0}
 | 
			
		||||
  m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
 | 
			
		||||
  m_RaycastTarget: 1
 | 
			
		||||
  m_Maskable: 1
 | 
			
		||||
  m_OnCullStateChanged:
 | 
			
		||||
    m_PersistentCalls:
 | 
			
		||||
      m_Calls: []
 | 
			
		||||
  m_FontData:
 | 
			
		||||
    m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
 | 
			
		||||
    m_FontSize: 14
 | 
			
		||||
    m_FontStyle: 0
 | 
			
		||||
    m_BestFit: 0
 | 
			
		||||
    m_MinSize: 10
 | 
			
		||||
    m_MaxSize: 40
 | 
			
		||||
    m_Alignment: 0
 | 
			
		||||
    m_AlignByGeometry: 0
 | 
			
		||||
    m_RichText: 0
 | 
			
		||||
    m_HorizontalOverflow: 1
 | 
			
		||||
    m_VerticalOverflow: 0
 | 
			
		||||
    m_LineSpacing: 1
 | 
			
		||||
  m_Text: 
 | 
			
		||||
							
								
								
									
										7
									
								
								Assets/Resources/Prefabs/OptionField.prefab.meta
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
						 | 
				
			
			@ -0,0 +1,7 @@
 | 
			
		|||
fileFormatVersion: 2
 | 
			
		||||
guid: 9c09247b9acee3645ad8788eab810b2e
 | 
			
		||||
PrefabImporter:
 | 
			
		||||
  externalObjects: {}
 | 
			
		||||
  userData: 
 | 
			
		||||
  assetBundleName: 
 | 
			
		||||
  assetBundleVariant: 
 | 
			
		||||
							
								
								
									
										335
									
								
								Assets/Resources/Prefabs/OptionToggle.prefab
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
						 | 
				
			
			@ -0,0 +1,335 @@
 | 
			
		|||
%YAML 1.1
 | 
			
		||||
%TAG !u! tag:unity3d.com,2011:
 | 
			
		||||
--- !u!1 &3255149681040644
 | 
			
		||||
GameObject:
 | 
			
		||||
  m_ObjectHideFlags: 0
 | 
			
		||||
  m_CorrespondingSourceObject: {fileID: 0}
 | 
			
		||||
  m_PrefabInstance: {fileID: 0}
 | 
			
		||||
  m_PrefabAsset: {fileID: 0}
 | 
			
		||||
  serializedVersion: 6
 | 
			
		||||
  m_Component:
 | 
			
		||||
  - component: {fileID: 9117359654058994387}
 | 
			
		||||
  - component: {fileID: 8176689932866819834}
 | 
			
		||||
  - component: {fileID: 4880597327808236415}
 | 
			
		||||
  m_Layer: 5
 | 
			
		||||
  m_Name: Background
 | 
			
		||||
  m_TagString: Untagged
 | 
			
		||||
  m_Icon: {fileID: 0}
 | 
			
		||||
  m_NavMeshLayer: 0
 | 
			
		||||
  m_StaticEditorFlags: 0
 | 
			
		||||
  m_IsActive: 1
 | 
			
		||||
--- !u!224 &9117359654058994387
 | 
			
		||||
RectTransform:
 | 
			
		||||
  m_ObjectHideFlags: 0
 | 
			
		||||
  m_CorrespondingSourceObject: {fileID: 0}
 | 
			
		||||
  m_PrefabInstance: {fileID: 0}
 | 
			
		||||
  m_PrefabAsset: {fileID: 0}
 | 
			
		||||
  m_GameObject: {fileID: 3255149681040644}
 | 
			
		||||
  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_Children:
 | 
			
		||||
  - {fileID: 5465909837741017854}
 | 
			
		||||
  m_Father: {fileID: 8789161981077347466}
 | 
			
		||||
  m_RootOrder: 0
 | 
			
		||||
  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 | 
			
		||||
  m_AnchorMin: {x: 0, y: 1}
 | 
			
		||||
  m_AnchorMax: {x: 0, y: 1}
 | 
			
		||||
  m_AnchoredPosition: {x: 10, y: -10}
 | 
			
		||||
  m_SizeDelta: {x: 20, y: 20}
 | 
			
		||||
  m_Pivot: {x: 0.5, y: 0.5}
 | 
			
		||||
--- !u!222 &8176689932866819834
 | 
			
		||||
CanvasRenderer:
 | 
			
		||||
  m_ObjectHideFlags: 0
 | 
			
		||||
  m_CorrespondingSourceObject: {fileID: 0}
 | 
			
		||||
  m_PrefabInstance: {fileID: 0}
 | 
			
		||||
  m_PrefabAsset: {fileID: 0}
 | 
			
		||||
  m_GameObject: {fileID: 3255149681040644}
 | 
			
		||||
  m_CullTransparentMesh: 0
 | 
			
		||||
--- !u!114 &4880597327808236415
 | 
			
		||||
MonoBehaviour:
 | 
			
		||||
  m_ObjectHideFlags: 0
 | 
			
		||||
  m_CorrespondingSourceObject: {fileID: 0}
 | 
			
		||||
  m_PrefabInstance: {fileID: 0}
 | 
			
		||||
  m_PrefabAsset: {fileID: 0}
 | 
			
		||||
  m_GameObject: {fileID: 3255149681040644}
 | 
			
		||||
  m_Enabled: 1
 | 
			
		||||
  m_EditorHideFlags: 0
 | 
			
		||||
  m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
 | 
			
		||||
  m_Name: 
 | 
			
		||||
  m_EditorClassIdentifier: 
 | 
			
		||||
  m_Material: {fileID: 0}
 | 
			
		||||
  m_Color: {r: 1, g: 1, b: 1, a: 1}
 | 
			
		||||
  m_RaycastTarget: 1
 | 
			
		||||
  m_Maskable: 1
 | 
			
		||||
  m_OnCullStateChanged:
 | 
			
		||||
    m_PersistentCalls:
 | 
			
		||||
      m_Calls: []
 | 
			
		||||
  m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
 | 
			
		||||
  m_Type: 1
 | 
			
		||||
  m_PreserveAspect: 0
 | 
			
		||||
  m_FillCenter: 1
 | 
			
		||||
  m_FillMethod: 4
 | 
			
		||||
  m_FillAmount: 1
 | 
			
		||||
  m_FillClockwise: 1
 | 
			
		||||
  m_FillOrigin: 0
 | 
			
		||||
  m_UseSpriteMesh: 0
 | 
			
		||||
  m_PixelsPerUnitMultiplier: 1
 | 
			
		||||
--- !u!1 &394597905502281511
 | 
			
		||||
GameObject:
 | 
			
		||||
  m_ObjectHideFlags: 0
 | 
			
		||||
  m_CorrespondingSourceObject: {fileID: 0}
 | 
			
		||||
  m_PrefabInstance: {fileID: 0}
 | 
			
		||||
  m_PrefabAsset: {fileID: 0}
 | 
			
		||||
  serializedVersion: 6
 | 
			
		||||
  m_Component:
 | 
			
		||||
  - component: {fileID: 5465909837741017854}
 | 
			
		||||
  - component: {fileID: 7371204660720240348}
 | 
			
		||||
  - component: {fileID: 3830541626617390897}
 | 
			
		||||
  m_Layer: 5
 | 
			
		||||
  m_Name: Checkmark
 | 
			
		||||
  m_TagString: Untagged
 | 
			
		||||
  m_Icon: {fileID: 0}
 | 
			
		||||
  m_NavMeshLayer: 0
 | 
			
		||||
  m_StaticEditorFlags: 0
 | 
			
		||||
  m_IsActive: 1
 | 
			
		||||
--- !u!224 &5465909837741017854
 | 
			
		||||
RectTransform:
 | 
			
		||||
  m_ObjectHideFlags: 0
 | 
			
		||||
  m_CorrespondingSourceObject: {fileID: 0}
 | 
			
		||||
  m_PrefabInstance: {fileID: 0}
 | 
			
		||||
  m_PrefabAsset: {fileID: 0}
 | 
			
		||||
  m_GameObject: {fileID: 394597905502281511}
 | 
			
		||||
  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_Children: []
 | 
			
		||||
  m_Father: {fileID: 9117359654058994387}
 | 
			
		||||
  m_RootOrder: 0
 | 
			
		||||
  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 | 
			
		||||
  m_AnchorMin: {x: 0.5, y: 0.5}
 | 
			
		||||
  m_AnchorMax: {x: 0.5, y: 0.5}
 | 
			
		||||
  m_AnchoredPosition: {x: 0, y: 0}
 | 
			
		||||
  m_SizeDelta: {x: 20, y: 20}
 | 
			
		||||
  m_Pivot: {x: 0.5, y: 0.5}
 | 
			
		||||
--- !u!222 &7371204660720240348
 | 
			
		||||
CanvasRenderer:
 | 
			
		||||
  m_ObjectHideFlags: 0
 | 
			
		||||
  m_CorrespondingSourceObject: {fileID: 0}
 | 
			
		||||
  m_PrefabInstance: {fileID: 0}
 | 
			
		||||
  m_PrefabAsset: {fileID: 0}
 | 
			
		||||
  m_GameObject: {fileID: 394597905502281511}
 | 
			
		||||
  m_CullTransparentMesh: 0
 | 
			
		||||
--- !u!114 &3830541626617390897
 | 
			
		||||
MonoBehaviour:
 | 
			
		||||
  m_ObjectHideFlags: 0
 | 
			
		||||
  m_CorrespondingSourceObject: {fileID: 0}
 | 
			
		||||
  m_PrefabInstance: {fileID: 0}
 | 
			
		||||
  m_PrefabAsset: {fileID: 0}
 | 
			
		||||
  m_GameObject: {fileID: 394597905502281511}
 | 
			
		||||
  m_Enabled: 1
 | 
			
		||||
  m_EditorHideFlags: 0
 | 
			
		||||
  m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
 | 
			
		||||
  m_Name: 
 | 
			
		||||
  m_EditorClassIdentifier: 
 | 
			
		||||
  m_Material: {fileID: 0}
 | 
			
		||||
  m_Color: {r: 1, g: 1, b: 1, a: 1}
 | 
			
		||||
  m_RaycastTarget: 1
 | 
			
		||||
  m_Maskable: 1
 | 
			
		||||
  m_OnCullStateChanged:
 | 
			
		||||
    m_PersistentCalls:
 | 
			
		||||
      m_Calls: []
 | 
			
		||||
  m_Sprite: {fileID: 10901, guid: 0000000000000000f000000000000000, type: 0}
 | 
			
		||||
  m_Type: 0
 | 
			
		||||
  m_PreserveAspect: 0
 | 
			
		||||
  m_FillCenter: 1
 | 
			
		||||
  m_FillMethod: 4
 | 
			
		||||
  m_FillAmount: 1
 | 
			
		||||
  m_FillClockwise: 1
 | 
			
		||||
  m_FillOrigin: 0
 | 
			
		||||
  m_UseSpriteMesh: 0
 | 
			
		||||
  m_PixelsPerUnitMultiplier: 1
 | 
			
		||||
--- !u!1 &5741932533636286456
 | 
			
		||||
GameObject:
 | 
			
		||||
  m_ObjectHideFlags: 0
 | 
			
		||||
  m_CorrespondingSourceObject: {fileID: 0}
 | 
			
		||||
  m_PrefabInstance: {fileID: 0}
 | 
			
		||||
  m_PrefabAsset: {fileID: 0}
 | 
			
		||||
  serializedVersion: 6
 | 
			
		||||
  m_Component:
 | 
			
		||||
  - component: {fileID: 7815899355165658205}
 | 
			
		||||
  - component: {fileID: 3226953068620577630}
 | 
			
		||||
  - component: {fileID: 5828497545740299654}
 | 
			
		||||
  m_Layer: 5
 | 
			
		||||
  m_Name: Text
 | 
			
		||||
  m_TagString: Untagged
 | 
			
		||||
  m_Icon: {fileID: 0}
 | 
			
		||||
  m_NavMeshLayer: 0
 | 
			
		||||
  m_StaticEditorFlags: 0
 | 
			
		||||
  m_IsActive: 1
 | 
			
		||||
--- !u!224 &7815899355165658205
 | 
			
		||||
RectTransform:
 | 
			
		||||
  m_ObjectHideFlags: 0
 | 
			
		||||
  m_CorrespondingSourceObject: {fileID: 0}
 | 
			
		||||
  m_PrefabInstance: {fileID: 0}
 | 
			
		||||
  m_PrefabAsset: {fileID: 0}
 | 
			
		||||
  m_GameObject: {fileID: 5741932533636286456}
 | 
			
		||||
  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_Children: []
 | 
			
		||||
  m_Father: {fileID: 8789161981077347466}
 | 
			
		||||
  m_RootOrder: 1
 | 
			
		||||
  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 | 
			
		||||
  m_AnchorMin: {x: 0, y: 0}
 | 
			
		||||
  m_AnchorMax: {x: 1, y: 1}
 | 
			
		||||
  m_AnchoredPosition: {x: 9, y: -0.5}
 | 
			
		||||
  m_SizeDelta: {x: -28, y: -3}
 | 
			
		||||
  m_Pivot: {x: 0.5, y: 0.5}
 | 
			
		||||
--- !u!222 &3226953068620577630
 | 
			
		||||
CanvasRenderer:
 | 
			
		||||
  m_ObjectHideFlags: 0
 | 
			
		||||
  m_CorrespondingSourceObject: {fileID: 0}
 | 
			
		||||
  m_PrefabInstance: {fileID: 0}
 | 
			
		||||
  m_PrefabAsset: {fileID: 0}
 | 
			
		||||
  m_GameObject: {fileID: 5741932533636286456}
 | 
			
		||||
  m_CullTransparentMesh: 0
 | 
			
		||||
--- !u!114 &5828497545740299654
 | 
			
		||||
MonoBehaviour:
 | 
			
		||||
  m_ObjectHideFlags: 0
 | 
			
		||||
  m_CorrespondingSourceObject: {fileID: 0}
 | 
			
		||||
  m_PrefabInstance: {fileID: 0}
 | 
			
		||||
  m_PrefabAsset: {fileID: 0}
 | 
			
		||||
  m_GameObject: {fileID: 5741932533636286456}
 | 
			
		||||
  m_Enabled: 1
 | 
			
		||||
  m_EditorHideFlags: 0
 | 
			
		||||
  m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
 | 
			
		||||
  m_Name: 
 | 
			
		||||
  m_EditorClassIdentifier: 
 | 
			
		||||
  m_Material: {fileID: 0}
 | 
			
		||||
  m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
 | 
			
		||||
  m_RaycastTarget: 1
 | 
			
		||||
  m_Maskable: 1
 | 
			
		||||
  m_OnCullStateChanged:
 | 
			
		||||
    m_PersistentCalls:
 | 
			
		||||
      m_Calls: []
 | 
			
		||||
  m_FontData:
 | 
			
		||||
    m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
 | 
			
		||||
    m_FontSize: 14
 | 
			
		||||
    m_FontStyle: 0
 | 
			
		||||
    m_BestFit: 0
 | 
			
		||||
    m_MinSize: 10
 | 
			
		||||
    m_MaxSize: 40
 | 
			
		||||
    m_Alignment: 0
 | 
			
		||||
    m_AlignByGeometry: 0
 | 
			
		||||
    m_RichText: 1
 | 
			
		||||
    m_HorizontalOverflow: 0
 | 
			
		||||
    m_VerticalOverflow: 0
 | 
			
		||||
    m_LineSpacing: 1
 | 
			
		||||
  m_Text: Toggle
 | 
			
		||||
--- !u!1 &8098018029235791166
 | 
			
		||||
GameObject:
 | 
			
		||||
  m_ObjectHideFlags: 0
 | 
			
		||||
  m_CorrespondingSourceObject: {fileID: 0}
 | 
			
		||||
  m_PrefabInstance: {fileID: 0}
 | 
			
		||||
  m_PrefabAsset: {fileID: 0}
 | 
			
		||||
  serializedVersion: 6
 | 
			
		||||
  m_Component:
 | 
			
		||||
  - component: {fileID: 8789161981077347466}
 | 
			
		||||
  - component: {fileID: 4928690182810981180}
 | 
			
		||||
  - component: {fileID: 1166102836368688474}
 | 
			
		||||
  m_Layer: 5
 | 
			
		||||
  m_Name: OptionToggle
 | 
			
		||||
  m_TagString: Untagged
 | 
			
		||||
  m_Icon: {fileID: 0}
 | 
			
		||||
  m_NavMeshLayer: 0
 | 
			
		||||
  m_StaticEditorFlags: 0
 | 
			
		||||
  m_IsActive: 1
 | 
			
		||||
--- !u!224 &8789161981077347466
 | 
			
		||||
RectTransform:
 | 
			
		||||
  m_ObjectHideFlags: 0
 | 
			
		||||
  m_CorrespondingSourceObject: {fileID: 0}
 | 
			
		||||
  m_PrefabInstance: {fileID: 0}
 | 
			
		||||
  m_PrefabAsset: {fileID: 0}
 | 
			
		||||
  m_GameObject: {fileID: 8098018029235791166}
 | 
			
		||||
  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_Children:
 | 
			
		||||
  - {fileID: 9117359654058994387}
 | 
			
		||||
  - {fileID: 7815899355165658205}
 | 
			
		||||
  m_Father: {fileID: 0}
 | 
			
		||||
  m_RootOrder: 0
 | 
			
		||||
  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 | 
			
		||||
  m_AnchorMin: {x: 0, y: 0}
 | 
			
		||||
  m_AnchorMax: {x: 0, y: 0}
 | 
			
		||||
  m_AnchoredPosition: {x: 0, y: 0}
 | 
			
		||||
  m_SizeDelta: {x: 0, y: 20}
 | 
			
		||||
  m_Pivot: {x: 0.5, y: 0.5}
 | 
			
		||||
--- !u!114 &4928690182810981180
 | 
			
		||||
MonoBehaviour:
 | 
			
		||||
  m_ObjectHideFlags: 0
 | 
			
		||||
  m_CorrespondingSourceObject: {fileID: 0}
 | 
			
		||||
  m_PrefabInstance: {fileID: 0}
 | 
			
		||||
  m_PrefabAsset: {fileID: 0}
 | 
			
		||||
  m_GameObject: {fileID: 8098018029235791166}
 | 
			
		||||
  m_Enabled: 1
 | 
			
		||||
  m_EditorHideFlags: 0
 | 
			
		||||
  m_Script: {fileID: 11500000, guid: 9085046f02f69544eb97fd06b6048fe2, type: 3}
 | 
			
		||||
  m_Name: 
 | 
			
		||||
  m_EditorClassIdentifier: 
 | 
			
		||||
  m_Navigation:
 | 
			
		||||
    m_Mode: 3
 | 
			
		||||
    m_SelectOnUp: {fileID: 0}
 | 
			
		||||
    m_SelectOnDown: {fileID: 0}
 | 
			
		||||
    m_SelectOnLeft: {fileID: 0}
 | 
			
		||||
    m_SelectOnRight: {fileID: 0}
 | 
			
		||||
  m_Transition: 1
 | 
			
		||||
  m_Colors:
 | 
			
		||||
    m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
 | 
			
		||||
    m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
 | 
			
		||||
    m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
 | 
			
		||||
    m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
 | 
			
		||||
    m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
 | 
			
		||||
    m_ColorMultiplier: 1
 | 
			
		||||
    m_FadeDuration: 0.1
 | 
			
		||||
  m_SpriteState:
 | 
			
		||||
    m_HighlightedSprite: {fileID: 0}
 | 
			
		||||
    m_PressedSprite: {fileID: 0}
 | 
			
		||||
    m_SelectedSprite: {fileID: 0}
 | 
			
		||||
    m_DisabledSprite: {fileID: 0}
 | 
			
		||||
  m_AnimationTriggers:
 | 
			
		||||
    m_NormalTrigger: Normal
 | 
			
		||||
    m_HighlightedTrigger: Highlighted
 | 
			
		||||
    m_PressedTrigger: Pressed
 | 
			
		||||
    m_SelectedTrigger: Selected
 | 
			
		||||
    m_DisabledTrigger: Disabled
 | 
			
		||||
  m_Interactable: 1
 | 
			
		||||
  m_TargetGraphic: {fileID: 4880597327808236415}
 | 
			
		||||
  toggleTransition: 1
 | 
			
		||||
  graphic: {fileID: 3830541626617390897}
 | 
			
		||||
  m_Group: {fileID: 0}
 | 
			
		||||
  onValueChanged:
 | 
			
		||||
    m_PersistentCalls:
 | 
			
		||||
      m_Calls: []
 | 
			
		||||
  m_IsOn: 1
 | 
			
		||||
--- !u!114 &1166102836368688474
 | 
			
		||||
MonoBehaviour:
 | 
			
		||||
  m_ObjectHideFlags: 0
 | 
			
		||||
  m_CorrespondingSourceObject: {fileID: 0}
 | 
			
		||||
  m_PrefabInstance: {fileID: 0}
 | 
			
		||||
  m_PrefabAsset: {fileID: 0}
 | 
			
		||||
  m_GameObject: {fileID: 8098018029235791166}
 | 
			
		||||
  m_Enabled: 1
 | 
			
		||||
  m_EditorHideFlags: 0
 | 
			
		||||
  m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3}
 | 
			
		||||
  m_Name: 
 | 
			
		||||
  m_EditorClassIdentifier: 
 | 
			
		||||
  m_IgnoreLayout: 0
 | 
			
		||||
  m_MinWidth: -1
 | 
			
		||||
  m_MinHeight: -1
 | 
			
		||||
  m_PreferredWidth: -1
 | 
			
		||||
  m_PreferredHeight: -1
 | 
			
		||||
  m_FlexibleWidth: -1
 | 
			
		||||
  m_FlexibleHeight: -1
 | 
			
		||||
  m_LayoutPriority: 1
 | 
			
		||||
							
								
								
									
										7
									
								
								Assets/Resources/Prefabs/OptionToggle.prefab.meta
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
						 | 
				
			
			@ -0,0 +1,7 @@
 | 
			
		|||
fileFormatVersion: 2
 | 
			
		||||
guid: 860a3bbda6bdfad4791a7fce0c17e672
 | 
			
		||||
PrefabImporter:
 | 
			
		||||
  externalObjects: {}
 | 
			
		||||
  userData: 
 | 
			
		||||
  assetBundleName: 
 | 
			
		||||
  assetBundleVariant: 
 | 
			
		||||
| 
		 Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.6 KiB  | 
| 
						 | 
				
			
			@ -1,5 +1,5 @@
 | 
			
		|||
fileFormatVersion: 2
 | 
			
		||||
guid: 3cc27b848c1f06c4eb7cfeeda3d65450
 | 
			
		||||
guid: 81aadeb6f4609444195fbadea89430ef
 | 
			
		||||
TextureImporter:
 | 
			
		||||
  internalIDToNameTable: []
 | 
			
		||||
  externalObjects: {}
 | 
			
		||||
| 
						 | 
				
			
			@ -45,7 +45,7 @@ TextureImporter:
 | 
			
		|||
  spriteMeshType: 1
 | 
			
		||||
  alignment: 0
 | 
			
		||||
  spritePivot: {x: 0.5, y: 0.5}
 | 
			
		||||
  spritePixelsToUnits: 85
 | 
			
		||||
  spritePixelsToUnits: 100
 | 
			
		||||
  spriteBorder: {x: 0, y: 0, z: 0, w: 0}
 | 
			
		||||
  spriteGenerateFallbackPhysicsShape: 1
 | 
			
		||||
  alphaUsage: 1
 | 
			
		||||
| 
						 | 
				
			
			@ -64,31 +64,7 @@ TextureImporter:
 | 
			
		|||
    maxTextureSize: 2048
 | 
			
		||||
    resizeAlgorithm: 0
 | 
			
		||||
    textureFormat: -1
 | 
			
		||||
    textureCompression: 0
 | 
			
		||||
    compressionQuality: 50
 | 
			
		||||
    crunchedCompression: 0
 | 
			
		||||
    allowsAlphaSplitting: 0
 | 
			
		||||
    overridden: 0
 | 
			
		||||
    androidETC2FallbackOverride: 0
 | 
			
		||||
    forceMaximumCompressionQuality_BC6H_BC7: 0
 | 
			
		||||
  - serializedVersion: 3
 | 
			
		||||
    buildTarget: Standalone
 | 
			
		||||
    maxTextureSize: 2048
 | 
			
		||||
    resizeAlgorithm: 0
 | 
			
		||||
    textureFormat: -1
 | 
			
		||||
    textureCompression: 0
 | 
			
		||||
    compressionQuality: 50
 | 
			
		||||
    crunchedCompression: 0
 | 
			
		||||
    allowsAlphaSplitting: 0
 | 
			
		||||
    overridden: 0
 | 
			
		||||
    androidETC2FallbackOverride: 0
 | 
			
		||||
    forceMaximumCompressionQuality_BC6H_BC7: 0
 | 
			
		||||
  - serializedVersion: 3
 | 
			
		||||
    buildTarget: Android
 | 
			
		||||
    maxTextureSize: 2048
 | 
			
		||||
    resizeAlgorithm: 0
 | 
			
		||||
    textureFormat: -1
 | 
			
		||||
    textureCompression: 0
 | 
			
		||||
    textureCompression: 1
 | 
			
		||||
    compressionQuality: 50
 | 
			
		||||
    crunchedCompression: 0
 | 
			
		||||
    allowsAlphaSplitting: 0
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
		 Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.7 KiB  | 
| 
						 | 
				
			
			@ -1,5 +1,5 @@
 | 
			
		|||
fileFormatVersion: 2
 | 
			
		||||
guid: cc8871e2537b07b4a8dd35bd708d82ef
 | 
			
		||||
guid: 0306d51b4688d4640b34bc3d49e250ee
 | 
			
		||||
TextureImporter:
 | 
			
		||||
  internalIDToNameTable: []
 | 
			
		||||
  externalObjects: {}
 | 
			
		||||
| 
						 | 
				
			
			@ -45,7 +45,7 @@ TextureImporter:
 | 
			
		|||
  spriteMeshType: 1
 | 
			
		||||
  alignment: 0
 | 
			
		||||
  spritePivot: {x: 0.5, y: 0.5}
 | 
			
		||||
  spritePixelsToUnits: 85
 | 
			
		||||
  spritePixelsToUnits: 100
 | 
			
		||||
  spriteBorder: {x: 0, y: 0, z: 0, w: 0}
 | 
			
		||||
  spriteGenerateFallbackPhysicsShape: 1
 | 
			
		||||
  alphaUsage: 1
 | 
			
		||||
| 
						 | 
				
			
			@ -64,31 +64,7 @@ TextureImporter:
 | 
			
		|||
    maxTextureSize: 2048
 | 
			
		||||
    resizeAlgorithm: 0
 | 
			
		||||
    textureFormat: -1
 | 
			
		||||
    textureCompression: 0
 | 
			
		||||
    compressionQuality: 50
 | 
			
		||||
    crunchedCompression: 0
 | 
			
		||||
    allowsAlphaSplitting: 0
 | 
			
		||||
    overridden: 0
 | 
			
		||||
    androidETC2FallbackOverride: 0
 | 
			
		||||
    forceMaximumCompressionQuality_BC6H_BC7: 0
 | 
			
		||||
  - serializedVersion: 3
 | 
			
		||||
    buildTarget: Standalone
 | 
			
		||||
    maxTextureSize: 2048
 | 
			
		||||
    resizeAlgorithm: 0
 | 
			
		||||
    textureFormat: -1
 | 
			
		||||
    textureCompression: 0
 | 
			
		||||
    compressionQuality: 50
 | 
			
		||||
    crunchedCompression: 0
 | 
			
		||||
    allowsAlphaSplitting: 0
 | 
			
		||||
    overridden: 0
 | 
			
		||||
    androidETC2FallbackOverride: 0
 | 
			
		||||
    forceMaximumCompressionQuality_BC6H_BC7: 0
 | 
			
		||||
  - serializedVersion: 3
 | 
			
		||||
    buildTarget: Android
 | 
			
		||||
    maxTextureSize: 2048
 | 
			
		||||
    resizeAlgorithm: 0
 | 
			
		||||
    textureFormat: -1
 | 
			
		||||
    textureCompression: 0
 | 
			
		||||
    textureCompression: 1
 | 
			
		||||
    compressionQuality: 50
 | 
			
		||||
    crunchedCompression: 0
 | 
			
		||||
    allowsAlphaSplitting: 0
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
		 Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.8 KiB  | 
| 
						 | 
				
			
			@ -1,5 +1,5 @@
 | 
			
		|||
fileFormatVersion: 2
 | 
			
		||||
guid: ebd49dde7602d1748878373c6ef26eb4
 | 
			
		||||
guid: 0b37cc6354dc6a94cb2d2de2529baa4e
 | 
			
		||||
TextureImporter:
 | 
			
		||||
  internalIDToNameTable: []
 | 
			
		||||
  externalObjects: {}
 | 
			
		||||
| 
						 | 
				
			
			@ -45,7 +45,7 @@ TextureImporter:
 | 
			
		|||
  spriteMeshType: 1
 | 
			
		||||
  alignment: 0
 | 
			
		||||
  spritePivot: {x: 0.5, y: 0.5}
 | 
			
		||||
  spritePixelsToUnits: 85
 | 
			
		||||
  spritePixelsToUnits: 100
 | 
			
		||||
  spriteBorder: {x: 0, y: 0, z: 0, w: 0}
 | 
			
		||||
  spriteGenerateFallbackPhysicsShape: 1
 | 
			
		||||
  alphaUsage: 1
 | 
			
		||||
| 
						 | 
				
			
			@ -64,31 +64,7 @@ TextureImporter:
 | 
			
		|||
    maxTextureSize: 2048
 | 
			
		||||
    resizeAlgorithm: 0
 | 
			
		||||
    textureFormat: -1
 | 
			
		||||
    textureCompression: 0
 | 
			
		||||
    compressionQuality: 50
 | 
			
		||||
    crunchedCompression: 0
 | 
			
		||||
    allowsAlphaSplitting: 0
 | 
			
		||||
    overridden: 0
 | 
			
		||||
    androidETC2FallbackOverride: 0
 | 
			
		||||
    forceMaximumCompressionQuality_BC6H_BC7: 0
 | 
			
		||||
  - serializedVersion: 3
 | 
			
		||||
    buildTarget: Standalone
 | 
			
		||||
    maxTextureSize: 2048
 | 
			
		||||
    resizeAlgorithm: 0
 | 
			
		||||
    textureFormat: -1
 | 
			
		||||
    textureCompression: 0
 | 
			
		||||
    compressionQuality: 50
 | 
			
		||||
    crunchedCompression: 0
 | 
			
		||||
    allowsAlphaSplitting: 0
 | 
			
		||||
    overridden: 0
 | 
			
		||||
    androidETC2FallbackOverride: 0
 | 
			
		||||
    forceMaximumCompressionQuality_BC6H_BC7: 0
 | 
			
		||||
  - serializedVersion: 3
 | 
			
		||||
    buildTarget: Android
 | 
			
		||||
    maxTextureSize: 2048
 | 
			
		||||
    resizeAlgorithm: 0
 | 
			
		||||
    textureFormat: -1
 | 
			
		||||
    textureCompression: 0
 | 
			
		||||
    textureCompression: 1
 | 
			
		||||
    compressionQuality: 50
 | 
			
		||||
    crunchedCompression: 0
 | 
			
		||||
    allowsAlphaSplitting: 0
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
		 Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 4.6 KiB  | 
| 
						 | 
				
			
			@ -1,5 +1,5 @@
 | 
			
		|||
fileFormatVersion: 2
 | 
			
		||||
guid: e86007512b6df594389539c6a119aa8a
 | 
			
		||||
guid: 07bac293433ad5f45bad68350b9501d9
 | 
			
		||||
TextureImporter:
 | 
			
		||||
  internalIDToNameTable: []
 | 
			
		||||
  externalObjects: {}
 | 
			
		||||
| 
						 | 
				
			
			@ -45,7 +45,7 @@ TextureImporter:
 | 
			
		|||
  spriteMeshType: 1
 | 
			
		||||
  alignment: 0
 | 
			
		||||
  spritePivot: {x: 0.5, y: 0.5}
 | 
			
		||||
  spritePixelsToUnits: 85
 | 
			
		||||
  spritePixelsToUnits: 100
 | 
			
		||||
  spriteBorder: {x: 0, y: 0, z: 0, w: 0}
 | 
			
		||||
  spriteGenerateFallbackPhysicsShape: 1
 | 
			
		||||
  alphaUsage: 1
 | 
			
		||||
| 
						 | 
				
			
			@ -64,31 +64,7 @@ TextureImporter:
 | 
			
		|||
    maxTextureSize: 2048
 | 
			
		||||
    resizeAlgorithm: 0
 | 
			
		||||
    textureFormat: -1
 | 
			
		||||
    textureCompression: 0
 | 
			
		||||
    compressionQuality: 50
 | 
			
		||||
    crunchedCompression: 0
 | 
			
		||||
    allowsAlphaSplitting: 0
 | 
			
		||||
    overridden: 0
 | 
			
		||||
    androidETC2FallbackOverride: 0
 | 
			
		||||
    forceMaximumCompressionQuality_BC6H_BC7: 0
 | 
			
		||||
  - serializedVersion: 3
 | 
			
		||||
    buildTarget: Standalone
 | 
			
		||||
    maxTextureSize: 2048
 | 
			
		||||
    resizeAlgorithm: 0
 | 
			
		||||
    textureFormat: -1
 | 
			
		||||
    textureCompression: 0
 | 
			
		||||
    compressionQuality: 50
 | 
			
		||||
    crunchedCompression: 0
 | 
			
		||||
    allowsAlphaSplitting: 0
 | 
			
		||||
    overridden: 0
 | 
			
		||||
    androidETC2FallbackOverride: 0
 | 
			
		||||
    forceMaximumCompressionQuality_BC6H_BC7: 0
 | 
			
		||||
  - serializedVersion: 3
 | 
			
		||||
    buildTarget: Android
 | 
			
		||||
    maxTextureSize: 2048
 | 
			
		||||
    resizeAlgorithm: 0
 | 
			
		||||
    textureFormat: -1
 | 
			
		||||
    textureCompression: 0
 | 
			
		||||
    textureCompression: 1
 | 
			
		||||
    compressionQuality: 50
 | 
			
		||||
    crunchedCompression: 0
 | 
			
		||||
    allowsAlphaSplitting: 0
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										8
									
								
								Assets/Resources/Textures/UI.meta
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
						 | 
				
			
			@ -0,0 +1,8 @@
 | 
			
		|||
fileFormatVersion: 2
 | 
			
		||||
guid: 56cdd09cf23c04e4fb6321d8fdc4d864
 | 
			
		||||
folderAsset: yes
 | 
			
		||||
DefaultImporter:
 | 
			
		||||
  externalObjects: {}
 | 
			
		||||
  userData: 
 | 
			
		||||
  assetBundleName: 
 | 
			
		||||
  assetBundleVariant: 
 | 
			
		||||
							
								
								
									
										
											BIN
										
									
								
								Assets/Resources/Textures/UI/grid.gif
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 22 KiB  | 
							
								
								
									
										116
									
								
								Assets/Resources/Textures/UI/grid.gif.meta
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
						 | 
				
			
			@ -0,0 +1,116 @@
 | 
			
		|||
fileFormatVersion: 2
 | 
			
		||||
guid: f2673788e9e92e147b38af939d2fb7fe
 | 
			
		||||
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
 | 
			
		||||
  grayScaleToAlpha: 0
 | 
			
		||||
  generateCubemap: 6
 | 
			
		||||
  cubemapConvolution: 0
 | 
			
		||||
  seamlessCubemap: 0
 | 
			
		||||
  textureFormat: 1
 | 
			
		||||
  maxTextureSize: 2048
 | 
			
		||||
  textureSettings:
 | 
			
		||||
    serializedVersion: 2
 | 
			
		||||
    filterMode: -1
 | 
			
		||||
    aniso: -1
 | 
			
		||||
    mipBias: -100
 | 
			
		||||
    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: 20
 | 
			
		||||
  spriteBorder: {x: 0, y: 0, z: 0, w: 0}
 | 
			
		||||
  spriteGenerateFallbackPhysicsShape: 1
 | 
			
		||||
  alphaUsage: 1
 | 
			
		||||
  alphaIsTransparency: 1
 | 
			
		||||
  spriteTessellationDetail: -1
 | 
			
		||||
  textureType: 8
 | 
			
		||||
  textureShape: 1
 | 
			
		||||
  singleChannelComponent: 0
 | 
			
		||||
  maxTextureSizeSet: 0
 | 
			
		||||
  compressionQualitySet: 0
 | 
			
		||||
  textureFormatSet: 0
 | 
			
		||||
  applyGammaDecoding: 0
 | 
			
		||||
  platformSettings:
 | 
			
		||||
  - serializedVersion: 3
 | 
			
		||||
    buildTarget: DefaultTexturePlatform
 | 
			
		||||
    maxTextureSize: 2048
 | 
			
		||||
    resizeAlgorithm: 0
 | 
			
		||||
    textureFormat: -1
 | 
			
		||||
    textureCompression: 0
 | 
			
		||||
    compressionQuality: 50
 | 
			
		||||
    crunchedCompression: 0
 | 
			
		||||
    allowsAlphaSplitting: 0
 | 
			
		||||
    overridden: 0
 | 
			
		||||
    androidETC2FallbackOverride: 0
 | 
			
		||||
    forceMaximumCompressionQuality_BC6H_BC7: 0
 | 
			
		||||
  - serializedVersion: 3
 | 
			
		||||
    buildTarget: Standalone
 | 
			
		||||
    maxTextureSize: 2048
 | 
			
		||||
    resizeAlgorithm: 0
 | 
			
		||||
    textureFormat: -1
 | 
			
		||||
    textureCompression: 0
 | 
			
		||||
    compressionQuality: 50
 | 
			
		||||
    crunchedCompression: 0
 | 
			
		||||
    allowsAlphaSplitting: 0
 | 
			
		||||
    overridden: 0
 | 
			
		||||
    androidETC2FallbackOverride: 0
 | 
			
		||||
    forceMaximumCompressionQuality_BC6H_BC7: 0
 | 
			
		||||
  - serializedVersion: 3
 | 
			
		||||
    buildTarget: Android
 | 
			
		||||
    maxTextureSize: 2048
 | 
			
		||||
    resizeAlgorithm: 0
 | 
			
		||||
    textureFormat: -1
 | 
			
		||||
    textureCompression: 0
 | 
			
		||||
    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: 
 | 
			
		||||
| 
						 | 
				
			
			@ -12,10 +12,8 @@ namespace RimWorldAnimationStudio
 | 
			
		|||
        public InputField bodyOffsetXField;
 | 
			
		||||
        public InputField bodyOffsetZField;
 | 
			
		||||
        public Toggle initiatorToggle;
 | 
			
		||||
        public GameObject bodyPartsTags;
 | 
			
		||||
 | 
			
		||||
        private AnimationDef animationDef;
 | 
			
		||||
        private int actorID = 0;
 | 
			
		||||
        private Actor actor;
 | 
			
		||||
 | 
			
		||||
        public string bodyType 
 | 
			
		||||
        { 
 | 
			
		||||
| 
						 | 
				
			
			@ -28,25 +26,49 @@ namespace RimWorldAnimationStudio
 | 
			
		|||
            } 
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void Initialize(AnimationDef animationDef, int actorID)
 | 
			
		||||
        public void Initialize(Actor actor)
 | 
			
		||||
        {
 | 
			
		||||
            this.animationDef = animationDef;
 | 
			
		||||
            this.actorID = actorID;
 | 
			
		||||
            this.actor = actor;
 | 
			
		||||
 | 
			
		||||
            UpdateBodyType();
 | 
			
		||||
            initiatorToggle.isOn = animationDef.actors[actorID].initiator;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void UpdateBodyType()
 | 
			
		||||
        {
 | 
			
		||||
            bodyOffsetXField.text = animationDef.actors[actorID].bodyTypeOffset.GetOffset(bodyType).x.ToString();
 | 
			
		||||
            bodyOffsetZField.text = animationDef.actors[actorID].bodyTypeOffset.GetOffset(bodyType).z.ToString();
 | 
			
		||||
            initiatorToggle.isOn = actor.initiator;
 | 
			
		||||
            bodyOffsetXField.text = actor.bodyTypeOffset.GetOffset(bodyType).x.ToString();
 | 
			
		||||
            bodyOffsetZField.text = actor.bodyTypeOffset.GetOffset(bodyType).z.ToString();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void UpdateAnimationDef()
 | 
			
		||||
        {
 | 
			
		||||
            animationDef.actors[actorID].initiator = initiatorToggle.isOn;
 | 
			
		||||
            animationDef.actors[actorID].bodyTypeOffset.SetOffset(bodyType, new Vector2(float.Parse(bodyOffsetXField.text), float.Parse(bodyOffsetZField.text)));
 | 
			
		||||
            float.TryParse(bodyOffsetXField.text, out float x);
 | 
			
		||||
            float.TryParse(bodyOffsetZField.text, out float z);
 | 
			
		||||
            
 | 
			
		||||
            actor.bodyTypeOffset.SetOffset(bodyType, new Vector2(x, z));
 | 
			
		||||
            actor.initiator = initiatorToggle.isOn;
 | 
			
		||||
 | 
			
		||||
            if (actor.isFucking == null)
 | 
			
		||||
            { }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void OpenSelectBodyPartsDialog()
 | 
			
		||||
        {
 | 
			
		||||
            var dialog = Resources.FindObjectsOfTypeAll(typeof(SelectBodyPartsDialog)) as SelectBodyPartsDialog[];
 | 
			
		||||
 | 
			
		||||
            if (dialog != null)
 | 
			
		||||
            { dialog[0].Initialize(actor); dialog[0].Pop(); }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void OpenSelectDefNamesDialog()
 | 
			
		||||
        {
 | 
			
		||||
            var dialog = Resources.FindObjectsOfTypeAll(typeof(SelectDefNamesDialog)) as SelectDefNamesDialog[];
 | 
			
		||||
 | 
			
		||||
            if (dialog != null)
 | 
			
		||||
            { dialog[0].Initialize(actor); dialog[0].Pop(); }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void OpenSelectBodyDefTypesDialog()
 | 
			
		||||
        {
 | 
			
		||||
            var dialog = Resources.FindObjectsOfTypeAll(typeof(SelectBodyDefTypesDialog)) as SelectBodyDefTypesDialog[];
 | 
			
		||||
 | 
			
		||||
            if (dialog != null)
 | 
			
		||||
            { dialog[0].Initialize(actor); dialog[0].Pop(); }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -7,19 +7,31 @@ namespace RimWorldAnimationStudio
 | 
			
		|||
{
 | 
			
		||||
    public class Actor
 | 
			
		||||
    {
 | 
			
		||||
        public List<string> defNames = new List<string>();
 | 
			
		||||
        public List<string> requiredGenitals = new List<string>();
 | 
			
		||||
        public bool controlGenitalAngle = false;
 | 
			
		||||
        public List<AlienRaceOffset> raceOffsets;
 | 
			
		||||
        public List<string> blacklistedRaces;
 | 
			
		||||
        public bool initiator = false;
 | 
			
		||||
        [XmlArray("defNames"), XmlArrayItem("li")] public List<string> defNames = new List<string>();
 | 
			
		||||
        [XmlArray("bodyDefTypes"), XmlArrayItem("li")] public List<string> bodyDefTypes = new List<string>();
 | 
			
		||||
        [XmlArray("requiredGender"), XmlArrayItem("li")] public List<string> requiredGender = new List<string>();
 | 
			
		||||
        [XmlArray("requiredGenitals"), XmlArrayItem("li")] public List<string> requiredGenitals = new List<string>();      
 | 
			
		||||
        [XmlArray("raceOffsets"), XmlArrayItem("li")] public List<AlienRaceOffset> raceOffsets = new List<AlienRaceOffset>();
 | 
			
		||||
        [XmlArray("blacklistedRaces"), XmlArrayItem("li")] public List<string> blacklistedRaces = new List<string>();      
 | 
			
		||||
        [XmlArray("tags"), XmlArrayItem("li")] public List<string> tags;
 | 
			
		||||
 | 
			
		||||
        public string gender;
 | 
			
		||||
        public bool isFucking = false;
 | 
			
		||||
        public bool isFucked = false;
 | 
			
		||||
        public List<string> bodyDefTypes = new List<string>();
 | 
			
		||||
        public BodyTypeOffset bodyTypeOffset = new BodyTypeOffset();
 | 
			
		||||
        public Vector3 offset = new Vector2(0, 0);
 | 
			
		||||
        public List<string> requiredGender;
 | 
			
		||||
        public List<string> tags = new List<string>();
 | 
			
		||||
        public bool initiator = false;
 | 
			
		||||
        public bool? controlGenitalAngle;
 | 
			
		||||
        public bool? isFucking;
 | 
			
		||||
        public bool? isFucked;
 | 
			
		||||
 | 
			
		||||
        public bool ShouldSerializedefNames() { return defNames.NotNullOrEmpty(); }
 | 
			
		||||
        public bool ShouldSerializebodyDefTypes() { return bodyDefTypes.NotNullOrEmpty(); }
 | 
			
		||||
        public bool ShouldSerializerequiredGender() { return requiredGender.NotNullOrEmpty(); }
 | 
			
		||||
        public bool ShouldSerializerequiredGenitals() { return requiredGenitals.NotNullOrEmpty(); }
 | 
			
		||||
        public bool ShouldSerializeraceOffsets() { return raceOffsets.NotNullOrEmpty(); }
 | 
			
		||||
        public bool ShouldSerializeblacklistedRaces() { return blacklistedRaces.NotNullOrEmpty(); }
 | 
			
		||||
        public bool ShouldSerializetags() { return tags.NotNullOrEmpty(); }
 | 
			
		||||
 | 
			
		||||
        public bool ShouldSerializecontrolGenitalAngle() { return controlGenitalAngle != null; }
 | 
			
		||||
        public bool ShouldSerializeisFucking() { return isFucking != null; }
 | 
			
		||||
        public bool ShouldSerializeisFucked() { return isFucked != null; }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -6,13 +6,14 @@ namespace RimWorldAnimationStudio
 | 
			
		|||
{
 | 
			
		||||
    public abstract class AnimationClip
 | 
			
		||||
    {
 | 
			
		||||
        [XmlIgnore]
 | 
			
		||||
        public Dictionary<int, string> SoundEffects = new Dictionary<int, string>();
 | 
			
		||||
        public List<string> types;
 | 
			
		||||
        public int duration;
 | 
			
		||||
        public string layer = "Pawn";
 | 
			
		||||
        public List<string> tags;
 | 
			
		||||
 | 
			
		||||
        [XmlIgnore] public int duration;
 | 
			
		||||
        [XmlIgnore] public Dictionary<int, string> SoundEffects = new Dictionary<int, string>();
 | 
			
		||||
 | 
			
		||||
        public abstract void BuildSimpleCurves();
 | 
			
		||||
        public string soundDef = null;
 | 
			
		||||
        public int actor;
 | 
			
		||||
        public List<string> tags = new List<string>();
 | 
			
		||||
 | 
			
		||||
        public bool ShouldSerializetags() { return tags.NotNullOrEmpty(); }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -7,10 +7,7 @@ namespace RimWorldAnimationStudio
 | 
			
		|||
    public class PawnAnimationClip : AnimationClip
 | 
			
		||||
    {
 | 
			
		||||
        [XmlAttribute("Class")] public string className = "Rimworld_Animations.PawnAnimationClip";
 | 
			
		||||
 | 
			
		||||
        [XmlArray("keyframes"), XmlArrayItem("li")] public List<PawnKeyframe> keyframes = new List<PawnKeyframe>();
 | 
			
		||||
        
 | 
			
		||||
        public AltitudeLayer layer = AltitudeLayer.Pawn;
 | 
			
		||||
 | 
			
		||||
        [XmlIgnore] public Dictionary<int, bool> quiver = new Dictionary<int, bool>();
 | 
			
		||||
        [XmlIgnore] public SimpleCurve GenitalAngle = new SimpleCurve();
 | 
			
		||||
| 
						 | 
				
			
			@ -36,70 +33,39 @@ namespace RimWorldAnimationStudio
 | 
			
		|||
            {
 | 
			
		||||
                if (frame.atTick.HasValue)
 | 
			
		||||
                {
 | 
			
		||||
                    if (frame.bodyAngle.HasValue)
 | 
			
		||||
                        BodyAngle.Add((float)frame.atTick / (float)duration, frame.bodyAngle.Value, true);
 | 
			
		||||
 | 
			
		||||
                    if (frame.headAngle.HasValue)
 | 
			
		||||
                        HeadAngle.Add((float)frame.atTick / (float)duration, frame.headAngle.Value, true);
 | 
			
		||||
 | 
			
		||||
                    if (frame.bodyOffsetX.HasValue)
 | 
			
		||||
                        BodyOffsetX.Add((float)frame.atTick / (float)duration, frame.bodyOffsetX.Value, true);
 | 
			
		||||
 | 
			
		||||
                    if (frame.bodyOffsetZ.HasValue)
 | 
			
		||||
                        BodyOffsetZ.Add((float)frame.atTick / (float)duration, frame.bodyOffsetZ.Value, true);
 | 
			
		||||
 | 
			
		||||
                    if (frame.headFacing.HasValue)
 | 
			
		||||
                        HeadFacing.Add((float)frame.atTick / (float)duration, frame.headFacing.Value, true);
 | 
			
		||||
 | 
			
		||||
                    if (frame.bodyFacing.HasValue)
 | 
			
		||||
                        BodyFacing.Add((float)frame.atTick / (float)duration, frame.bodyFacing.Value, true);
 | 
			
		||||
 | 
			
		||||
                    if (frame.headBob.HasValue)
 | 
			
		||||
                        HeadBob.Add((float)frame.atTick / (float)duration, frame.headBob.Value, true);
 | 
			
		||||
                    BodyAngle.Add((float)frame.atTick / (float)duration, frame.bodyAngle, true);
 | 
			
		||||
                    HeadAngle.Add((float)frame.atTick / (float)duration, frame.headAngle, true);
 | 
			
		||||
                    BodyOffsetX.Add((float)frame.atTick / (float)duration, frame.bodyOffsetX, true);
 | 
			
		||||
                    BodyOffsetZ.Add((float)frame.atTick / (float)duration, frame.bodyOffsetZ, true);
 | 
			
		||||
                    HeadFacing.Add((float)frame.atTick / (float)duration, frame.headFacing, true);
 | 
			
		||||
                    BodyFacing.Add((float)frame.atTick / (float)duration, frame.bodyFacing, true);
 | 
			
		||||
                    HeadBob.Add((float)frame.atTick / (float)duration, frame.headBob, true);
 | 
			
		||||
 | 
			
		||||
                    if (frame.genitalAngle.HasValue)
 | 
			
		||||
                        GenitalAngle.Add((float)frame.atTick / (float)duration, frame.genitalAngle.Value, true);
 | 
			
		||||
                    { GenitalAngle.Add((float)frame.atTick / (float)duration, frame.genitalAngle.Value, true); }
 | 
			
		||||
 | 
			
		||||
                    if (frame.soundEffect != null)
 | 
			
		||||
                    {
 | 
			
		||||
                        SoundEffects.Add((int)frame.atTick, frame.soundEffect);
 | 
			
		||||
                    }
 | 
			
		||||
                    { SoundEffects.Add((int)frame.atTick, frame.soundEffect); }
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
                else
 | 
			
		||||
                {
 | 
			
		||||
                    if (frame.bodyAngle.HasValue)
 | 
			
		||||
                        BodyAngle.Add((float)keyframePosition / (float)duration, frame.bodyAngle.Value, true);
 | 
			
		||||
 | 
			
		||||
                    if (frame.headAngle.HasValue)
 | 
			
		||||
                        HeadAngle.Add((float)keyframePosition / (float)duration, frame.headAngle.Value, true);
 | 
			
		||||
 | 
			
		||||
                    if (frame.bodyOffsetX.HasValue)
 | 
			
		||||
                        BodyOffsetX.Add((float)keyframePosition / (float)duration, frame.bodyOffsetX.Value, true);
 | 
			
		||||
 | 
			
		||||
                    if (frame.bodyOffsetZ.HasValue)
 | 
			
		||||
                        BodyOffsetZ.Add((float)keyframePosition / (float)duration, frame.bodyOffsetZ.Value, true);
 | 
			
		||||
 | 
			
		||||
                    if (frame.headFacing.HasValue)
 | 
			
		||||
                        HeadFacing.Add((float)keyframePosition / (float)duration, frame.headFacing.Value, true);
 | 
			
		||||
 | 
			
		||||
                    if (frame.bodyFacing.HasValue)
 | 
			
		||||
                        BodyFacing.Add((float)keyframePosition / (float)duration, frame.bodyFacing.Value, true);
 | 
			
		||||
 | 
			
		||||
                    if (frame.headBob.HasValue)
 | 
			
		||||
                        HeadBob.Add((float)keyframePosition / (float)duration, frame.headBob.Value, true);
 | 
			
		||||
                    BodyAngle.Add((float)keyframePosition / (float)duration, frame.bodyAngle, true);
 | 
			
		||||
                    HeadAngle.Add((float)keyframePosition / (float)duration, frame.headAngle, true);
 | 
			
		||||
                    BodyOffsetX.Add((float)keyframePosition / (float)duration, frame.bodyOffsetX, true);
 | 
			
		||||
                    BodyOffsetZ.Add((float)keyframePosition / (float)duration, frame.bodyOffsetZ, true);
 | 
			
		||||
                    HeadFacing.Add((float)keyframePosition / (float)duration, frame.headFacing, true);
 | 
			
		||||
                    BodyFacing.Add((float)keyframePosition / (float)duration, frame.bodyFacing, true);
 | 
			
		||||
                    HeadBob.Add((float)keyframePosition / (float)duration, frame.headBob, true);
 | 
			
		||||
 | 
			
		||||
                    if (frame.genitalAngle.HasValue)
 | 
			
		||||
                        GenitalAngle.Add((float)keyframePosition / (float)duration, frame.genitalAngle.Value, true);
 | 
			
		||||
 | 
			
		||||
                    if (frame.soundEffect != null)
 | 
			
		||||
                    {
 | 
			
		||||
                        SoundEffects.Add(keyframePosition, frame.soundEffect);
 | 
			
		||||
                    }
 | 
			
		||||
                    { SoundEffects.Add(keyframePosition, frame.soundEffect); }
 | 
			
		||||
 | 
			
		||||
                    if (frame.tickDuration != 1 && frame.quiver.HasValue)
 | 
			
		||||
                    {
 | 
			
		||||
 | 
			
		||||
                        quiver.Add(keyframePosition, true);
 | 
			
		||||
                        quiver.Add(keyframePosition + frame.tickDuration - 1, false);
 | 
			
		||||
                    }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -6,10 +6,8 @@ namespace RimWorldAnimationStudio
 | 
			
		|||
{
 | 
			
		||||
    public class ThingAnimationClip : AnimationClip
 | 
			
		||||
    {
 | 
			
		||||
        [XmlAttribute("Class")] public string className = "Rimworld_Animations.PawnAnimationClip";
 | 
			
		||||
 | 
			
		||||
        [XmlAttribute("Class")] public string className = "Rimworld_Animations.ThingAnimationClip";
 | 
			
		||||
        [XmlArray("keyframes"), XmlArrayItem("li")] public List<ThingKeyframe> keyframes = new List<ThingKeyframe>();
 | 
			
		||||
        public string layer = "Pawn";
 | 
			
		||||
 | 
			
		||||
        [XmlIgnore] public SimpleCurve PositionX = new SimpleCurve();
 | 
			
		||||
        [XmlIgnore] public SimpleCurve PositionZ = new SimpleCurve();
 | 
			
		||||
| 
						 | 
				
			
			@ -32,36 +30,22 @@ namespace RimWorldAnimationStudio
 | 
			
		|||
            {
 | 
			
		||||
                if (frame.atTick.HasValue)
 | 
			
		||||
                {
 | 
			
		||||
                    if (frame.positionX.HasValue)
 | 
			
		||||
                        PositionX.Add((float)frame.atTick / (float)duration, frame.positionX.Value, true);
 | 
			
		||||
 | 
			
		||||
                    if (frame.positionZ.HasValue)
 | 
			
		||||
                        PositionZ.Add((float)frame.atTick / (float)duration, frame.positionZ.Value, true);
 | 
			
		||||
 | 
			
		||||
                    if (frame.rotation.HasValue)
 | 
			
		||||
                        Rotation.Add((float)frame.atTick / (float)duration, frame.rotation.Value, true);
 | 
			
		||||
                    PositionX.Add((float)frame.atTick / (float)duration, frame.positionX, true);
 | 
			
		||||
                    PositionZ.Add((float)frame.atTick / (float)duration, frame.positionZ, true);
 | 
			
		||||
                    Rotation.Add((float)frame.atTick / (float)duration, frame.rotation, true);
 | 
			
		||||
 | 
			
		||||
                    if (frame.soundEffect != null)
 | 
			
		||||
                    {
 | 
			
		||||
                        SoundEffects.Add((int)frame.atTick, frame.soundEffect);
 | 
			
		||||
                    }
 | 
			
		||||
                    { SoundEffects.Add((int)frame.atTick, frame.soundEffect); }
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
                else
 | 
			
		||||
                {
 | 
			
		||||
                    if (frame.positionX.HasValue)
 | 
			
		||||
                        PositionX.Add((float)keyframePosition / (float)duration, frame.positionX.Value, true);
 | 
			
		||||
 | 
			
		||||
                    if (frame.positionZ.HasValue)
 | 
			
		||||
                        PositionZ.Add((float)keyframePosition / (float)duration, frame.positionZ.Value, true);
 | 
			
		||||
 | 
			
		||||
                    if (frame.rotation.HasValue)
 | 
			
		||||
                        Rotation.Add((float)keyframePosition / (float)duration, frame.rotation.Value, true);
 | 
			
		||||
                    PositionX.Add((float)keyframePosition / (float)duration, frame.positionX, true);
 | 
			
		||||
                    PositionZ.Add((float)keyframePosition / (float)duration, frame.positionZ, true);
 | 
			
		||||
                    Rotation.Add((float)keyframePosition / (float)duration, frame.rotation, true);
 | 
			
		||||
 | 
			
		||||
                    if (frame.soundEffect != null)
 | 
			
		||||
                    {
 | 
			
		||||
                        SoundEffects.Add(keyframePosition, frame.soundEffect);
 | 
			
		||||
                    }
 | 
			
		||||
                    { SoundEffects.Add(keyframePosition, frame.soundEffect); }
 | 
			
		||||
 | 
			
		||||
                    keyframePosition += frame.tickDuration;
 | 
			
		||||
                }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -9,12 +9,14 @@ namespace RimWorldAnimationStudio
 | 
			
		|||
        public string defName = "Undefined";
 | 
			
		||||
        public string label = "Undefined";
 | 
			
		||||
        public bool sounds = false;
 | 
			
		||||
        [XmlIgnore] public int animationTimeTicks = 0;
 | 
			
		||||
 | 
			
		||||
        [XmlArray("sexTypes"), XmlArrayItem("li")] public List<string> sexTypes = new List<string>();
 | 
			
		||||
        [XmlArray("interactionDefTypes"), XmlArrayItem("li")] public List<string> interactionDefTypes = new List<string>();
 | 
			
		||||
        [XmlArray("actors"), XmlArrayItem("li")] public List<Actor> actors = new List<Actor>();
 | 
			
		||||
        [XmlArray("animationStages"), XmlArrayItem("li")] public List<AnimationStage> animationStages = new List<AnimationStage>();
 | 
			
		||||
 | 
			
		||||
        [XmlIgnore] public int animationTimeTicks = 0;
 | 
			
		||||
 | 
			
		||||
        public void Initialize()
 | 
			
		||||
        {
 | 
			
		||||
            animationTimeTicks = 0;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -12,20 +12,19 @@ namespace RimWorldAnimationStudio
 | 
			
		|||
        public string Hulk;
 | 
			
		||||
        public string Fat;
 | 
			
		||||
 | 
			
		||||
        public void SetOffset(string bodyType, Vector2 offset)
 | 
			
		||||
        public void SetOffset(string bodyType, Vector2 bodyOffset)
 | 
			
		||||
        {
 | 
			
		||||
            FieldInfo bodyTypeOffsetInfo = typeof(BodyTypeOffset).GetField(bodyType);
 | 
			
		||||
 | 
			
		||||
            if (bodyTypeOffsetInfo == null)
 | 
			
		||||
            { return; }
 | 
			
		||||
 | 
			
		||||
            bodyTypeOffsetInfo.SetValue(this, offset.ToString());
 | 
			
		||||
            string _bodyOffset = "(" + bodyOffset.x + ", " + bodyOffset.y + ")";
 | 
			
		||||
            bodyTypeOffsetInfo.SetValue(this, _bodyOffset);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public Vector3 GetOffset(string bodyType)
 | 
			
		||||
        {
 | 
			
		||||
            Debug.Log(bodyType);
 | 
			
		||||
 | 
			
		||||
            FieldInfo bodyTypeOffsetInfo = typeof(BodyTypeOffset).GetField(bodyType);
 | 
			
		||||
 | 
			
		||||
            if (bodyTypeOffsetInfo == null)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -6,9 +6,13 @@ namespace RimWorldAnimationStudio
 | 
			
		|||
{
 | 
			
		||||
    public class Keyframe
 | 
			
		||||
    {
 | 
			
		||||
        public int tickDuration = 1;
 | 
			
		||||
        public float? atTick;
 | 
			
		||||
 | 
			
		||||
        public int tickDuration = 1;    
 | 
			
		||||
        public string soundEffect;
 | 
			
		||||
        public List<string> tags = new List<string>();
 | 
			
		||||
 | 
			
		||||
        public bool ShouldSerializeatTick() { return atTick != null; }
 | 
			
		||||
        public bool ShouldSerializetags() { return tags.NotNullOrEmpty(); }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -6,14 +6,18 @@ namespace RimWorldAnimationStudio
 | 
			
		|||
{
 | 
			
		||||
    public class PawnKeyframe : Keyframe
 | 
			
		||||
    {
 | 
			
		||||
        public float? bodyAngle;
 | 
			
		||||
        public float? headAngle;
 | 
			
		||||
        public float? headBob;
 | 
			
		||||
        public float? bodyOffsetX;
 | 
			
		||||
        public float? bodyOffsetZ;
 | 
			
		||||
        public float? headFacing;
 | 
			
		||||
        public float? bodyFacing;
 | 
			
		||||
        public float bodyAngle;
 | 
			
		||||
        public float headAngle;
 | 
			
		||||
        public float headBob;
 | 
			
		||||
        public float bodyOffsetX;
 | 
			
		||||
        public float bodyOffsetZ;
 | 
			
		||||
        public float headFacing;
 | 
			
		||||
        public float bodyFacing;
 | 
			
		||||
 | 
			
		||||
        public float? genitalAngle;
 | 
			
		||||
        public bool? quiver;
 | 
			
		||||
 | 
			
		||||
        public bool ShouldSerializegenitalAngle() { return genitalAngle != null; }
 | 
			
		||||
        public bool ShouldSerializequiver() { return quiver != null; }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -6,8 +6,8 @@ namespace RimWorldAnimationStudio
 | 
			
		|||
{
 | 
			
		||||
    public class ThingKeyframe : Keyframe
 | 
			
		||||
    {
 | 
			
		||||
        public float? positionX;
 | 
			
		||||
        public float? positionZ;
 | 
			
		||||
        public float? rotation;
 | 
			
		||||
        public float positionX;
 | 
			
		||||
        public float positionZ;
 | 
			
		||||
        public float rotation;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -10,121 +10,43 @@ using UnityEngine.UI;
 | 
			
		|||
 | 
			
		||||
namespace RimWorldAnimationStudio
 | 
			
		||||
{
 | 
			
		||||
    public class AnimationController : MonoBehaviour
 | 
			
		||||
    public class AnimationController : Singleton<AnimationController>
 | 
			
		||||
    {
 | 
			
		||||
        public Defs defs;
 | 
			
		||||
        public AnimationDef anim;
 | 
			
		||||
        public bool isAnimating = false;
 | 
			
		||||
        public bool isLooping = true;
 | 
			
		||||
        public int stageTick = 0;
 | 
			
		||||
        public int stageID = 0;
 | 
			
		||||
 | 
			
		||||
        public bool autoAdvanceToNextStage = false;
 | 
			
		||||
 | 
			
		||||
        //public InputField stageTickField;
 | 
			
		||||
        //public InputField stageLengthField;
 | 
			
		||||
        public Slider stageTimelineSlider;
 | 
			
		||||
 | 
			
		||||
        //public InputField stageIDField;
 | 
			
		||||
 | 
			
		||||
        public ActorBody actorBodyPrefab;
 | 
			
		||||
        public GameObject actorBodyPrefab;
 | 
			
		||||
        public List<ActorBody> actorBodies = new List<ActorBody>();
 | 
			
		||||
        //public List<Dropdown> bodyTypeDropdowns = new List<Dropdown>();
 | 
			
		||||
 | 
			
		||||
        public Text stageTickField;
 | 
			
		||||
        public Text stageLengthField;
 | 
			
		||||
        public Text stageTickText;
 | 
			
		||||
        public Text stageLengthText;
 | 
			
		||||
 | 
			
		||||
        public Transform actorCards;
 | 
			
		||||
        public GameObject actorCardPrefab;
 | 
			
		||||
 | 
			
		||||
        public Dropdown stageLoopDropdown;
 | 
			
		||||
        public InputField stageIDField;
 | 
			
		||||
 | 
			
		||||
        private float currentTime = 0;
 | 
			
		||||
 | 
			
		||||
        public T ReadDataFromXML<T>(string inputPath)
 | 
			
		||||
        {
 | 
			
		||||
            using (StreamReader stringReader = new StreamReader(inputPath))
 | 
			
		||||
            {
 | 
			
		||||
                XmlSerializer serializer = new XmlSerializer(typeof(T));
 | 
			
		||||
                return (T)serializer.Deserialize(stringReader);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void LoadNewXML(string inputPath)
 | 
			
		||||
        {
 | 
			
		||||
            defs = ReadDataFromXML<Defs>(inputPath);
 | 
			
		||||
 | 
			
		||||
            if (defs?.animationDefs != null)
 | 
			
		||||
            {
 | 
			
		||||
                Debug.Log(defs.animationDefs.Count);
 | 
			
		||||
                Debug.Log(defs.animationDefs[0].defName);
 | 
			
		||||
 | 
			
		||||
                anim = defs.animationDefs[0];
 | 
			
		||||
                InitializeAnimation(anim);
 | 
			
		||||
                
 | 
			
		||||
                foreach (Actor actor in anim.actors)
 | 
			
		||||
                {
 | 
			
		||||
                    AddActor();
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
                UpdateAnimation();
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void SaveXML()
 | 
			
		||||
        {
 | 
			
		||||
            if (anim == null)
 | 
			
		||||
            { return; }
 | 
			
		||||
 | 
			
		||||
            string path = StandaloneFileBrowser.SaveFilePanel("Save file", "", anim.defName + ".xml", ".xml");
 | 
			
		||||
 | 
			
		||||
            if (path == null || path == "")
 | 
			
		||||
            { return; }
 | 
			
		||||
 | 
			
		||||
            XmlSerializer writer = new XmlSerializer(typeof(AnimationDef));
 | 
			
		||||
            XmlSerializerNamespaces ns = new XmlSerializerNamespaces();
 | 
			
		||||
            ns.Add("", "");
 | 
			
		||||
            FileStream file = File.Create(path);
 | 
			
		||||
 | 
			
		||||
            writer.Serialize(file, anim, ns);
 | 
			
		||||
            file.Close();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void OpenFileDialog()
 | 
			
		||||
        {
 | 
			
		||||
            var paths = StandaloneFileBrowser.OpenFilePanel("Open File", "", "", false);
 | 
			
		||||
 | 
			
		||||
            Debug.Log(paths[0]);
 | 
			
		||||
            LoadNewXML(paths[0]);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void PlayAnimation(bool value)
 | 
			
		||||
        {
 | 
			
		||||
            isAnimating = value;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void ToggleAnimationLoop()
 | 
			
		||||
        {
 | 
			
		||||
            isLooping = !isLooping;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void UpdateStageID(InputField stageIDField)
 | 
			
		||||
        {
 | 
			
		||||
            if (anim == null)
 | 
			
		||||
            { 
 | 
			
		||||
                stageIDField.text = "0";
 | 
			
		||||
                return;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            int i = int.Parse(stageIDField.text);
 | 
			
		||||
            stageID = Mathf.Clamp(i, 0, anim.animationStages.Count - 1);
 | 
			
		||||
            stageTick = 0;
 | 
			
		||||
 | 
			
		||||
            stageIDField.text = stageID.ToString();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void Update()
 | 
			
		||||
        {
 | 
			
		||||
            if (anim == null) { return; }
 | 
			
		||||
            // No animation, exit
 | 
			
		||||
            if (Workspace.animationDef == null) { return; }
 | 
			
		||||
 | 
			
		||||
            // Dirty animation, reset
 | 
			
		||||
            if (Workspace.animationDef != null && Workspace.isDirty)
 | 
			
		||||
            { Initialize(); return; }
 | 
			
		||||
 | 
			
		||||
            // Not animating, update preview
 | 
			
		||||
            if (isAnimating == false) { UpdateAnimation(); return; }
 | 
			
		||||
 | 
			
		||||
            // Animating, update stage tick before updating preview
 | 
			
		||||
            currentTime += Time.deltaTime;
 | 
			
		||||
 | 
			
		||||
            if (currentTime < 1f/60f)
 | 
			
		||||
| 
						 | 
				
			
			@ -133,68 +55,47 @@ namespace RimWorldAnimationStudio
 | 
			
		|||
            currentTime -= 1f/60f;
 | 
			
		||||
            stageTick += 1;
 | 
			
		||||
 | 
			
		||||
            if (stageTick > anim.animationStages[stageID].playTimeTicks)
 | 
			
		||||
            int stageLenght = Workspace.animationDef.animationStages[Workspace.stageID].playTimeTicks;
 | 
			
		||||
 | 
			
		||||
            if (stageTick > stageLenght)
 | 
			
		||||
            { 
 | 
			
		||||
                if (isLooping)
 | 
			
		||||
                if (stageLoopDropdown.value == 1)
 | 
			
		||||
                { stageTick = 1; }
 | 
			
		||||
 | 
			
		||||
                else if (autoAdvanceToNextStage && stageID < anim.animationStages.Count - 1)
 | 
			
		||||
                { stageTick = 1; stageID++; }
 | 
			
		||||
                else if (stageLoopDropdown.value == 2 && Workspace.stageID < Workspace.animationDef.animationStages.Count - 1)
 | 
			
		||||
                { 
 | 
			
		||||
                    stageTick = 1; 
 | 
			
		||||
                    Workspace.stageID++;
 | 
			
		||||
                    stageIDField.text = Workspace.stageID.ToString();
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
                else
 | 
			
		||||
                { stageTick = anim.animationStages[stageID].playTimeTicks; }
 | 
			
		||||
                { stageTick = stageLenght; }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            stageTimelineSlider.maxValue = stageLenght;
 | 
			
		||||
            stageTimelineSlider.value = stageTick;
 | 
			
		||||
 | 
			
		||||
            UpdateAnimation();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void AddActor()
 | 
			
		||||
        {
 | 
			
		||||
            GameObject actorCardObject = Instantiate(actorCardPrefab, actorCards);
 | 
			
		||||
            actorCardObject.GetComponent<ActorCard>().Initialize(anim, actorCards.childCount - 1);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void InitializeAnimation(AnimationDef anim)
 | 
			
		||||
        {
 | 
			
		||||
            ResetAnimation();
 | 
			
		||||
 | 
			
		||||
            anim.Initialize();
 | 
			
		||||
            this.anim = anim;
 | 
			
		||||
 | 
			
		||||
            for (int actorID = 0; actorID < anim.actors.Count; actorID++)
 | 
			
		||||
            {
 | 
			
		||||
                ActorBody actorBody = Instantiate(actorBodyPrefab, transform) as ActorBody;
 | 
			
		||||
                actorBodies.Add(actorBody);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void ResetAnimation()
 | 
			
		||||
        {
 | 
			
		||||
            anim = null;
 | 
			
		||||
            stageID = 0;
 | 
			
		||||
            stageTick = 0;
 | 
			
		||||
            isAnimating = false;
 | 
			
		||||
            actorBodies.Clear();
 | 
			
		||||
 | 
			
		||||
            foreach (Transform child in transform)
 | 
			
		||||
            { Destroy(child.gameObject); }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void UpdateAnimation()
 | 
			
		||||
        {
 | 
			
		||||
            stageTickField.text = stageTick.ToString();
 | 
			
		||||
            stageLengthField.text = anim.animationStages[stageID].playTimeTicks.ToString();
 | 
			
		||||
            if (stageTickText != null)
 | 
			
		||||
            { stageTickText.text = stageTick.ToString(); }
 | 
			
		||||
            if (stageLengthText != null)
 | 
			
		||||
            { stageLengthText.text = Workspace.animationDef.animationStages[Workspace.stageID].playTimeTicks.ToString(); }
 | 
			
		||||
 | 
			
		||||
            for (int actorID = 0; actorID < actorBodies.Count; actorID++)
 | 
			
		||||
            {
 | 
			
		||||
                ActorBody actorBody = actorBodies[actorID];
 | 
			
		||||
                string bodyType = actorCards.transform.GetChild(actorID).GetComponent<ActorCard>().bodyType; //bodyTypeDropdowns[actorID].options[bodyTypeDropdowns[actorID].value].text;
 | 
			
		||||
 | 
			
		||||
                PawnAnimationClip clip = anim.animationStages[stageID].animationClips[actorID];
 | 
			
		||||
                PawnAnimationClip clip = Workspace.animationDef.animationStages[Workspace.stageID].animationClips[actorID];
 | 
			
		||||
                float clipPercent = (float)(stageTick % clip.duration) / clip.duration;
 | 
			
		||||
 | 
			
		||||
                Vector3 deltaPos = new Vector3(clip.BodyOffsetX.Evaluate(clipPercent), 0, clip.BodyOffsetZ.Evaluate(clipPercent));
 | 
			
		||||
                deltaPos += anim.actors[actorID].bodyTypeOffset.GetOffset(bodyType);
 | 
			
		||||
                deltaPos += Workspace.animationDef.actors[actorID].bodyTypeOffset.GetOffset(bodyType);
 | 
			
		||||
 | 
			
		||||
                float bodyAngle = clip.BodyAngle.Evaluate(clipPercent);
 | 
			
		||||
                float headAngle = clip.HeadAngle.Evaluate(clipPercent);
 | 
			
		||||
| 
						 | 
				
			
			@ -222,10 +123,82 @@ namespace RimWorldAnimationStudio
 | 
			
		|||
                actorBody.bodyRenderer.sprite = Resources.Load<Sprite>("Textures/Humanlike/Bodies/" + bodyType + bodyFacing);
 | 
			
		||||
                actorBody.headRenderer.sprite = Resources.Load<Sprite>("Textures/Humanlike/Heads/Head" + headFacing);
 | 
			
		||||
 | 
			
		||||
                actorBody.bodyRenderer.sortingLayerName = clip.layer.ToString();
 | 
			
		||||
                actorBody.headRenderer.sortingLayerName = clip.layer.ToString();
 | 
			
		||||
                actorBody.bodyRenderer.sortingLayerName = clip.layer;
 | 
			
		||||
                actorBody.headRenderer.sortingLayerName = clip.layer;
 | 
			
		||||
                actorBody.headRenderer.sortingOrder = headFacing == 2 ? 1 : -1;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        public void UpdateStageID()
 | 
			
		||||
        {
 | 
			
		||||
            if (Workspace.animationDef == null)
 | 
			
		||||
            {
 | 
			
		||||
                stageIDField.text = "0";
 | 
			
		||||
                return;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            int.TryParse(stageIDField.text, out int i);
 | 
			
		||||
            Workspace.stageID = Mathf.Clamp(i, 0, Workspace.animationDef.animationStages.Count - 1);
 | 
			
		||||
            stageTick = 0;
 | 
			
		||||
 | 
			
		||||
            stageIDField.text = Workspace.stageID.ToString();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void Initialize()
 | 
			
		||||
        {
 | 
			
		||||
            Debug.Log("Initializing animation preview");
 | 
			
		||||
 | 
			
		||||
            Reset();
 | 
			
		||||
 | 
			
		||||
            for (int actorID = 0; actorID < Workspace.animationDef.actors.Count; actorID++)
 | 
			
		||||
            {
 | 
			
		||||
                GameObject actorBodyObject = Instantiate(actorBodyPrefab, transform);
 | 
			
		||||
                actorBodies.Add(actorBodyObject.GetComponent<ActorBody>());
 | 
			
		||||
 | 
			
		||||
                GameObject actorCardObject = Instantiate(actorCardPrefab, actorCards);
 | 
			
		||||
                actorCardObject.GetComponent<ActorCard>().Initialize(Workspace.animationDef.actors[actorID]);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            Workspace.isDirty = false;
 | 
			
		||||
 | 
			
		||||
            UpdateAnimation();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void Reset()
 | 
			
		||||
        {
 | 
			
		||||
            Workspace.stageID = 0;
 | 
			
		||||
            stageTick = 0;
 | 
			
		||||
            isAnimating = false;
 | 
			
		||||
 | 
			
		||||
            foreach (ActorBody actorBody in actorBodies)
 | 
			
		||||
            { Destroy(actorBody.gameObject); }
 | 
			
		||||
 | 
			
		||||
            foreach (Transform actorCard in actorCards)
 | 
			
		||||
            { Destroy(actorCard.gameObject); }
 | 
			
		||||
 | 
			
		||||
            actorBodies.Clear();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void ToggleAnimation()
 | 
			
		||||
        {
 | 
			
		||||
            isAnimating = !isAnimating;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void ToggleAnimationLoop()
 | 
			
		||||
        {
 | 
			
		||||
            isLooping = !isLooping;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void UpdateFromStageTimelineSlider()
 | 
			
		||||
        {
 | 
			
		||||
            if (Workspace.animationDef == null)
 | 
			
		||||
            { return; }
 | 
			
		||||
 | 
			
		||||
            int stageLenght = Workspace.animationDef.animationStages[Workspace.stageID].playTimeTicks;
 | 
			
		||||
 | 
			
		||||
            if (stageLenght != (int)stageTimelineSlider.value)
 | 
			
		||||
            { stageTick = (int)stageTimelineSlider.value; }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										47
									
								
								Assets/Scripts/AnimationDefCard.cs
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
						 | 
				
			
			@ -0,0 +1,47 @@
 | 
			
		|||
using System;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using System.Linq;
 | 
			
		||||
using System.Text;
 | 
			
		||||
using System.Threading.Tasks;
 | 
			
		||||
using UnityEngine;
 | 
			
		||||
using UnityEngine.UI;
 | 
			
		||||
 | 
			
		||||
namespace RimWorldAnimationStudio
 | 
			
		||||
{
 | 
			
		||||
    public class AnimationDefCard : MonoBehaviour
 | 
			
		||||
    {
 | 
			
		||||
        public InputField defNameField;
 | 
			
		||||
        public InputField labelField;
 | 
			
		||||
        public Toggle playSoundsToggle;
 | 
			
		||||
 | 
			
		||||
        public void Initialize()
 | 
			
		||||
        {
 | 
			
		||||
            defNameField.text = Workspace.animationDef.defName;
 | 
			
		||||
            labelField.text = Workspace.animationDef.label;
 | 
			
		||||
            playSoundsToggle.isOn = Workspace.animationDef.sounds;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void UpdateAnimationDef()
 | 
			
		||||
        {
 | 
			
		||||
            Workspace.animationDef.defName = defNameField.text;
 | 
			
		||||
            Workspace.animationDef.label = labelField.text;
 | 
			
		||||
            Workspace.animationDef.sounds = playSoundsToggle.isOn;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void OpenSelectSexTypesDialog()
 | 
			
		||||
        {
 | 
			
		||||
            var dialog = Resources.FindObjectsOfTypeAll(typeof(SelectSexTypesDialog)) as SelectSexTypesDialog[];
 | 
			
		||||
 | 
			
		||||
            if (dialog != null)
 | 
			
		||||
            { dialog[0].Initialize(); dialog[0].Pop(); }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void OpenSelectInteractionDefsDialog()
 | 
			
		||||
        {
 | 
			
		||||
            var dialog = Resources.FindObjectsOfTypeAll(typeof(SelectInteractionDefsDialog)) as SelectInteractionDefsDialog[];
 | 
			
		||||
 | 
			
		||||
            if (dialog != null)
 | 
			
		||||
            { dialog[0].Initialize(); dialog[0].Pop(); }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -1,5 +1,5 @@
 | 
			
		|||
fileFormatVersion: 2
 | 
			
		||||
guid: 7a40ab1285a8ce74082b0d1b481d41aa
 | 
			
		||||
guid: e1d8f33927e6b4d44914a445362b802d
 | 
			
		||||
MonoImporter:
 | 
			
		||||
  externalObjects: {}
 | 
			
		||||
  serializedVersion: 2
 | 
			
		||||
							
								
								
									
										104
									
								
								Assets/Scripts/ApplicationManager.cs
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
						 | 
				
			
			@ -0,0 +1,104 @@
 | 
			
		|||
using System;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using System.Linq;
 | 
			
		||||
using System.Text;
 | 
			
		||||
using System.Threading.Tasks;
 | 
			
		||||
using UnityEngine;
 | 
			
		||||
using UnityEngine.UI;
 | 
			
		||||
using SFB;
 | 
			
		||||
 | 
			
		||||
namespace RimWorldAnimationStudio
 | 
			
		||||
{
 | 
			
		||||
    public class ApplicationManager : Singleton<ApplicationManager>
 | 
			
		||||
    {
 | 
			
		||||
        public DialogBox exitDialog;
 | 
			
		||||
        public SelectAnimationDialog selectAnimationDialog;
 | 
			
		||||
 | 
			
		||||
        public void TryToCloseApplication()
 | 
			
		||||
        {
 | 
			
		||||
            exitDialog.Pop();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void CloseApplication()
 | 
			
		||||
        {
 | 
			
		||||
            Debug.Log("Exiting application");
 | 
			
		||||
            Application.Quit();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void TryToLoadAnimation()
 | 
			
		||||
        {
 | 
			
		||||
            var paths = StandaloneFileBrowser.OpenFilePanel("Open AnimationDef File", "", "xml", false);
 | 
			
		||||
            
 | 
			
		||||
            if (paths == null || paths.Any() == false)
 | 
			
		||||
            { Debug.LogError("Selected file was null or invalid"); return; }
 | 
			
		||||
 | 
			
		||||
            Defs defs = XmlUtility.ReadXML<Defs>(paths[0]);
 | 
			
		||||
            
 | 
			
		||||
            if (defs?.animationDefs == null)
 | 
			
		||||
            { Debug.LogError("Selected file contains no animation data"); return; }
 | 
			
		||||
 | 
			
		||||
            if (defs.animationDefs.Count == 1)
 | 
			
		||||
            { LoadAnimation(defs.animationDefs[0]); return;  }
 | 
			
		||||
 | 
			
		||||
            selectAnimationDialog.Initialize(defs);
 | 
			
		||||
            selectAnimationDialog.Pop();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void LoadAnimation(AnimationDef animationDef)
 | 
			
		||||
        {
 | 
			
		||||
            Debug.Log("Loaded AnimationDef: " + animationDef.defName);
 | 
			
		||||
 | 
			
		||||
            animationDef.Initialize();
 | 
			
		||||
            Workspace.animationDef = animationDef;
 | 
			
		||||
            Workspace.isDirty = true;
 | 
			
		||||
 | 
			
		||||
            var animationDefCards = Resources.FindObjectsOfTypeAll(typeof(AnimationDefCard)) as AnimationDefCard[];
 | 
			
		||||
            Debug.Log(animationDefCards);
 | 
			
		||||
            if (animationDefCards != null)
 | 
			
		||||
            {
 | 
			
		||||
                animationDefCards[0].Initialize();
 | 
			
		||||
                animationDefCards[0].gameObject.SetActive(true);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void TrySaveAnimation()
 | 
			
		||||
        {
 | 
			
		||||
            if (Workspace.animationDef == null)
 | 
			
		||||
            { return; }
 | 
			
		||||
 | 
			
		||||
            string defName = Workspace.animationDef.defName != null && Workspace.animationDef.defName != "" ? Workspace.animationDef.defName : "newAnimationDef";
 | 
			
		||||
 | 
			
		||||
            var path = StandaloneFileBrowser.SaveFilePanel("Save AnimationDef File", "", defName, "xml");
 | 
			
		||||
 | 
			
		||||
            if (path != null && path != "")
 | 
			
		||||
            { SaveAnimation(path); }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void SaveAnimation(string path)
 | 
			
		||||
        {
 | 
			
		||||
            Debug.Log("Saving AnimationDef: " + Workspace.animationDef.defName);
 | 
			
		||||
 | 
			
		||||
            Defs defs = new Defs();
 | 
			
		||||
            defs.animationDefs.Add(Workspace.animationDef);
 | 
			
		||||
 | 
			
		||||
            XmlUtility.WriteXML(defs, path);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void NewAnimation()
 | 
			
		||||
        {
 | 
			
		||||
            return;
 | 
			
		||||
 | 
			
		||||
            AnimationDef animationDef = new AnimationDef();
 | 
			
		||||
 | 
			
		||||
            // Add one stage, add one actor, add one clip, add one frame
 | 
			
		||||
 | 
			
		||||
            Workspace.animationDef = new AnimationDef();
 | 
			
		||||
            Workspace.isDirty = true;
 | 
			
		||||
 | 
			
		||||
            var animationDefCards = Resources.FindObjectsOfTypeAll(typeof(AnimationDefCard)) as GameObject[];
 | 
			
		||||
 | 
			
		||||
            if (animationDefCards != null)
 | 
			
		||||
            { animationDefCards[0].SetActive(true); }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										11
									
								
								Assets/Scripts/ApplicationManager.cs.meta
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
						 | 
				
			
			@ -0,0 +1,11 @@
 | 
			
		|||
fileFormatVersion: 2
 | 
			
		||||
guid: 8c0c094e56b459d42850b3632db6c4ef
 | 
			
		||||
MonoImporter:
 | 
			
		||||
  externalObjects: {}
 | 
			
		||||
  serializedVersion: 2
 | 
			
		||||
  defaultReferences: []
 | 
			
		||||
  executionOrder: 0
 | 
			
		||||
  icon: {instanceID: 0}
 | 
			
		||||
  userData: 
 | 
			
		||||
  assetBundleName: 
 | 
			
		||||
  assetBundleVariant: 
 | 
			
		||||
							
								
								
									
										99
									
								
								Assets/Scripts/CameraController.cs
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
						 | 
				
			
			@ -0,0 +1,99 @@
 | 
			
		|||
using System.Collections;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using UnityEngine;
 | 
			
		||||
 | 
			
		||||
namespace RimWorldAnimationStudio
 | 
			
		||||
{
 | 
			
		||||
    public class CameraController : MonoBehaviour
 | 
			
		||||
    {
 | 
			
		||||
        private Camera cam;
 | 
			
		||||
 | 
			
		||||
        [Header("Scroll controls")]
 | 
			
		||||
        public float scrollSpeed = 100f;
 | 
			
		||||
 | 
			
		||||
        [Header("Zoom controls")]
 | 
			
		||||
        public float zoom = -5f;
 | 
			
		||||
        public float minZoom = -3f;
 | 
			
		||||
        public float maxZoom = -15f;
 | 
			
		||||
 | 
			
		||||
        [Header("Max bounds")]
 | 
			
		||||
        public float maxBoundsXAxis = 30;
 | 
			
		||||
        public float maxBoundsYAxis = 30;
 | 
			
		||||
 | 
			
		||||
        private float x;
 | 
			
		||||
        private float y;
 | 
			
		||||
 | 
			
		||||
        private float curZoom;
 | 
			
		||||
        private bool mouseDragActive = false;
 | 
			
		||||
        private Vector3 mouseDragOrigin;
 | 
			
		||||
 | 
			
		||||
        private void Start()
 | 
			
		||||
        {
 | 
			
		||||
            x = transform.position.x;
 | 
			
		||||
            y = transform.position.y;
 | 
			
		||||
 | 
			
		||||
            curZoom = zoom;
 | 
			
		||||
 | 
			
		||||
            transform.position = new Vector3(transform.position.x, transform.position.y, -10);
 | 
			
		||||
            cam = this.GetComponent<Camera>();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        private void Update()
 | 
			
		||||
        {
 | 
			
		||||
            if (Input.GetMouseButton(2))
 | 
			
		||||
            { StartMouseDrag(); }
 | 
			
		||||
 | 
			
		||||
            else if (Input.GetMouseButtonUp(2))
 | 
			
		||||
            { ResetMouseDrag(); }
 | 
			
		||||
 | 
			
		||||
            curZoom += Input.GetAxis("Mouse ScrollWheel") * scrollSpeed * 0.1f;
 | 
			
		||||
            curZoom = Mathf.Clamp(curZoom, maxZoom, minZoom);
 | 
			
		||||
 | 
			
		||||
            x = transform.position.x + Input.GetAxis("Horizontal") * scrollSpeed * Time.deltaTime;
 | 
			
		||||
            y = transform.position.y + Input.GetAxis("Vertical") * scrollSpeed * Time.deltaTime;
 | 
			
		||||
 | 
			
		||||
            Vector3 cameraPosition = Vector3.Lerp(transform.position, new Vector3(x, y, -10), 0.2f);
 | 
			
		||||
            transform.position = cameraPosition;
 | 
			
		||||
            cam.orthographicSize = Mathf.Abs(curZoom);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void SetPosition(Vector3 position)
 | 
			
		||||
        {
 | 
			
		||||
            x = position.x;
 | 
			
		||||
            y = position.y;
 | 
			
		||||
 | 
			
		||||
            transform.position = position;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void SetZoom(float zoom)
 | 
			
		||||
        {
 | 
			
		||||
            this.zoom = Mathf.Clamp(zoom, maxZoom, minZoom);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void StartMouseDrag()
 | 
			
		||||
        {
 | 
			
		||||
            Vector3 delta = cam.ScreenToWorldPoint(Input.mousePosition) - cam.transform.position;
 | 
			
		||||
 | 
			
		||||
            if (mouseDragActive == false)
 | 
			
		||||
            {
 | 
			
		||||
                mouseDragActive = true;
 | 
			
		||||
                mouseDragOrigin = cam.ScreenToWorldPoint(Input.mousePosition);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            cam.transform.position = mouseDragOrigin - delta;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void ResetMouseDrag()
 | 
			
		||||
        {
 | 
			
		||||
            mouseDragActive = false;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void ResetCamera()
 | 
			
		||||
        {
 | 
			
		||||
            cam.transform.position = new Vector3(0, 0, -10);
 | 
			
		||||
            curZoom = zoom;
 | 
			
		||||
 | 
			
		||||
            mouseDragActive = false;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										11
									
								
								Assets/Scripts/CameraController.cs.meta
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
						 | 
				
			
			@ -0,0 +1,11 @@
 | 
			
		|||
fileFormatVersion: 2
 | 
			
		||||
guid: 192ae5e804d239d42891ba0bdc42e8b6
 | 
			
		||||
MonoImporter:
 | 
			
		||||
  externalObjects: {}
 | 
			
		||||
  serializedVersion: 2
 | 
			
		||||
  defaultReferences: []
 | 
			
		||||
  executionOrder: 0
 | 
			
		||||
  icon: {instanceID: 0}
 | 
			
		||||
  userData: 
 | 
			
		||||
  assetBundleName: 
 | 
			
		||||
  assetBundleVariant: 
 | 
			
		||||
| 
						 | 
				
			
			@ -1,35 +0,0 @@
 | 
			
		|||
using System;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using System.Linq;
 | 
			
		||||
using System.Text;
 | 
			
		||||
using System.Threading.Tasks;
 | 
			
		||||
using UnityEngine;
 | 
			
		||||
using UnityEngine.UI;
 | 
			
		||||
 | 
			
		||||
namespace RimWorldAnimationStudio
 | 
			
		||||
{
 | 
			
		||||
    public class DialogBox : MonoBehaviour
 | 
			
		||||
    {
 | 
			
		||||
        public Image backSplash;
 | 
			
		||||
 | 
			
		||||
        public void Start()
 | 
			
		||||
        {
 | 
			
		||||
            //backSplash = Instanitate(new Image() { SpriteRenderer }, transform);
 | 
			
		||||
            //SpriteRenderer spriteRenderer = backSplash.GetComponent<SpriteRenderer>();
 | 
			
		||||
            //spriteRenderer.sprite = Resources.Load("whiteSquare");
 | 
			
		||||
            //spriteRenderer.color = new Color(0f, 0f, 0f, 0f.2f);
 | 
			
		||||
 | 
			
		||||
            //panelRectTransform.anchorMin = new Vector2(1, 0);
 | 
			
		||||
            //panelRectTransform.anchorMax = new Vector2(0, 1);
 | 
			
		||||
            //panelRectTransform.pivot = new Vector2(0.5f, 0.5f);
 | 
			
		||||
 | 
			
		||||
            // Set layer to backsplash?
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void Pop()
 | 
			
		||||
        {
 | 
			
		||||
            //backSplash.SetActive(gameObject.activeSelf == false);
 | 
			
		||||
            gameObject.SetActive(gameObject.activeSelf == false);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										8
									
								
								Assets/Scripts/DialogBoxes.meta
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
						 | 
				
			
			@ -0,0 +1,8 @@
 | 
			
		|||
fileFormatVersion: 2
 | 
			
		||||
guid: eabe165e5b1a70744a8073c1b5b541a7
 | 
			
		||||
folderAsset: yes
 | 
			
		||||
DefaultImporter:
 | 
			
		||||
  externalObjects: {}
 | 
			
		||||
  userData: 
 | 
			
		||||
  assetBundleName: 
 | 
			
		||||
  assetBundleVariant: 
 | 
			
		||||
							
								
								
									
										36
									
								
								Assets/Scripts/DialogBoxes/DialogBox.cs
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
						 | 
				
			
			@ -0,0 +1,36 @@
 | 
			
		|||
using System;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using System.Linq;
 | 
			
		||||
using System.Text;
 | 
			
		||||
using System.Threading.Tasks;
 | 
			
		||||
using UnityEngine;
 | 
			
		||||
using UnityEngine.UI;
 | 
			
		||||
 | 
			
		||||
namespace RimWorldAnimationStudio
 | 
			
		||||
{
 | 
			
		||||
    public class DialogBox : MonoBehaviour
 | 
			
		||||
    {
 | 
			
		||||
        public List<GameObject> cloneObjects;
 | 
			
		||||
 | 
			
		||||
        public void Pop()
 | 
			
		||||
        {
 | 
			
		||||
            gameObject.SetActive(gameObject.activeSelf == false);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void RemoveCloneObjectsFromParent(Transform parent)
 | 
			
		||||
        {
 | 
			
		||||
            for (int i = 0; i < parent.childCount; i++)
 | 
			
		||||
            { Destroy(parent.transform.GetChild(i).gameObject); }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public GameObject AddCloneObjectToParent(Transform parent, int i = 0)
 | 
			
		||||
        {
 | 
			
		||||
            GameObject cloneObject = null;
 | 
			
		||||
 | 
			
		||||
            if (cloneObjects != null && cloneObjects.Count > i)
 | 
			
		||||
            { cloneObject = Instantiate(cloneObjects[i], parent); }
 | 
			
		||||
 | 
			
		||||
            return cloneObject;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										36
									
								
								Assets/Scripts/DialogBoxes/SelectAnimationDialog.cs
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
						 | 
				
			
			@ -0,0 +1,36 @@
 | 
			
		|||
using System;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using System.Linq;
 | 
			
		||||
using System.Text;
 | 
			
		||||
using System.Threading.Tasks;
 | 
			
		||||
using UnityEngine;
 | 
			
		||||
using UnityEngine.UI;
 | 
			
		||||
 | 
			
		||||
namespace RimWorldAnimationStudio
 | 
			
		||||
{
 | 
			
		||||
    public class SelectAnimationDialog : DialogBox
 | 
			
		||||
    {
 | 
			
		||||
        public void Initialize(Defs defs)
 | 
			
		||||
        {
 | 
			
		||||
            Transform contentWindow = transform.FindDeepChild("Content");
 | 
			
		||||
            Reset();
 | 
			
		||||
 | 
			
		||||
            for (int i = 0; i < defs.animationDefs.Count; i++)
 | 
			
		||||
            {
 | 
			
		||||
                AnimationDef animationDef = defs.animationDefs[i];
 | 
			
		||||
 | 
			
		||||
                Transform _optionButton = AddCloneObjectToParent(contentWindow).transform;
 | 
			
		||||
                _optionButton.Find("Text").GetComponent<Text>().text = animationDef.defName;
 | 
			
		||||
 | 
			
		||||
                Button buttonComp = _optionButton.GetComponent<Button>();
 | 
			
		||||
                buttonComp.onClick.AddListener(delegate { Pop(); ApplicationManager.Instance.LoadAnimation(animationDef); });
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void Reset()
 | 
			
		||||
        {
 | 
			
		||||
            Transform contentWindow = transform.FindDeepChild("Content");
 | 
			
		||||
            RemoveCloneObjectsFromParent(contentWindow);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										11
									
								
								Assets/Scripts/DialogBoxes/SelectAnimationDialog.cs.meta
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
						 | 
				
			
			@ -0,0 +1,11 @@
 | 
			
		|||
fileFormatVersion: 2
 | 
			
		||||
guid: 6db038d692d34c441b171c72c78e0066
 | 
			
		||||
MonoImporter:
 | 
			
		||||
  externalObjects: {}
 | 
			
		||||
  serializedVersion: 2
 | 
			
		||||
  defaultReferences: []
 | 
			
		||||
  executionOrder: 0
 | 
			
		||||
  icon: {instanceID: 0}
 | 
			
		||||
  userData: 
 | 
			
		||||
  assetBundleName: 
 | 
			
		||||
  assetBundleVariant: 
 | 
			
		||||
							
								
								
									
										87
									
								
								Assets/Scripts/DialogBoxes/SelectBodyDefTypesDialog.cs
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
						 | 
				
			
			@ -0,0 +1,87 @@
 | 
			
		|||
using System;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using System.Linq;
 | 
			
		||||
using System.Text;
 | 
			
		||||
using System.Threading.Tasks;
 | 
			
		||||
using UnityEngine;
 | 
			
		||||
using UnityEngine.UI;
 | 
			
		||||
 | 
			
		||||
namespace RimWorldAnimationStudio
 | 
			
		||||
{
 | 
			
		||||
    public class SelectBodyDefTypesDialog : DialogBox
 | 
			
		||||
    {
 | 
			
		||||
        private Actor actor;
 | 
			
		||||
 | 
			
		||||
        public void Start()
 | 
			
		||||
        {
 | 
			
		||||
            Initialize();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void AddBodyDefType(InputField field)
 | 
			
		||||
        {
 | 
			
		||||
            Debug.Log("Attempting to add new body def type");
 | 
			
		||||
 | 
			
		||||
            if (field?.text == null || field.text == "")
 | 
			
		||||
            { Debug.LogWarning("Input field is null"); return; }
 | 
			
		||||
 | 
			
		||||
            if (Workspace.bodyDefTypes.Contains(field.text))
 | 
			
		||||
            { Debug.LogWarning("Body def type is null"); field.text = "";  return; }
 | 
			
		||||
 | 
			
		||||
            Debug.Log("Added new body type def: " + field.text);
 | 
			
		||||
            Workspace.bodyDefTypes.Add(field.text);
 | 
			
		||||
 | 
			
		||||
            Initialize();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void Initialize(Actor actor = null)
 | 
			
		||||
        {
 | 
			
		||||
            if (actor != null)
 | 
			
		||||
            { this.actor = actor; }
 | 
			
		||||
 | 
			
		||||
            if (actor == null)
 | 
			
		||||
            { actor = this.actor; }
 | 
			
		||||
 | 
			
		||||
            if (actor == null) return;
 | 
			
		||||
 | 
			
		||||
            foreach (string bodyDefType in actor.bodyDefTypes)
 | 
			
		||||
            {
 | 
			
		||||
                if (Workspace.bodyDefTypes.Contains(bodyDefType) == false)
 | 
			
		||||
                { Workspace.bodyDefTypes.Add(bodyDefType); }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            Transform contentWindow = transform.FindDeepChild("Content");
 | 
			
		||||
            Reset();
 | 
			
		||||
 | 
			
		||||
            for (int i = 0; i < Workspace.bodyDefTypes.Count; i++)
 | 
			
		||||
            {
 | 
			
		||||
                string bodyDefType = Workspace.bodyDefTypes[i];
 | 
			
		||||
 | 
			
		||||
                Transform _optionToggle = AddCloneObjectToParent(contentWindow).transform;
 | 
			
		||||
                _optionToggle.Find("Text").GetComponent<Text>().text = bodyDefType;
 | 
			
		||||
 | 
			
		||||
                Toggle toggleComp = _optionToggle.GetComponent<Toggle>();
 | 
			
		||||
                toggleComp.isOn = actor.bodyDefTypes.Contains(bodyDefType);
 | 
			
		||||
                toggleComp.onValueChanged.AddListener(delegate { 
 | 
			
		||||
                    
 | 
			
		||||
                    if (toggleComp.isOn && actor.bodyDefTypes.Contains(bodyDefType) == false)
 | 
			
		||||
                    { actor.bodyDefTypes.Add(bodyDefType); }
 | 
			
		||||
 | 
			
		||||
                    else if (toggleComp.isOn == false && actor.bodyDefTypes.Contains(bodyDefType))
 | 
			
		||||
                    { actor.bodyDefTypes.Remove(bodyDefType); }
 | 
			
		||||
                });
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            Transform _optionField = AddCloneObjectToParent(contentWindow, 1).transform;
 | 
			
		||||
            _optionField.Find("Placeholder").GetComponent<Text>().text = "Enter new body def type...";
 | 
			
		||||
 | 
			
		||||
            InputField fieldComp = _optionField.GetComponent<InputField>();
 | 
			
		||||
            fieldComp.onEndEdit.AddListener(delegate { AddBodyDefType(fieldComp); });
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void Reset()
 | 
			
		||||
        {
 | 
			
		||||
            Transform contentWindow = transform.FindDeepChild("Content");
 | 
			
		||||
            RemoveCloneObjectsFromParent(contentWindow);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										11
									
								
								Assets/Scripts/DialogBoxes/SelectBodyDefTypesDialog.cs.meta
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
						 | 
				
			
			@ -0,0 +1,11 @@
 | 
			
		|||
fileFormatVersion: 2
 | 
			
		||||
guid: b66fb83b0bed5a0438f6fbe11f0c35e0
 | 
			
		||||
MonoImporter:
 | 
			
		||||
  externalObjects: {}
 | 
			
		||||
  serializedVersion: 2
 | 
			
		||||
  defaultReferences: []
 | 
			
		||||
  executionOrder: 0
 | 
			
		||||
  icon: {instanceID: 0}
 | 
			
		||||
  userData: 
 | 
			
		||||
  assetBundleName: 
 | 
			
		||||
  assetBundleVariant: 
 | 
			
		||||
							
								
								
									
										87
									
								
								Assets/Scripts/DialogBoxes/SelectBodyPartsDialog.cs
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
						 | 
				
			
			@ -0,0 +1,87 @@
 | 
			
		|||
using System;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using System.Linq;
 | 
			
		||||
using System.Text;
 | 
			
		||||
using System.Threading.Tasks;
 | 
			
		||||
using UnityEngine;
 | 
			
		||||
using UnityEngine.UI;
 | 
			
		||||
 | 
			
		||||
namespace RimWorldAnimationStudio
 | 
			
		||||
{
 | 
			
		||||
    public class SelectBodyPartsDialog : DialogBox
 | 
			
		||||
    {
 | 
			
		||||
        private Actor actor;
 | 
			
		||||
 | 
			
		||||
        public void Start()
 | 
			
		||||
        {
 | 
			
		||||
            Initialize();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void AddBodyPart(InputField field)
 | 
			
		||||
        {
 | 
			
		||||
            Debug.Log("Attempting to add new body part");
 | 
			
		||||
 | 
			
		||||
            if (field?.text == null || field.text == "")
 | 
			
		||||
            { Debug.LogWarning("Input field is null"); return; }
 | 
			
		||||
 | 
			
		||||
            if (Workspace.bodyParts.Contains(field.text))
 | 
			
		||||
            { Debug.LogWarning("Body part is null"); field.text = "";  return; }
 | 
			
		||||
 | 
			
		||||
            Debug.Log("Add new body part: " + field.text);
 | 
			
		||||
            Workspace.bodyParts.Add(field.text);
 | 
			
		||||
 | 
			
		||||
            Initialize();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void Initialize(Actor actor = null)
 | 
			
		||||
        {
 | 
			
		||||
            if (actor != null)
 | 
			
		||||
            { this.actor = actor; }
 | 
			
		||||
 | 
			
		||||
            if (actor == null)
 | 
			
		||||
            { actor = this.actor; }
 | 
			
		||||
 | 
			
		||||
            if (actor == null) return;
 | 
			
		||||
 | 
			
		||||
            foreach (string bodyPart in actor.requiredGenitals)
 | 
			
		||||
            {
 | 
			
		||||
                if (Workspace.bodyParts.Contains(bodyPart) == false)
 | 
			
		||||
                { Workspace.bodyParts.Add(bodyPart); }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            Transform contentWindow = transform.FindDeepChild("Content");
 | 
			
		||||
            Reset();
 | 
			
		||||
 | 
			
		||||
            for (int i = 0; i < Workspace.bodyParts.Count; i++)
 | 
			
		||||
            {
 | 
			
		||||
                string bodyPart = Workspace.bodyParts[i];
 | 
			
		||||
 | 
			
		||||
                Transform _optionToggle = AddCloneObjectToParent(contentWindow).transform;
 | 
			
		||||
                _optionToggle.Find("Text").GetComponent<Text>().text = bodyPart;
 | 
			
		||||
 | 
			
		||||
                Toggle toggleComp = _optionToggle.GetComponent<Toggle>();
 | 
			
		||||
                toggleComp.isOn = actor.requiredGenitals.Contains(bodyPart);
 | 
			
		||||
                toggleComp.onValueChanged.AddListener(delegate { 
 | 
			
		||||
                    
 | 
			
		||||
                    if (toggleComp.isOn && actor.requiredGenitals.Contains(bodyPart) == false)
 | 
			
		||||
                    { actor.requiredGenitals.Add(bodyPart); }
 | 
			
		||||
 | 
			
		||||
                    else if (toggleComp.isOn == false && actor.requiredGenitals.Contains(bodyPart))
 | 
			
		||||
                    { actor.requiredGenitals.Remove(bodyPart); }
 | 
			
		||||
                });
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            Transform _optionField = AddCloneObjectToParent(contentWindow, 1).transform;
 | 
			
		||||
            _optionField.Find("Placeholder").GetComponent<Text>().text = "Enter new body part name...";
 | 
			
		||||
 | 
			
		||||
            InputField fieldComp = _optionField.GetComponent<InputField>();
 | 
			
		||||
            fieldComp.onEndEdit.AddListener(delegate { AddBodyPart(fieldComp); });
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void Reset()
 | 
			
		||||
        {
 | 
			
		||||
            Transform contentWindow = transform.FindDeepChild("Content");
 | 
			
		||||
            RemoveCloneObjectsFromParent(contentWindow);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										11
									
								
								Assets/Scripts/DialogBoxes/SelectBodyPartsDialog.cs.meta
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
						 | 
				
			
			@ -0,0 +1,11 @@
 | 
			
		|||
fileFormatVersion: 2
 | 
			
		||||
guid: 459a1b2a918e12f468445853ea5821e0
 | 
			
		||||
MonoImporter:
 | 
			
		||||
  externalObjects: {}
 | 
			
		||||
  serializedVersion: 2
 | 
			
		||||
  defaultReferences: []
 | 
			
		||||
  executionOrder: 0
 | 
			
		||||
  icon: {instanceID: 0}
 | 
			
		||||
  userData: 
 | 
			
		||||
  assetBundleName: 
 | 
			
		||||
  assetBundleVariant: 
 | 
			
		||||
							
								
								
									
										87
									
								
								Assets/Scripts/DialogBoxes/SelectDefNamesDialog.cs
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
						 | 
				
			
			@ -0,0 +1,87 @@
 | 
			
		|||
using System;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using System.Linq;
 | 
			
		||||
using System.Text;
 | 
			
		||||
using System.Threading.Tasks;
 | 
			
		||||
using UnityEngine;
 | 
			
		||||
using UnityEngine.UI;
 | 
			
		||||
 | 
			
		||||
namespace RimWorldAnimationStudio
 | 
			
		||||
{
 | 
			
		||||
    public class SelectDefNamesDialog : DialogBox
 | 
			
		||||
    {
 | 
			
		||||
        private Actor actor;
 | 
			
		||||
 | 
			
		||||
        public void Start()
 | 
			
		||||
        {
 | 
			
		||||
            Initialize();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void AddDefName(InputField field)
 | 
			
		||||
        {
 | 
			
		||||
            Debug.Log("Attempting to add new def name");
 | 
			
		||||
 | 
			
		||||
            if (field?.text == null || field.text == "")
 | 
			
		||||
            { Debug.LogWarning("Input field is null"); return; }
 | 
			
		||||
 | 
			
		||||
            if (Workspace.defNames.Contains(field.text))
 | 
			
		||||
            { Debug.LogWarning("Def name is null"); field.text = "";  return; }
 | 
			
		||||
 | 
			
		||||
            Debug.Log("Added new def name: " + field.text);
 | 
			
		||||
            Workspace.defNames.Add(field.text);
 | 
			
		||||
 | 
			
		||||
            Initialize();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void Initialize(Actor actor = null)
 | 
			
		||||
        {
 | 
			
		||||
            if (actor != null)
 | 
			
		||||
            { this.actor = actor; }
 | 
			
		||||
 | 
			
		||||
            if (actor == null)
 | 
			
		||||
            { actor = this.actor; }
 | 
			
		||||
 | 
			
		||||
            if (actor == null) return;
 | 
			
		||||
 | 
			
		||||
            foreach (string defName in actor.defNames)
 | 
			
		||||
            {
 | 
			
		||||
                if (Workspace.defNames.Contains(defName) == false)
 | 
			
		||||
                { Workspace.defNames.Add(defName); }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            Transform contentWindow = transform.FindDeepChild("Content");
 | 
			
		||||
            Reset();
 | 
			
		||||
 | 
			
		||||
            for (int i = 0; i < Workspace.defNames.Count; i++)
 | 
			
		||||
            {
 | 
			
		||||
                string defName = Workspace.defNames[i];
 | 
			
		||||
 | 
			
		||||
                Transform _optionToggle = AddCloneObjectToParent(contentWindow).transform;
 | 
			
		||||
                _optionToggle.Find("Text").GetComponent<Text>().text = defName;
 | 
			
		||||
 | 
			
		||||
                Toggle toggleComp = _optionToggle.GetComponent<Toggle>();
 | 
			
		||||
                toggleComp.isOn = actor.defNames.Contains(defName);
 | 
			
		||||
                toggleComp.onValueChanged.AddListener(delegate { 
 | 
			
		||||
                    
 | 
			
		||||
                    if (toggleComp.isOn && actor.defNames.Contains(defName) == false)
 | 
			
		||||
                    { actor.defNames.Add(defName); }
 | 
			
		||||
 | 
			
		||||
                    else if (toggleComp.isOn == false && actor.defNames.Contains(defName))
 | 
			
		||||
                    { actor.defNames.Remove(defName); }
 | 
			
		||||
                });
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            Transform _optionField = AddCloneObjectToParent(contentWindow, 1).transform;
 | 
			
		||||
            _optionField.Find("Placeholder").GetComponent<Text>().text = "Enter new def name...";
 | 
			
		||||
 | 
			
		||||
            InputField fieldComp = _optionField.GetComponent<InputField>();
 | 
			
		||||
            fieldComp.onEndEdit.AddListener(delegate { AddDefName(fieldComp); });
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void Reset()
 | 
			
		||||
        {
 | 
			
		||||
            Transform contentWindow = transform.FindDeepChild("Content");
 | 
			
		||||
            RemoveCloneObjectsFromParent(contentWindow);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										11
									
								
								Assets/Scripts/DialogBoxes/SelectDefNamesDialog.cs.meta
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
						 | 
				
			
			@ -0,0 +1,11 @@
 | 
			
		|||
fileFormatVersion: 2
 | 
			
		||||
guid: 9842b9e0fd45d4643af5bed7ba2de307
 | 
			
		||||
MonoImporter:
 | 
			
		||||
  externalObjects: {}
 | 
			
		||||
  serializedVersion: 2
 | 
			
		||||
  defaultReferences: []
 | 
			
		||||
  executionOrder: 0
 | 
			
		||||
  icon: {instanceID: 0}
 | 
			
		||||
  userData: 
 | 
			
		||||
  assetBundleName: 
 | 
			
		||||
  assetBundleVariant: 
 | 
			
		||||
							
								
								
									
										76
									
								
								Assets/Scripts/DialogBoxes/SelectInteractionDefsDialog.cs
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
						 | 
				
			
			@ -0,0 +1,76 @@
 | 
			
		|||
using System;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using System.Linq;
 | 
			
		||||
using System.Text;
 | 
			
		||||
using System.Threading.Tasks;
 | 
			
		||||
using UnityEngine;
 | 
			
		||||
using UnityEngine.UI;
 | 
			
		||||
 | 
			
		||||
namespace RimWorldAnimationStudio
 | 
			
		||||
{
 | 
			
		||||
    public class SelectInteractionDefsDialog : DialogBox
 | 
			
		||||
    {
 | 
			
		||||
        public void Start()
 | 
			
		||||
        {
 | 
			
		||||
            Initialize();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void AddBodyPart(InputField field)
 | 
			
		||||
        {
 | 
			
		||||
            if (field?.text == null || field.text == "")
 | 
			
		||||
            { return; }
 | 
			
		||||
 | 
			
		||||
            if (Workspace.bodyParts.Contains(field.text))
 | 
			
		||||
            { field.text = ""; return; }
 | 
			
		||||
 | 
			
		||||
            Workspace.interactionDefTypes.Add(field.text);
 | 
			
		||||
 | 
			
		||||
            Initialize();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void Initialize()
 | 
			
		||||
        {
 | 
			
		||||
            if (Workspace.animationDef == null) return;
 | 
			
		||||
 | 
			
		||||
            foreach (string interactionDefType in Workspace.animationDef.interactionDefTypes)
 | 
			
		||||
            {
 | 
			
		||||
                if (Workspace.interactionDefTypes.Contains(interactionDefType) == false)
 | 
			
		||||
                { Workspace.interactionDefTypes.Add(interactionDefType); }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            Transform contentWindow = transform.FindDeepChild("Content");
 | 
			
		||||
            Reset();
 | 
			
		||||
 | 
			
		||||
            for (int i = 0; i < Workspace.bodyParts.Count; i++)
 | 
			
		||||
            {
 | 
			
		||||
                string interactionDefType = Workspace.interactionDefTypes[i];
 | 
			
		||||
 | 
			
		||||
                Transform _optionToggle = AddCloneObjectToParent(contentWindow).transform;
 | 
			
		||||
                _optionToggle.Find("Text").GetComponent<Text>().text = interactionDefType;
 | 
			
		||||
 | 
			
		||||
                Toggle toggleComp = _optionToggle.GetComponent<Toggle>();
 | 
			
		||||
                toggleComp.isOn = Workspace.animationDef.interactionDefTypes.Contains(interactionDefType);
 | 
			
		||||
                toggleComp.onValueChanged.AddListener(delegate { 
 | 
			
		||||
                    
 | 
			
		||||
                    if (toggleComp.isOn && Workspace.animationDef.interactionDefTypes.Contains(interactionDefType) == false)
 | 
			
		||||
                    { Workspace.animationDef.interactionDefTypes.Add(interactionDefType); }
 | 
			
		||||
 | 
			
		||||
                    else if (toggleComp.isOn == false && Workspace.animationDef.interactionDefTypes.Contains(interactionDefType))
 | 
			
		||||
                    { Workspace.animationDef.interactionDefTypes.Remove(interactionDefType); }
 | 
			
		||||
                });
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            Transform _optionField = AddCloneObjectToParent(contentWindow, 1).transform;
 | 
			
		||||
            _optionField.Find("Placeholder").GetComponent<Text>().text = "Enter new interaction def type...";
 | 
			
		||||
 | 
			
		||||
            InputField fieldComp = _optionField.GetComponent<InputField>();
 | 
			
		||||
            fieldComp.onEndEdit.AddListener(delegate { AddBodyPart(fieldComp); });
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void Reset()
 | 
			
		||||
        {
 | 
			
		||||
            Transform contentWindow = transform.FindDeepChild("Content");
 | 
			
		||||
            RemoveCloneObjectsFromParent(contentWindow);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,11 @@
 | 
			
		|||
fileFormatVersion: 2
 | 
			
		||||
guid: cace588a3682dc649b94355d8eee4a77
 | 
			
		||||
MonoImporter:
 | 
			
		||||
  externalObjects: {}
 | 
			
		||||
  serializedVersion: 2
 | 
			
		||||
  defaultReferences: []
 | 
			
		||||
  executionOrder: 0
 | 
			
		||||
  icon: {instanceID: 0}
 | 
			
		||||
  userData: 
 | 
			
		||||
  assetBundleName: 
 | 
			
		||||
  assetBundleVariant: 
 | 
			
		||||
							
								
								
									
										76
									
								
								Assets/Scripts/DialogBoxes/SelectSexTypesDialog.cs
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
						 | 
				
			
			@ -0,0 +1,76 @@
 | 
			
		|||
using System;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using System.Linq;
 | 
			
		||||
using System.Text;
 | 
			
		||||
using System.Threading.Tasks;
 | 
			
		||||
using UnityEngine;
 | 
			
		||||
using UnityEngine.UI;
 | 
			
		||||
 | 
			
		||||
namespace RimWorldAnimationStudio
 | 
			
		||||
{
 | 
			
		||||
    public class SelectSexTypesDialog : DialogBox
 | 
			
		||||
    {
 | 
			
		||||
        public void Start()
 | 
			
		||||
        {
 | 
			
		||||
            Initialize();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void AddSexType(InputField field)
 | 
			
		||||
        {
 | 
			
		||||
            if (field?.text == null || field.text == "")
 | 
			
		||||
            { return; }
 | 
			
		||||
 | 
			
		||||
            if (Workspace.bodyParts.Contains(field.text))
 | 
			
		||||
            { field.text = "";  return; }
 | 
			
		||||
 | 
			
		||||
            Workspace.sexTypes.Add(field.text);
 | 
			
		||||
 | 
			
		||||
            Initialize();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void Initialize()
 | 
			
		||||
        {
 | 
			
		||||
            if (Workspace.animationDef == null) return;
 | 
			
		||||
 | 
			
		||||
            foreach (string sexType in Workspace.animationDef.sexTypes)
 | 
			
		||||
            {
 | 
			
		||||
                if (Workspace.sexTypes.Contains(sexType) == false)
 | 
			
		||||
                { Workspace.sexTypes.Add(sexType); }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            Transform contentWindow = transform.FindDeepChild("Content");
 | 
			
		||||
            Reset();
 | 
			
		||||
 | 
			
		||||
            for (int i = 0; i < Workspace.bodyParts.Count; i++)
 | 
			
		||||
            {
 | 
			
		||||
                string sexType = Workspace.sexTypes[i];
 | 
			
		||||
 | 
			
		||||
                Transform _optionToggle = AddCloneObjectToParent(contentWindow).transform;
 | 
			
		||||
                _optionToggle.Find("Text").GetComponent<Text>().text = sexType;
 | 
			
		||||
 | 
			
		||||
                Toggle toggleComp = _optionToggle.GetComponent<Toggle>();
 | 
			
		||||
                toggleComp.isOn = Workspace.animationDef.sexTypes.Contains(sexType);
 | 
			
		||||
                toggleComp.onValueChanged.AddListener(delegate { 
 | 
			
		||||
                    
 | 
			
		||||
                    if (toggleComp.isOn && Workspace.animationDef.sexTypes.Contains(sexType) == false)
 | 
			
		||||
                    { Workspace.animationDef.sexTypes.Add(sexType); }
 | 
			
		||||
 | 
			
		||||
                    else if (toggleComp.isOn == false && Workspace.animationDef.sexTypes.Contains(sexType))
 | 
			
		||||
                    { Workspace.animationDef.sexTypes.Remove(sexType); }
 | 
			
		||||
                });
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            Transform _optionField = AddCloneObjectToParent(contentWindow, 1).transform;
 | 
			
		||||
            _optionField.Find("Placeholder").GetComponent<Text>().text = "Enter new sex type...";
 | 
			
		||||
 | 
			
		||||
            InputField fieldComp = _optionField.GetComponent<InputField>();
 | 
			
		||||
            fieldComp.onEndEdit.AddListener(delegate { AddSexType(fieldComp); });
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void Reset()
 | 
			
		||||
        {
 | 
			
		||||
            Transform contentWindow = transform.FindDeepChild("Content");
 | 
			
		||||
            RemoveCloneObjectsFromParent(contentWindow);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										11
									
								
								Assets/Scripts/DialogBoxes/SelectSexTypesDialog.cs.meta
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
						 | 
				
			
			@ -0,0 +1,11 @@
 | 
			
		|||
fileFormatVersion: 2
 | 
			
		||||
guid: 1d4b7a5a5ddb7d744b726c3c13e2fc5e
 | 
			
		||||
MonoImporter:
 | 
			
		||||
  externalObjects: {}
 | 
			
		||||
  serializedVersion: 2
 | 
			
		||||
  defaultReferences: []
 | 
			
		||||
  executionOrder: 0
 | 
			
		||||
  icon: {instanceID: 0}
 | 
			
		||||
  userData: 
 | 
			
		||||
  assetBundleName: 
 | 
			
		||||
  assetBundleVariant: 
 | 
			
		||||
| 
						 | 
				
			
			@ -1,43 +0,0 @@
 | 
			
		|||
using System.Xml;
 | 
			
		||||
using System.Xml.Serialization;
 | 
			
		||||
 | 
			
		||||
public enum AltitudeLayer
 | 
			
		||||
{
 | 
			
		||||
	[XmlEnum(Name = "Terrain")] Terrain,
 | 
			
		||||
	[XmlEnum(Name = "TerrainScatter")] TerrainScatter,
 | 
			
		||||
	[XmlEnum(Name = "Floor")] Floor,
 | 
			
		||||
	[XmlEnum(Name = "Conduits")] Conduits,
 | 
			
		||||
	[XmlEnum(Name = "FloorCoverings")] FloorCoverings,
 | 
			
		||||
	[XmlEnum(Name = "FloorEmplacement")] FloorEmplacement,
 | 
			
		||||
	[XmlEnum(Name = "Filth")] Filth,
 | 
			
		||||
	[XmlEnum(Name = "Zone")] Zone,
 | 
			
		||||
	[XmlEnum(Name = "SmallWire")] SmallWire,
 | 
			
		||||
	[XmlEnum(Name = "LowPlant")] LowPlant,
 | 
			
		||||
	[XmlEnum(Name = "MoteLow")] MoteLow,
 | 
			
		||||
	[XmlEnum(Name = "Shadows")] Shadows,
 | 
			
		||||
	[XmlEnum(Name = "DoorMoveable")] DoorMoveable,
 | 
			
		||||
	[XmlEnum(Name = "Building")] Building,
 | 
			
		||||
	[XmlEnum(Name = "BuildingOnTop")] BuildingOnTop,
 | 
			
		||||
	[XmlEnum(Name = "MoteBelowThings")] MoteBelowThings,
 | 
			
		||||
	[XmlEnum(Name = "Item")] Item,
 | 
			
		||||
	[XmlEnum(Name = "ItemImportant")] ItemImportant,
 | 
			
		||||
	[XmlEnum(Name = "LayingPawn")] LayingPawn,
 | 
			
		||||
	[XmlEnum(Name = "PawnRope")] PawnRope,
 | 
			
		||||
	[XmlEnum(Name = "Projectile")] Projectile,
 | 
			
		||||
	[XmlEnum(Name = "Pawn")] Pawn,
 | 
			
		||||
	[XmlEnum(Name = "PawnUnused")] PawnUnused,
 | 
			
		||||
	[XmlEnum(Name = "PawnState")] PawnState,
 | 
			
		||||
	[XmlEnum(Name = "Blueprint")] Blueprint,
 | 
			
		||||
	[XmlEnum(Name = "MoteOverheadLow")] MoteOverheadLow,
 | 
			
		||||
	[XmlEnum(Name = "MoteOverhead")] MoteOverhead,
 | 
			
		||||
	[XmlEnum(Name = "Gas")] Gas,
 | 
			
		||||
	[XmlEnum(Name = "Skyfaller")] Skyfaller,
 | 
			
		||||
	[XmlEnum(Name = "Weather")] Weather,
 | 
			
		||||
	[XmlEnum(Name = "LightingOverlay")] LightingOverlay,
 | 
			
		||||
	[XmlEnum(Name = "VisEffects")] VisEffects,
 | 
			
		||||
	[XmlEnum(Name = "FogOfWar")] FogOfWar,
 | 
			
		||||
	[XmlEnum(Name = "WorldClipper")] WorldClipper,
 | 
			
		||||
	[XmlEnum(Name = "MapDataOverlay")] MapDataOverlay,
 | 
			
		||||
	[XmlEnum(Name = "MetaOverlays")] MetaOverlays,
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										8
									
								
								Assets/Scripts/Extensions.meta
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
						 | 
				
			
			@ -0,0 +1,8 @@
 | 
			
		|||
fileFormatVersion: 2
 | 
			
		||||
guid: 4b51dcdd346a0cc469b21a6ffe1592fc
 | 
			
		||||
folderAsset: yes
 | 
			
		||||
DefaultImporter:
 | 
			
		||||
  externalObjects: {}
 | 
			
		||||
  userData: 
 | 
			
		||||
  assetBundleName: 
 | 
			
		||||
  assetBundleVariant: 
 | 
			
		||||
							
								
								
									
										19
									
								
								Assets/Scripts/Extensions/IListExtensions.cs
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
						 | 
				
			
			@ -0,0 +1,19 @@
 | 
			
		|||
using System;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using System.Linq;
 | 
			
		||||
using System.Text;
 | 
			
		||||
using System.Threading.Tasks;
 | 
			
		||||
 | 
			
		||||
public static class IListExtensions
 | 
			
		||||
{
 | 
			
		||||
	public static bool NullOrEmpty<T>(this IList<T> list)
 | 
			
		||||
	{
 | 
			
		||||
		return list == null || list.Any() == false;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	public static bool NotNullOrEmpty<T>(this IList<T> list)
 | 
			
		||||
	{
 | 
			
		||||
		return NullOrEmpty<T>(list) == false;
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										11
									
								
								Assets/Scripts/Extensions/IListExtensions.cs.meta
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
						 | 
				
			
			@ -0,0 +1,11 @@
 | 
			
		|||
fileFormatVersion: 2
 | 
			
		||||
guid: a030b2589ac872442a0d1aea7f5b5e70
 | 
			
		||||
MonoImporter:
 | 
			
		||||
  externalObjects: {}
 | 
			
		||||
  serializedVersion: 2
 | 
			
		||||
  defaultReferences: []
 | 
			
		||||
  executionOrder: 0
 | 
			
		||||
  icon: {instanceID: 0}
 | 
			
		||||
  userData: 
 | 
			
		||||
  assetBundleName: 
 | 
			
		||||
  assetBundleVariant: 
 | 
			
		||||
							
								
								
									
										24
									
								
								Assets/Scripts/Extensions/TransformExtensions.cs
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
						 | 
				
			
			@ -0,0 +1,24 @@
 | 
			
		|||
using UnityEngine;
 | 
			
		||||
using System.Collections;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
 | 
			
		||||
public static class TransformExtensions
 | 
			
		||||
{
 | 
			
		||||
    public static Transform FindDeepChild(this Transform parent, string childName)
 | 
			
		||||
    {
 | 
			
		||||
        Queue<Transform> queue = new Queue<Transform>();
 | 
			
		||||
        queue.Enqueue(parent);
 | 
			
		||||
 | 
			
		||||
        while (queue.Count > 0)
 | 
			
		||||
        {
 | 
			
		||||
            var c = queue.Dequeue();
 | 
			
		||||
            if (c.name == childName)
 | 
			
		||||
                return c;
 | 
			
		||||
            foreach (Transform t in c)
 | 
			
		||||
                queue.Enqueue(t);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        return null;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										11
									
								
								Assets/Scripts/Extensions/TransformExtensions.cs.meta
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
						 | 
				
			
			@ -0,0 +1,11 @@
 | 
			
		|||
fileFormatVersion: 2
 | 
			
		||||
guid: 859d0be8594b5bc46aa3fb70f78149ee
 | 
			
		||||
MonoImporter:
 | 
			
		||||
  externalObjects: {}
 | 
			
		||||
  serializedVersion: 2
 | 
			
		||||
  defaultReferences: []
 | 
			
		||||
  executionOrder: 0
 | 
			
		||||
  icon: {instanceID: 0}
 | 
			
		||||
  userData: 
 | 
			
		||||
  assetBundleName: 
 | 
			
		||||
  assetBundleVariant: 
 | 
			
		||||
							
								
								
									
										52
									
								
								Assets/Scripts/Singleton.cs
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
						 | 
				
			
			@ -0,0 +1,52 @@
 | 
			
		|||
using System;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using UnityEngine;
 | 
			
		||||
 | 
			
		||||
namespace RimWorldAnimationStudio
 | 
			
		||||
{
 | 
			
		||||
    public class Singleton<T> : MonoBehaviour where T : MonoBehaviour
 | 
			
		||||
    {
 | 
			
		||||
        private static bool shuttingDown = false;
 | 
			
		||||
        private static object threadLock = new object();
 | 
			
		||||
        private static T instance;
 | 
			
		||||
 | 
			
		||||
        public static T Instance
 | 
			
		||||
        {
 | 
			
		||||
            get
 | 
			
		||||
            {
 | 
			
		||||
                if (shuttingDown)
 | 
			
		||||
                {
 | 
			
		||||
                    Debug.LogWarning("[Singleton] Instance '" + typeof(T) + "' already destroyed. Returning null.");
 | 
			
		||||
                    return null;
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
                lock (threadLock)
 | 
			
		||||
                {
 | 
			
		||||
                    if (instance == null)
 | 
			
		||||
                    {
 | 
			
		||||
                        instance = (T)FindObjectOfType(typeof(T));
 | 
			
		||||
 | 
			
		||||
                        if (instance == null)
 | 
			
		||||
                        {
 | 
			
		||||
                            var singletonObject = new GameObject();
 | 
			
		||||
                            instance = singletonObject.AddComponent<T>();
 | 
			
		||||
                            singletonObject.name = typeof(T).ToString() + " (Singleton)";
 | 
			
		||||
                        }
 | 
			
		||||
                    }
 | 
			
		||||
 | 
			
		||||
                    return instance;
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        private void Awake()
 | 
			
		||||
        {
 | 
			
		||||
            DontDestroyOnLoad(this.gameObject);
 | 
			
		||||
        }
 | 
			
		||||
       
 | 
			
		||||
        private void OnDestroy()
 | 
			
		||||
        {
 | 
			
		||||
            shuttingDown = true;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										11
									
								
								Assets/Scripts/Singleton.cs.meta
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
						 | 
				
			
			@ -0,0 +1,11 @@
 | 
			
		|||
fileFormatVersion: 2
 | 
			
		||||
guid: c2afae193e74a1e4ba127241833aea0e
 | 
			
		||||
MonoImporter:
 | 
			
		||||
  externalObjects: {}
 | 
			
		||||
  serializedVersion: 2
 | 
			
		||||
  defaultReferences: []
 | 
			
		||||
  executionOrder: 0
 | 
			
		||||
  icon: {instanceID: 0}
 | 
			
		||||
  userData: 
 | 
			
		||||
  assetBundleName: 
 | 
			
		||||
  assetBundleVariant: 
 | 
			
		||||
| 
						 | 
				
			
			@ -7,41 +7,21 @@ using UnityEngine;
 | 
			
		|||
 | 
			
		||||
namespace RimWorldAnimationStudio
 | 
			
		||||
{
 | 
			
		||||
    public class Workspace : MonoBehaviour
 | 
			
		||||
    public class Workspace : Singleton<Workspace>
 | 
			
		||||
    {
 | 
			
		||||
        public AnimationDef animationDef;
 | 
			
		||||
        public int stageID = 0;
 | 
			
		||||
        public bool isDirty = false;
 | 
			
		||||
        public static AnimationDef animationDef;
 | 
			
		||||
        public static int stageID = 0;
 | 
			
		||||
        public static bool isDirty = false;
 | 
			
		||||
 | 
			
		||||
        public List<WorkspaceSnapShot> workspaceHistory = new List<WorkspaceSnapShot>();
 | 
			
		||||
        public int maxHistoryDepth = 100;
 | 
			
		||||
        public int historyIndex = 0;
 | 
			
		||||
        public static List<string> defNames = new List<string>() { "Human" };
 | 
			
		||||
        public static List<string> bodyParts = new List<string>() { "Penis", "Vagina", "Anus", "Breasts", "Mouth" };
 | 
			
		||||
        public static List<string> bodyDefTypes = new List<string>() { "Human" };
 | 
			
		||||
        public static List<string> sexTypes = new List<string>() { "None", "Vaginal", "Anal", "Oral", "Masturbation", "DoublePenetration", "Boobjob", "Handjob", "Footjob", "Fingering", "Scissoring", "MutualMasturbation", "Fisting", "MechImplant", "Rimming", "Fellatio", "Cunnilingus", "Sixtynine" };
 | 
			
		||||
        public static List<string> interactionDefTypes = new List<string>();
 | 
			
		||||
 | 
			
		||||
        public void TryToCloseApplication()
 | 
			
		||||
        {
 | 
			
		||||
            if (isDirty)
 | 
			
		||||
            { 
 | 
			
		||||
                //exitDialog.Pop();
 | 
			
		||||
                return;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            CloseApplication();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void CloseApplication()
 | 
			
		||||
        {
 | 
			
		||||
            Application.Quit();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void GenerateLoadOptions(Defs defs)
 | 
			
		||||
        {
 | 
			
		||||
            for (int i = 0; i < defs.animationDefs.Count - 1; i++)
 | 
			
		||||
            {
 | 
			
		||||
                //Instantiate child button
 | 
			
		||||
                //button.text
 | 
			
		||||
                //buttoncallback = LoadADef(list[i]);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        private static List<WorkspaceSnapShot> workspaceHistory = new List<WorkspaceSnapShot>();
 | 
			
		||||
        private static int maxHistoryDepth = 100;
 | 
			
		||||
        private static int historyIndex = 0;
 | 
			
		||||
 | 
			
		||||
        public void TrackChanges()
 | 
			
		||||
        {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -8,9 +8,9 @@ using System.Xml.Serialization;
 | 
			
		|||
 | 
			
		||||
namespace RimWorldAnimationStudio
 | 
			
		||||
{
 | 
			
		||||
    public class XmlUtility
 | 
			
		||||
    public static class XmlUtility
 | 
			
		||||
    {
 | 
			
		||||
        public T ReadXML<T>(string path)
 | 
			
		||||
        public static T ReadXML<T>(string path)
 | 
			
		||||
        {
 | 
			
		||||
            using (StreamReader stringReader = new StreamReader(path))
 | 
			
		||||
            {
 | 
			
		||||
| 
						 | 
				
			
			@ -20,17 +20,17 @@ namespace RimWorldAnimationStudio
 | 
			
		|||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void WriteXML(AnimationDef animationDef, string path)
 | 
			
		||||
        public static void WriteXML(Defs defs, string path)
 | 
			
		||||
        {
 | 
			
		||||
            if (animationDef == null || path == null || path == "")
 | 
			
		||||
            if (defs == null || path == null || path == "")
 | 
			
		||||
            { return; }
 | 
			
		||||
 | 
			
		||||
            XmlSerializer writer = new XmlSerializer(typeof(AnimationDef));
 | 
			
		||||
            XmlSerializer writer = new XmlSerializer(typeof(Defs));
 | 
			
		||||
            XmlSerializerNamespaces nameSpaces = new XmlSerializerNamespaces();
 | 
			
		||||
            nameSpaces.Add("", "");
 | 
			
		||||
 | 
			
		||||
            FileStream file = File.Create(path);
 | 
			
		||||
            writer.Serialize(file, animationDef, nameSpaces);
 | 
			
		||||
            writer.Serialize(file, defs, nameSpaces);
 | 
			
		||||
            file.Close();
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||