Compare commits

...
10 Commits
Author SHA1 Message Date
Jiaqi Liu c5dc4d7335 v0.67 2023-08-01 22:52:28 -07:00
Jiaqi Liu 34370ec2e8 Add more supported build targets 2023-08-01 22:28:53 -07:00
Jiaqi Liu bd892fb3fb Fix a regression on path separator handling for unix-like system 2023-08-01 21:52:38 -07:00
Jiaqi Liu 39c27b04d7 Implement flashing animation for time-sensitive dialogue 2023-08-01 20:59:35 -07:00
Jiaqi Liu b1afd47878 Add background image to dialogue selection buttons
Add background image to dialogue selection buttons.
Add mov preview in game resource viewer.
Add padding to dialogue selection button text
2023-08-01 16:15:36 -07:00
Jiaqi Liu 9286d3160a Code refactoring 2023-08-01 13:49:12 -07:00
Jiaqi Liu 54fb05093c Code refactoring 2023-08-01 09:00:29 -07:00
Jiaqi Liu f872dd7c3d Remove hack code 2023-07-31 00:59:36 -07:00
Jiaqi Liu 9ffebd2b71 Fix shader issue with Metal on MacOS 2023-07-31 00:48:07 -07:00
Jiaqi Liu 4c6c8752d9 Code refactoring 2023-07-30 22:01:05 -07:00
31 changed files with 988 additions and 531 deletions

No files matched your search

@@ -34,7 +34,6 @@ RectTransform:
m_Children:
- {fileID: 584702074}
m_Father: {fileID: 7962283254459483698}
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
@@ -136,9 +135,9 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_IgnoreLayout: 0
m_MinWidth: 100
m_MinWidth: 70
m_MinHeight: -1
m_PreferredWidth: 130
m_PreferredWidth: 100
m_PreferredHeight: -1
m_FlexibleWidth: -1
m_FlexibleHeight: -1
@@ -174,7 +173,6 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 584360809}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
@@ -209,7 +207,7 @@ MonoBehaviour:
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: Rand.mv3
m_text: .mv3
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 9e1d886e63529bb4ca3c95ece3e3189c, type: 2}
m_sharedMaterial: {fileID: 2847917559404452115, guid: 9e1d886e63529bb4ca3c95ece3e3189c, type: 2}
@@ -310,7 +308,6 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 7962283254459483698}
m_RootOrder: 7
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
@@ -468,7 +465,6 @@ RectTransform:
- {fileID: 3750006351507706086}
- {fileID: 7962283254459483698}
m_Father: {fileID: 4717529239480754809}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
@@ -492,6 +488,7 @@ Canvas:
m_OverrideSorting: 0
m_OverridePixelPerfect: 0
m_SortingBucketNormalizedSize: 0
m_VertexColorAlwaysGammaSpace: 0
m_AdditionalShaderChannelsFlag: 25
m_UpdateRectTransformForStandalone: 0
m_SortingLayerID: 0
@@ -565,13 +562,13 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2142775982}
serializedVersion: 2
m_LocalRotation: {x: 0.106926456, y: 0.89080113, z: -0.34414864, w: 0.2767705}
m_LocalPosition: {x: -9.13127, y: 14.634583, z: 13.276214}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 4717529239480754809}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 20, y: -180, z: 0}
--- !u!20 &2142775986
Camera:
@@ -768,6 +765,204 @@ AudioSource:
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
--- !u!1 &123332925323670007
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4368649423705725990}
- component: {fileID: 604100889191375676}
- component: {fileID: 7231553591477896172}
- component: {fileID: 5427468017432232242}
- component: {fileID: 5883971941730404980}
m_Layer: 5
m_Name: RandomMovButton
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &4368649423705725990
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 123332925323670007}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 8137720222258884206}
m_Father: {fileID: 7962283254459483698}
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: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &604100889191375676
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 123332925323670007}
m_CullTransparentMesh: 1
--- !u!114 &7231553591477896172
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 123332925323670007}
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: 0, g: 0, b: 0, a: 0.36862746}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
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 &5427468017432232242
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 123332925323670007}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_WrapAround: 0
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 0, g: 0, b: 0, a: 0.64705884}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.6509434, g: 0.6509434, b: 0.6509434, 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: 7231553591477896172}
m_OnClick:
m_PersistentCalls:
m_Calls: []
--- !u!114 &5883971941730404980
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 123332925323670007}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreLayout: 0
m_MinWidth: 70
m_MinHeight: -1
m_PreferredWidth: 100
m_PreferredHeight: -1
m_FlexibleWidth: -1
m_FlexibleHeight: -1
m_LayoutPriority: 1
--- !u!1 &222217343785305476
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6634203918711018630}
- component: {fileID: 3328190567514003159}
m_Layer: 5
m_Name: Spacer
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &6634203918711018630
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 222217343785305476}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 7962283254459483698}
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: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &3328190567514003159
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 222217343785305476}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreLayout: 0
m_MinWidth: 20
m_MinHeight: -1
m_PreferredWidth: 20
m_PreferredHeight: -1
m_FlexibleWidth: -1
m_FlexibleHeight: -1
m_LayoutPriority: 1
--- !u!1 &407167005608020107
GameObject:
m_ObjectHideFlags: 0
@@ -798,7 +993,6 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 7962283254459483698}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
@@ -856,7 +1050,6 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 3373501020589239246}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
@@ -891,7 +1084,7 @@ MonoBehaviour:
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: Rand.pol
m_text: .pol
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 9e1d886e63529bb4ca3c95ece3e3189c, type: 2}
m_sharedMaterial: {fileID: 2847917559404452115, guid: 9e1d886e63529bb4ca3c95ece3e3189c, type: 2}
@@ -991,7 +1184,6 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1132578971298683386}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
@@ -1026,7 +1218,7 @@ MonoBehaviour:
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: Rand.mp3
m_text: .mp3
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 9e1d886e63529bb4ca3c95ece3e3189c, type: 2}
m_sharedMaterial: {fileID: 2847917559404452115, guid: 9e1d886e63529bb4ca3c95ece3e3189c, type: 2}
@@ -1125,7 +1317,6 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 7962283254459483698}
m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
@@ -1184,7 +1375,6 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 3750006351507706086}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
@@ -1339,7 +1529,6 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 4092775554206660067}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
@@ -1374,7 +1563,7 @@ MonoBehaviour:
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: Rand.cvd
m_text: .cvd
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 9e1d886e63529bb4ca3c95ece3e3189c, type: 2}
m_sharedMaterial: {fileID: 2847917559404452115, guid: 9e1d886e63529bb4ca3c95ece3e3189c, type: 2}
@@ -1477,7 +1666,6 @@ RectTransform:
m_Children:
- {fileID: 5870585403592386036}
m_Father: {fileID: 7962283254459483698}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
@@ -1579,13 +1767,149 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_IgnoreLayout: 0
m_MinWidth: 100
m_MinWidth: 70
m_MinHeight: -1
m_PreferredWidth: 130
m_PreferredWidth: 100
m_PreferredHeight: -1
m_FlexibleWidth: -1
m_FlexibleHeight: -1
m_LayoutPriority: 1
--- !u!1 &3879705876358869609
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 8137720222258884206}
- component: {fileID: 4018928636488071206}
- component: {fileID: 4325337656176874974}
m_Layer: 5
m_Name: Text (TMP)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &8137720222258884206
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3879705876358869609}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 4368649423705725990}
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 &4018928636488071206
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3879705876358869609}
m_CullTransparentMesh: 1
--- !u!114 &4325337656176874974
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3879705876358869609}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: '.mov
'
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 9e1d886e63529bb4ca3c95ece3e3189c, type: 2}
m_sharedMaterial: {fileID: 2847917559404452115, guid: 9e1d886e63529bb4ca3c95ece3e3189c, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4294967295
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 18
m_fontSizeBase: 18
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 0
m_HorizontalAlignment: 2
m_VerticalAlignment: 512
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!1 &4205777939607344913
GameObject:
m_ObjectHideFlags: 0
@@ -1618,7 +1942,6 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 3750006351507706086}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
@@ -1768,6 +2091,7 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4717529239480754811}
serializedVersion: 2
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}
@@ -1776,7 +2100,6 @@ Transform:
- {fileID: 1713758292}
- {fileID: 2142775987}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &431003956
MonoBehaviour:
@@ -1797,6 +2120,7 @@ MonoBehaviour:
randomCvdButton: {fileID: 3463608508234468754}
randomMv3Button: {fileID: 584360810}
randomMp3Button: {fileID: 4620712651305624973}
randomMovButton: {fileID: 5427468017432232242}
audioSource: {fileID: 2142775988}
fpsCounter: {fileID: 5259780322708739529}
--- !u!82 &4596748654320625574
@@ -1941,7 +2265,6 @@ RectTransform:
m_Children:
- {fileID: 7447090365930112548}
m_Father: {fileID: 7962283254459483698}
m_RootOrder: 6
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
@@ -2043,9 +2366,9 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_IgnoreLayout: 0
m_MinWidth: 100
m_MinWidth: 70
m_MinHeight: -1
m_PreferredWidth: 130
m_PreferredWidth: 100
m_PreferredHeight: -1
m_FlexibleWidth: -1
m_FlexibleHeight: -1
@@ -2080,7 +2403,6 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 7962283254459483698}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
@@ -2144,11 +2466,12 @@ RectTransform:
- {fileID: 4092775554206660067}
- {fileID: 2490674917526170126}
- {fileID: 584360809}
- {fileID: 6634203918711018630}
- {fileID: 4368649423705725990}
- {fileID: 4382597048068323552}
- {fileID: 1132578971298683386}
- {fileID: 746519510}
m_Father: {fileID: 1713758292}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 0}
@@ -2172,6 +2495,7 @@ Canvas:
m_OverrideSorting: 0
m_OverridePixelPerfect: 0
m_SortingBucketNormalizedSize: 0
m_VertexColorAlwaysGammaSpace: 0
m_AdditionalShaderChannelsFlag: 25
m_UpdateRectTransformForStandalone: 0
m_SortingLayerID: 0
@@ -2277,7 +2601,6 @@ RectTransform:
m_Children:
- {fileID: 3698878601942552789}
m_Father: {fileID: 7962283254459483698}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
@@ -2379,9 +2702,9 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_IgnoreLayout: 0
m_MinWidth: 100
m_MinWidth: 70
m_MinHeight: -1
m_PreferredWidth: 130
m_PreferredWidth: 100
m_PreferredHeight: -1
m_FlexibleWidth: -1
m_FlexibleHeight: -1
@@ -2421,7 +2744,6 @@ RectTransform:
- {fileID: 3668306928943904264}
- {fileID: 7258066314304171550}
m_Father: {fileID: 1713758292}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 1, y: 1}
@@ -2445,6 +2767,7 @@ Canvas:
m_OverrideSorting: 0
m_OverridePixelPerfect: 0
m_SortingBucketNormalizedSize: 0
m_VertexColorAlwaysGammaSpace: 0
m_AdditionalShaderChannelsFlag: 25
m_UpdateRectTransformForStandalone: 0
m_SortingLayerID: 0
+66 -49
View File
@@ -25,13 +25,13 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 20216135}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 8627381932629902483}
m_RootOrder: 10
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &20216138
MonoBehaviour:
@@ -109,7 +109,6 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 9079540115457418875}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
@@ -181,13 +180,13 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 311849590}
serializedVersion: 2
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 1, z: -10}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 8627381932629902483}
m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!20 &311849592
Camera:
@@ -438,7 +437,6 @@ RectTransform:
m_Children:
- {fileID: 990422549647191827}
m_Father: {fileID: 5034920729594334697}
m_RootOrder: -1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
@@ -519,7 +517,6 @@ RectTransform:
- {fileID: 4621121648098794307}
- {fileID: 4499928633135383787}
m_Father: {fileID: 8627381932629902483}
m_RootOrder: 6
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
@@ -619,7 +616,6 @@ RectTransform:
m_Children:
- {fileID: 2074168396019022583}
m_Father: {fileID: 8835758892377050535}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 1, y: 1}
@@ -658,7 +654,6 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 4984290394953888209}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 1, y: 0}
m_AnchorMax: {x: 1, y: 0}
@@ -781,7 +776,6 @@ RectTransform:
- {fileID: 3466221734632269409}
- {fileID: 6760472164127762522}
m_Father: {fileID: 8627381932629902483}
m_RootOrder: -1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
@@ -882,7 +876,6 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 2546561680202900797}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
@@ -1018,7 +1011,6 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 4984290394953888209}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
@@ -1129,7 +1121,6 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 990422549647191827}
m_RootOrder: -1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
@@ -1204,7 +1195,6 @@ RectTransform:
m_Children:
- {fileID: 2752362774692141791}
m_Father: {fileID: 1126459600050429590}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 0}
@@ -1243,7 +1233,6 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 5034920729594334697}
m_RootOrder: -1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
@@ -1338,7 +1327,6 @@ RectTransform:
m_Children:
- {fileID: 147356288}
m_Father: {fileID: 8627381932629902483}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
@@ -1443,7 +1431,6 @@ RectTransform:
m_Children:
- {fileID: 6936565495695538149}
m_Father: {fileID: 5749901358741972170}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 1}
m_AnchorMax: {x: 0.5, y: 1}
@@ -1572,7 +1559,6 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 8498315575182197477}
m_RootOrder: -1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 0}
@@ -1668,7 +1654,6 @@ RectTransform:
- {fileID: 2959112866268773121}
- {fileID: 332266281639726118}
m_Father: {fileID: 8627381932629902483}
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
@@ -1770,7 +1755,6 @@ RectTransform:
m_Children:
- {fileID: 7157762956599921952}
m_Father: {fileID: 8627381932629902483}
m_RootOrder: 9
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
@@ -1857,7 +1841,6 @@ RectTransform:
m_Children:
- {fileID: 4255555531165553146}
m_Father: {fileID: 8627381932629902483}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
@@ -1988,7 +1971,6 @@ RectTransform:
- {fileID: 4335801449381553810}
- {fileID: 1396044973851031465}
m_Father: {fileID: 8627381932629902483}
m_RootOrder: -1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
@@ -2102,7 +2084,6 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 3759849500141926318}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
@@ -2189,7 +2170,6 @@ RectTransform:
m_Children:
- {fileID: 8954138631489322986}
m_Father: {fileID: 8498315575182197477}
m_RootOrder: -1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 0}
@@ -2251,7 +2231,6 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 4984290394953888209}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 1, y: 0}
m_AnchorMax: {x: 1, y: 0}
@@ -2371,7 +2350,6 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 8954138631489322986}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
@@ -2506,7 +2484,6 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 6643911667603684870}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
@@ -2640,7 +2617,6 @@ RectTransform:
m_Children:
- {fileID: 2805789255595481173}
m_Father: {fileID: 3999692858221102514}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 0}
@@ -2671,13 +2647,13 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4227195284865171261}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 8627381932629902483}
m_RootOrder: 12
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &8346885185333560231
MonoBehaviour:
@@ -2728,7 +2704,6 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 4984290394953888209}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 1, y: 0}
m_AnchorMax: {x: 1, y: 0}
@@ -2848,7 +2823,6 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 2631067326830301932}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 1, y: 0}
m_AnchorMax: {x: 1, y: 0}
@@ -2924,7 +2898,6 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 7184533148466444589}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
@@ -3000,7 +2973,6 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 3999692858221102514}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
@@ -3056,6 +3028,9 @@ GameObject:
- component: {fileID: 1866538870636123170}
- component: {fileID: 677852748167040680}
- component: {fileID: 896666593303268244}
- component: {fileID: 7106289808991898827}
- component: {fileID: 4638320210657625687}
- component: {fileID: 4482354705924986635}
m_Layer: 5
m_Name: DialogueSelectionButtonsGroup
m_TagString: Untagged
@@ -3076,7 +3051,6 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 8498315575182197477}
m_RootOrder: -1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0}
m_AnchorMax: {x: 0.5, y: 1}
@@ -3098,8 +3072,8 @@ MonoBehaviour:
m_Padding:
m_Left: 0
m_Right: 0
m_Top: 0
m_Bottom: 0
m_Top: 10
m_Bottom: 10
m_ChildAlignment: 4
m_Spacing: 0
m_ChildForceExpandWidth: 1
@@ -3132,6 +3106,61 @@ Canvas:
m_SortingLayerID: 0
m_SortingOrder: 10001
m_TargetDisplay: 0
--- !u!222 &7106289808991898827
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6327749955785912399}
m_CullTransparentMesh: 1
--- !u!114 &4638320210657625687
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6327749955785912399}
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_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 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!114 &4482354705924986635
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6327749955785912399}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 47aa715050ab45e09496c366d4e11600, type: 3}
m_Name:
m_EditorClassIdentifier:
blurAmount: 3
cornerRadius: 20
additiveTintColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
multiplyTintColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
image: {fileID: 4638320210657625687}
--- !u!1 &7276870447534455730
GameObject:
m_ObjectHideFlags: 0
@@ -3165,7 +3194,6 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 15168862781853615}
m_RootOrder: -1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
@@ -3278,7 +3306,6 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 3759849500141926318}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
@@ -3354,7 +3381,6 @@ RectTransform:
m_Children:
- {fileID: 8498315575182197477}
m_Father: {fileID: 8627381932629902483}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
@@ -3457,7 +3483,6 @@ RectTransform:
m_Children:
- {fileID: 2546561680202900797}
m_Father: {fileID: 8627381932629902483}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
@@ -3559,7 +3584,6 @@ RectTransform:
- {fileID: 5886627391259666978}
- {fileID: 6629950239246188284}
m_Father: {fileID: 8498315575182197477}
m_RootOrder: -1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 0}
@@ -3622,7 +3646,6 @@ RectTransform:
m_Children:
- {fileID: 3491202665095195611}
m_Father: {fileID: 1396044973851031465}
m_RootOrder: -1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
@@ -3711,7 +3734,6 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 7157762956599921952}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
@@ -3852,12 +3874,11 @@ RectTransform:
- {fileID: 1126459600050429590}
- {fileID: 1866538870636123170}
m_Father: {fileID: 387607491181381395}
m_RootOrder: -1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0}
m_AnchorMax: {x: 0.5, y: 1}
m_AnchoredPosition: {x: 0, y: 20}
m_SizeDelta: {x: 800, y: -40}
m_SizeDelta: {x: 1100, y: -40}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!225 &4450587676581078315
CanvasGroup:
@@ -3936,6 +3957,7 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8627381932629902481}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 1019.9595, y: 583.6859, z: 4.5594697}
m_LocalScale: {x: 1, y: 1, z: 1}
@@ -3955,7 +3977,6 @@ Transform:
- {fileID: 9166793672834059380}
- {fileID: 5491488055271105370}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &8627381932629902480
MonoBehaviour:
@@ -4047,7 +4068,6 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 15168862781853615}
m_RootOrder: -1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
@@ -4151,7 +4171,6 @@ RectTransform:
m_Children:
- {fileID: 7681748703137084981}
m_Father: {fileID: 2631067326830301932}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 0}
@@ -4189,7 +4208,6 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 5886627391259666978}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
@@ -4325,7 +4343,6 @@ RectTransform:
- {fileID: 6643911667603684870}
- {fileID: 2518121778909046557}
m_Father: {fileID: 8498315575182197477}
m_RootOrder: -1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 0}
@@ -4413,7 +4430,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 2755888773251150947, guid: 3ef1d32c83f86744286e2067bc5f73e4, type: 3}
propertyPath: m_Value
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2755888773251194751, guid: 3ef1d32c83f86744286e2067bc5f73e4, type: 3}
propertyPath: m_Enabled
@@ -34,12 +34,11 @@ RectTransform:
m_Children:
- {fileID: 3008098735699080031}
m_Father: {fileID: 351020356915406194}
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: -40, y: -20}
m_SizeDelta: {x: -40, y: -10}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &4862410139821972608
CanvasRenderer:
@@ -168,7 +167,6 @@ RectTransform:
m_Children:
- {fileID: 6402332024803516576}
m_Father: {fileID: 0}
m_RootOrder: -1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
@@ -192,6 +190,7 @@ Canvas:
m_OverrideSorting: 0
m_OverridePixelPerfect: 0
m_SortingBucketNormalizedSize: 0
m_VertexColorAlwaysGammaSpace: 0
m_AdditionalShaderChannelsFlag: 25
m_UpdateRectTransformForStandalone: 0
m_SortingLayerID: 0
@@ -268,12 +267,11 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 6402332024803516576}
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_SizeDelta: {x: -50, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &143571606391487229
CanvasRenderer:
@@ -16,25 +16,22 @@ Shader "Pal3/RoundedFrostedGlass"
Category
{
// We must be transparent, so other objects are drawn before this one.
Tags { "Queue" = "Transparent" "IgnoreProjector" = "True" "RenderType" = "Opaque" }
Tags { "Queue" = "Transparent" "IgnoreProjector" = "True" "RenderType" = "Transparent" }
SubShader
{
Cull Off
Lighting Off
ZTest Off
ZWrite Off
//ZTest [unity_GUIZTestMode]
Blend SrcAlpha OneMinusSrcAlpha
// Horizontal blur
GrabPass
{
"_HBlur"
}
/*
ZTest Off
Blend SrcAlpha OneMinusSrcAlpha
*/
Cull Off
Lighting Off
ZWrite Off
//ZTest [unity_GUIZTestMode]
Blend SrcAlpha OneMinusSrcAlpha
Pass
{
@@ -84,7 +81,7 @@ Shader "Pal3/RoundedFrostedGlass"
return outsideDistance + insideDistance - absoluteRound;
}
inline float CalcAlpha(float2 samplePosition, float2 size, float radius){
inline float calcAlpha(float2 samplePosition, float2 size, float radius){
const float2 samplePositionTranslated = (samplePosition - .5) * size;
const float distToRect = roundedRectangle(samplePositionTranslated, radius * .5, size * .5);
const float distanceChange = fwidth(distToRect) * 0.5;
@@ -106,7 +103,7 @@ Shader "Pal3/RoundedFrostedGlass"
half4 frag(v2f i) : COLOR
{
const float alpha = CalcAlpha(i.uvmain, _WidthHeightRadius.xy, _WidthHeightRadius.z);
const float alpha = calcAlpha(i.uvmain, _WidthHeightRadius.xy, _WidthHeightRadius.z);
half4 cutoffColor = mixAlpha(tex2D(_MainTex, i.uvmain), _AdditiveColor, alpha);
clip(cutoffColor.a - 0.001);
@@ -188,7 +185,7 @@ Shader "Pal3/RoundedFrostedGlass"
return outsideDistance + insideDistance - absoluteRound;
}
inline float CalcAlpha(float2 samplePosition, float2 size, float radius){
inline float calcAlpha(float2 samplePosition, float2 size, float radius){
const float2 samplePositionTranslated = (samplePosition - .5) * size;
const float distToRect = roundedRectangle(samplePositionTranslated, radius * .5, size * .5);
const float distanceChange = fwidth(distToRect) * 0.5;
@@ -210,7 +207,7 @@ Shader "Pal3/RoundedFrostedGlass"
half4 frag(v2f i) : COLOR
{
const float alpha = CalcAlpha(i.uvmain, _WidthHeightRadius.xy, _WidthHeightRadius.z);
const float alpha = calcAlpha(i.uvmain, _WidthHeightRadius.xy, _WidthHeightRadius.z);
half4 cutoffColor = mixAlpha(tex2D(_MainTex, i.uvmain), _AdditiveColor, alpha);
clip(cutoffColor.a - 0.001);
+15
View File
@@ -18,6 +18,15 @@ namespace Editor
BuildTargetGroup.Android,
BuildTargetGroup.Standalone,
BuildTargetGroup.iOS,
BuildTargetGroup.WSA,
BuildTargetGroup.PS4,
BuildTargetGroup.PS5,
BuildTargetGroup.XboxOne,
BuildTargetGroup.tvOS,
BuildTargetGroup.Switch,
BuildTargetGroup.GameCoreXboxOne,
BuildTargetGroup.GameCoreXboxSeries,
BuildTargetGroup.VisionOS,
};
}
@@ -28,6 +37,12 @@ namespace Editor
NamedBuildTarget.Android,
NamedBuildTarget.Standalone,
NamedBuildTarget.iOS,
NamedBuildTarget.PS4,
NamedBuildTarget.XboxOne,
NamedBuildTarget.tvOS,
NamedBuildTarget.NintendoSwitch,
NamedBuildTarget.WindowsStoreApps,
NamedBuildTarget.VisionOS,
};
}
+5 -20
View File
@@ -7,7 +7,6 @@ namespace Pal3.Actor
{
using System;
using System.Collections.Generic;
using Core.DataReader.Cpk;
using Core.DataReader.Ini;
using Data;
using MetaData;
@@ -40,12 +39,7 @@ namespace Pal3.Actor
private void InitActorConfig(string name)
{
char separator = CpkConstants.DirectorySeparator;
string actorActionConfigFolder = $"{FileConstants.BaseDataCpkPathInfo.cpkName}{separator}" +
$"{FileConstants.ActorFolderName}{separator}{name}{separator}";
ActorActionConfig defaultConfig = _resourceProvider.GetActorActionConfig(actorActionConfigFolder + $"{name}.ini");
ActorActionConfig defaultConfig = _resourceProvider.GetActorActionConfig(name, $"{name}.ini");
// Add default config if it is MV3 animated
if (defaultConfig is Mv3ActionConfig mv3Config)
@@ -65,7 +59,7 @@ namespace Pal3.Actor
// 01.ini, 02.ini ...up tp 09.ini
for (var i = 0; i <= 9; i++)
{
if (_resourceProvider.GetActorActionConfig(actorActionConfigFolder + $"{i:D2}.ini")
if (_resourceProvider.GetActorActionConfig(name, $"{i:D2}.ini")
is MovActionConfig movConfig)
{
AddActorConfig(movConfig);
@@ -111,10 +105,7 @@ namespace Pal3.Actor
throw new ArgumentException($"Action file name not found for action name {actionName}");
}
char separator = CpkConstants.DirectorySeparator;
return $"{FileConstants.BaseDataCpkPathInfo.cpkName}{separator}" +
$"{FileConstants.ActorFolderName}{separator}{_actorName}{separator}" +
$"{actionFileName}";
return $"{FileConstants.GetActorFolderVirtualPath(_actorName)}{actionFileName}";
}
public string GetMeshFilePath(string actionName)
@@ -129,10 +120,7 @@ namespace Pal3.Actor
throw new ArgumentException($"Msh file name not found for action name {actionName}");
}
char separator = CpkConstants.DirectorySeparator;
return $"{FileConstants.BaseDataCpkPathInfo.cpkName}{separator}" +
$"{FileConstants.ActorFolderName}{separator}{_actorName}{separator}" +
$"{meshFileName}";
return $"{FileConstants.GetActorFolderVirtualPath(_actorName)}{meshFileName}";
}
public string GetMaterialFilePath(string actionName)
@@ -147,10 +135,7 @@ namespace Pal3.Actor
throw new ArgumentException($"Mtl file name not found for action name {actionName}");
}
char separator = CpkConstants.DirectorySeparator;
return $"{FileConstants.BaseDataCpkPathInfo.cpkName}{separator}" +
$"{FileConstants.ActorFolderName}{separator}{_actorName}{separator}" +
$"{mtlFileName}";
return $"{FileConstants.GetActorFolderVirtualPath(_actorName)}{mtlFileName}";
}
}
}
@@ -22,7 +22,7 @@ namespace Pal3.Actor
private const float ROTATION_SPEED = 10f;
private const float ROTATION_SYNCING_DISTANCE = 2f;
private const float FOLLOW_TARGET_MIN_DISTANCE = 1f;
private const float FOLLOW_TARGET_FLY_SPEED_CHANEG_DISTANCE = 8f;
private const float FOLLOW_TARGET_FLY_SPEED_CHANGE_DISTANCE = 8f;
private const float FOLLOW_TARGET_MAX_DISTANCE = 15f;
private const float FOLLOW_TARGET_X_OFFSET = 0.8f;
private const float FOLLOW_TARGET_Y_OFFSET = -0.8f;
@@ -127,10 +127,10 @@ namespace Pal3.Actor
}
// Increase fly speed if the distance is greater than a threshold
var flySpeed = distanceToTarget > FOLLOW_TARGET_FLY_SPEED_CHANEG_DISTANCE ? MaxFlySpeed : DefaultFlySpeed;
var flySpeed = distanceToTarget > FOLLOW_TARGET_FLY_SPEED_CHANGE_DISTANCE ? MaxFlySpeed : DefaultFlySpeed;
_actorActionController.PerformAction(
Vector3.Distance(myNewPosition, transform.position) < FOLLOW_TARGET_FLY_SPEED_CHANEG_DISTANCE - 1f
Vector3.Distance(myNewPosition, transform.position) < FOLLOW_TARGET_FLY_SPEED_CHANGE_DISTANCE - 1f
? _actor.GetMovementAction(MovementMode.Walk)
: _actor.GetMovementAction(MovementMode.Run));
@@ -94,7 +94,7 @@ namespace Pal3.Actor
movFile = _resourceProvider.GetGameResourceFile<MovFile>(movFilePath);
textureProvider = _resourceProvider.CreateTextureResourceProvider(
Utility.GetRelativeDirectoryPath(movFilePath));
Utility.GetRelativeDirectoryPath(mtlFilePath));
}
catch (Exception ex)
{
@@ -10,7 +10,6 @@ namespace Pal3.Actor
using Command.InternalCommands;
using Command.SceCommands;
using Core.DataLoader;
using Core.DataReader.Cpk;
using Core.DataReader.Mv3;
using Core.DataReader.Pol;
using Core.DataReader.Scn;
@@ -134,11 +133,7 @@ namespace Pal3.Actor
_actor.GetWeaponName() is {} weaponName &&
ActorConstants.ActionNameToWeaponArmTypeMap[actionType.Value] != WeaponArmType.None)
{
var separator = CpkConstants.DirectorySeparator;
var weaponPath = $"{FileConstants.BaseDataCpkPathInfo.cpkName}{separator}" +
$"{FileConstants.WeaponFolderName}{separator}{weaponName}{separator}{weaponName}.pol";
string weaponPath = FileConstants.GetWeaponModelFileVirtualPath(weaponName);
PolFile polFile = _resourceProvider.GetGameResourceFile<PolFile>(weaponPath);
ITextureResourceProvider weaponTextureProvider = _resourceProvider.CreateTextureResourceProvider(
Utility.GetRelativeDirectoryPath(weaponPath));
+4 -4
View File
@@ -138,8 +138,8 @@ namespace Pal3.Audio
}
_currentMusicClipName = musicName;
var musicFileVirtualPath = _resourceProvider.GetMusicFileVirtualPath(musicName);
var musicFileCachePath = _resourceProvider.GetMp3FilePathInCacheFolder(musicFileVirtualPath);
var musicFileVirtualPath = FileConstants.GetMusicFileVirtualPath(musicName);
var musicFileCachePath = _resourceProvider.GetMusicFilePathInCacheFolder(musicName);
yield return PlayMusicAsync(musicName, musicFileVirtualPath, musicFileCachePath, -1);
}
@@ -440,8 +440,8 @@ namespace Pal3.Audio
_currentScriptMusic = command.MusicName;
_currentMusicClipName = command.MusicName;
var musicFileVirtualPath = _resourceProvider.GetMusicFileVirtualPath(command.MusicName);
var musicFileCachePath = _resourceProvider.GetMp3FilePathInCacheFolder(musicFileVirtualPath);
var musicFileVirtualPath = FileConstants.GetMusicFileVirtualPath(command.MusicName);
var musicFileCachePath = _resourceProvider.GetMusicFilePathInCacheFolder(musicFileVirtualPath);
StartCoroutine(PlayMusicAsync(command.MusicName,
musicFileVirtualPath,
musicFileCachePath,
@@ -85,15 +85,17 @@ namespace Pal3.Data
_litMaterialFactory = litMaterialFactory; // Lit materials are not required
_gameSettings = Requires.IsNotNull(gameSettings, nameof(gameSettings));
var gdbFilePath =
$"{FileConstants.BaseDataCpkPathInfo.cpkName}{PathSeparator}" +
$"{FileConstants.CombatDataFolderName}{PathSeparator}{GameConstants.AppName}_Softstar.gdb";
_gameDatabase = GetGameResourceFileReader<GdbFile>().Read(_fileSystem.ReadAllBytes(gdbFilePath));
_gameDatabase = GetGameDatabaseFile(); // Initialize game database file
CommandExecutorRegistry<ICommand>.Instance.Register(this);
}
private GdbFile GetGameDatabaseFile()
{
var gdbFilePath = FileConstants.GameDatabaseFileVirtualPath;
return GetGameResourceFileReader<GdbFile>().Read(_fileSystem.ReadAllBytes(gdbFilePath));
}
private IFileReader<T> GetGameResourceFileReader<T>()
{
return ServiceLocator.Instance.Get<IFileReader<T>>();
@@ -106,6 +108,7 @@ namespace Pal3.Data
_gameResourceFileCache.Clear();
_actorConfigCache.Clear();
_audioClipCache.Clear();
_vfxEffectPrefabCache.Clear();
CommandExecutorRegistry<ICommand>.Instance.UnRegister(this);
}
@@ -164,50 +167,34 @@ namespace Pal3.Data
return file;
}
public NavFile GetNav(string sceneFileName, string sceneName)
public NavFile GetNavFile(string sceneFileName, string sceneName)
{
#if PAL3
var navFilePath = $"{sceneFileName}{CpkConstants.FileExtension}{PathSeparator}" +
$"{sceneName}{PathSeparator}{sceneName}.nav";
#elif PAL3A
var navFilePath = $"{FileConstants.ScnCpkPathInfo.cpkName}{PathSeparator}SCN{PathSeparator}" +
$"{sceneFileName}{PathSeparator}{sceneName}{PathSeparator}{sceneName}.nav";
#endif
var navFilePath = FileConstants.GetNavFileVirtualPath(sceneFileName, sceneName);
return GetGameResourceFileReader<NavFile>().Read(_fileSystem.ReadAllBytes(navFilePath));
}
public ScnFile GetScn(string sceneFileName, string sceneName)
public ScnFile GetScnFile(string sceneFileName, string sceneName)
{
#if PAL3
var scnFilePath = $"{sceneFileName}{CpkConstants.FileExtension}{PathSeparator}{sceneName}.scn";
#elif PAL3A
var scnFilePath = $"{FileConstants.ScnCpkPathInfo.cpkName}{PathSeparator}SCN{PathSeparator}" +
$"{sceneFileName}{PathSeparator}{sceneFileName}_{sceneName}.scn";
#endif
var scnFilePath = FileConstants.GetScnFileVirtualPath(sceneFileName, sceneName);
return GetGameResourceFileReader<ScnFile>().Read(_fileSystem.ReadAllBytes(scnFilePath));
}
public SceFile GetSceneSce(string sceneFileName)
public SceFile GetSceneSceFile(string sceneFileName)
{
#if PAL3
var sceFilePath = $"{sceneFileName}{CpkConstants.FileExtension}{PathSeparator}{sceneFileName}.sce";
#elif PAL3A
var sceFilePath = $"{FileConstants.SceCpkPathInfo.cpkName}{PathSeparator}Sce{PathSeparator}{sceneFileName}.sce";
#endif
var sceFilePath = FileConstants.GetSceneSceFileVirtualPath(sceneFileName);
return GetGameResourceFileReader<SceFile>().Read(_fileSystem.ReadAllBytes(sceFilePath));
}
public SceFile GetSystemSce()
public SceFile GetSystemSceFile()
{
return GetGameResourceFileReader<SceFile>().Read(_fileSystem.ReadAllBytes(FileConstants.SystemSceFileVirtualPath));
var systemSceFilePath = FileConstants.SystemSceFileVirtualPath;
return GetGameResourceFileReader<SceFile>().Read(_fileSystem.ReadAllBytes(systemSceFilePath));
}
public SceFile GetBigMapSce()
public SceFile GetBigMapSceFile()
{
return GetGameResourceFileReader<SceFile>().Read(_fileSystem.ReadAllBytes(FileConstants.BigMapSceFileVirtualPath));
var bigMapSceFilePath = FileConstants.BigMapSceFileVirtualPath;
return GetGameResourceFileReader<SceFile>().Read(_fileSystem.ReadAllBytes(bigMapSceFilePath));
}
public Dictionary<int, GameItem> GetGameItems()
@@ -219,8 +206,8 @@ namespace Pal3.Data
/// Get music file path in cache folder.
/// </summary>
/// <param name="musicFileVirtualPath">music file virtual path</param>
/// <returns>Mp3 file path in cache folder</returns>
public string GetMp3FilePathInCacheFolder(string musicFileVirtualPath)
/// <returns>Music file path in cache folder</returns>
public string GetMusicFilePathInCacheFolder(string musicFileVirtualPath)
{
return Application.persistentDataPath
+ Path.DirectorySeparatorChar
@@ -282,13 +269,6 @@ namespace Pal3.Data
return sfxFilePath;
}
public string GetMusicFileVirtualPath(string musicName)
{
var separator = CpkConstants.DirectorySeparator;
return $"{FileConstants.MusicCpkPathInfo.cpkName}{separator}" +
$"{FileConstants.MusicCpkPathInfo.relativePath}{separator}{musicName}.mp3";
}
public IEnumerator LoadAudioClipAsync(string filePath,
AudioType audioType,
bool streamAudio,
@@ -322,10 +302,7 @@ namespace Pal3.Data
private Texture2D GetActorAvatarTexture(string actorName, string avatarTextureName)
{
var roleAvatarTextureRelativePath =
$"{FileConstants.BaseDataCpkPathInfo.cpkName}{PathSeparator}" +
$"{FileConstants.ActorFolderName}{PathSeparator}{actorName}{PathSeparator}";
var roleAvatarTextureRelativePath = FileConstants.GetActorFolderVirtualPath(actorName);
ITextureResourceProvider textureProvider = CreateTextureResourceProvider(roleAvatarTextureRelativePath);
return textureProvider.GetTexture($"{avatarTextureName}.tga");
}
@@ -355,20 +332,14 @@ namespace Pal3.Data
private Texture2D GetEmojiSpriteSheetTexture(ActorEmojiType emojiType)
{
var emojiSpriteSheetRelativePath =
$"{FileConstants.BaseDataCpkPathInfo.cpkName}{PathSeparator}" +
$"{FileConstants.UIFolderName}{PathSeparator}{FileConstants.EmojiFolderName}{PathSeparator}";
string emojiSpriteSheetRelativePath = FileConstants.EmojiSpriteSheetFolderVirtualPath;
ITextureResourceProvider textureProvider = CreateTextureResourceProvider(emojiSpriteSheetRelativePath);
return textureProvider.GetTexture($"EM_{(int)emojiType:00}.tga");
}
public Texture2D GetCaptionTexture(string name)
{
var captionTextureRelativePath =
$"{FileConstants.BaseDataCpkPathInfo.cpkName}{PathSeparator}" +
$"{FileConstants.CaptionFolderName}{PathSeparator}";
var captionTextureRelativePath = FileConstants.CaptionFolderVirtualPath;
// No need to cache caption texture since it is a one time thing
ITextureResourceProvider textureProvider = CreateTextureResourceProvider(captionTextureRelativePath, useCache: false);
return textureProvider.GetTexture($"{name}.tga");
@@ -376,16 +347,16 @@ namespace Pal3.Data
public Texture2D[] GetSkyBoxTextures(int skyBoxId)
{
var relativeFilePath = string.Format(SceneConstants.SkyBoxTexturePathFormat.First(), skyBoxId);
var relativeFilePath = string.Format(FileConstants.SkyBoxTexturePathFormat.First(), skyBoxId);
ITextureResourceProvider textureProvider = CreateTextureResourceProvider(
Utility.GetRelativeDirectoryPath(relativeFilePath));
var textures = new Texture2D[SceneConstants.SkyBoxTexturePathFormat.Length];
for (var i = 0; i < SceneConstants.SkyBoxTexturePathFormat.Length; i++)
var textures = new Texture2D[FileConstants.SkyBoxTexturePathFormat.Length];
for (var i = 0; i < FileConstants.SkyBoxTexturePathFormat.Length; i++)
{
var textureNameFormat = Utility.GetFileName(
string.Format(SceneConstants.SkyBoxTexturePathFormat[i], skyBoxId), PathSeparator);
string.Format(FileConstants.SkyBoxTexturePathFormat[i], skyBoxId), PathSeparator);
Texture2D texture = textureProvider.GetTexture(string.Format(textureNameFormat, i));
// Set wrap mode to clamp to remove "edges" between sides
texture.wrapMode = TextureWrapMode.Clamp;
@@ -397,10 +368,7 @@ namespace Pal3.Data
public Texture2D GetEffectTexture(string name, out bool hasAlphaChannel)
{
var effectFolderRelativePath =
$"{FileConstants.BaseDataCpkPathInfo.cpkName}{PathSeparator}" +
$"{FileConstants.EffectFolderName}{PathSeparator}";
var effectFolderRelativePath = FileConstants.EffectFolderVirtualPath;
ITextureResourceProvider textureProvider = CreateTextureResourceProvider(effectFolderRelativePath);
return textureProvider.GetTexture(name, out hasAlphaChannel);
}
@@ -439,7 +407,7 @@ namespace Pal3.Data
public Sprite[] GetJumpIndicatorSprites()
{
var relativePath = FileConstants.UISceneFolderVirtualPath + PathSeparator;
var relativePath = FileConstants.UISceneFolderVirtualPath;
var textureProvider = CreateTextureResourceProvider(relativePath);
var sprites = new Sprite[4];
@@ -468,8 +436,10 @@ namespace Pal3.Data
return sprites;
}
public ActorActionConfig GetActorActionConfig(string actorConfigFilePath)
public ActorActionConfig GetActorActionConfig(string actorName, string configFileName)
{
string actorConfigFilePath = FileConstants.GetActorFolderVirtualPath(actorName) + configFileName;
actorConfigFilePath = actorConfigFilePath.ToLower();
if (_actorConfigCache.TryGetValue(actorConfigFilePath, out ActorActionConfig actorActionConfig))
@@ -598,10 +568,7 @@ namespace Pal3.Data
public Texture2D GetCursorTexture()
{
var cursorSpriteRelativePath =
$"{FileConstants.BaseDataCpkPathInfo.cpkName}{PathSeparator}" +
$"{FileConstants.UIFolderName}{PathSeparator}{FileConstants.CursorFolderName}{PathSeparator}";
var cursorSpriteRelativePath = FileConstants.CursorSpriteFolderVirtualPath;
ITextureResourceProvider textureProvider = CreateTextureResourceProvider(cursorSpriteRelativePath);
Texture2D cursorTexture = textureProvider.GetTexture($"jt.tga");
return cursorTexture;
@@ -622,19 +589,14 @@ namespace Pal3.Data
foreach (var name in ActorConstants.MainActorNameMap.Values)
{
var actorConfigFile = $"{FileConstants.BaseDataCpkPathInfo.cpkName}{PathSeparator}" +
$"{FileConstants.ActorFolderName}{PathSeparator}{name}{PathSeparator}{name}.ini";
ActorActionConfig actorActionConfig = GetActorActionConfig(actorConfigFile);
ActorActionConfig actorActionConfig = GetActorActionConfig(name, $"{name}.ini");
foreach (ActorAction actorAction in actorActionConfig.ActorActions)
{
// Cache known actions only.
if (!cachedActions.Contains(actorAction.ActionName.ToLower())) continue;
var mv3FilePath = $"{FileConstants.BaseDataCpkPathInfo.cpkName}{PathSeparator}" +
$"{FileConstants.ActorFolderName}{PathSeparator}{name}{PathSeparator}" +
$"{actorAction.ActionFileName}";
var mv3FilePath = FileConstants.GetActorFolderVirtualPath(name) + actorAction.ActionFileName;
_ = GetGameResourceFile<Mv3File>(mv3FilePath); // Call GetMv3 to cache the mv3 file.
}
@@ -684,7 +646,7 @@ namespace Pal3.Data
{
// Dispose non-main actor mv3 files
// All main actor names start with "1"
var mainActorMv3 = $"{FileConstants.ActorFolderName}{PathSeparator}1".ToLower();
var mainActorMv3 = $"{FileConstants.GetActorFolderName()}{PathSeparator}1".ToLower();
var mv3FilesToDispose = fileCache.Value.Keys
.Where(mv3FilePath => !mv3FilePath.Contains(mainActorMv3))
.ToArray();
+10 -10
View File
@@ -349,10 +349,10 @@ namespace Pal3.Dev
{
SetupMenuLayout(isVertical: true);
const string lightingEnabledText = "实时光影:已开启";
const string lightingDisabledText = "实时光影:已关闭";
const string ssaoEnabledText = "环境光遮蔽:已开启";
const string ssaoDisabledText = "环境光遮蔽:已关闭";
const string lightingEnabledText = "实时光影:开启";
const string lightingDisabledText = "实时光影:关闭";
const string ssaoEnabledText = "环境光遮蔽:开启";
const string ssaoDisabledText = "环境光遮蔽:关闭";
// Toon materials are not available in open source build.
// so lighting and shadow will not work, thus we remove the option.
@@ -416,8 +416,8 @@ namespace Pal3.Dev
}
#if UNITY_STANDALONE
const string vsyncEnabledText = "垂直同步:已开启";
const string vsyncDisabledText = "垂直同步:已关闭";
const string vsyncEnabledText = "垂直同步:开启";
const string vsyncDisabledText = "垂直同步:关闭";
string GetVsyncButtonText() => _gameSettings.VSyncCount == 0 ? vsyncDisabledText : vsyncEnabledText;
CreateMenuButton(GetVsyncButtonText(), buttonTextUGUI => delegate
{
@@ -477,8 +477,8 @@ namespace Pal3.Dev
// });
// #endif
const string musicEnabledText = "音乐:已开启";
const string musicDisabledText = "音乐:已关闭";
const string musicEnabledText = "音乐:开启";
const string musicDisabledText = "音乐:关闭";
string GetMusicButtonText() => _gameSettings.MusicVolume == 0f ? musicDisabledText : musicEnabledText;
CreateMenuButton(GetMusicButtonText(), buttonTextUGUI => delegate
{
@@ -490,8 +490,8 @@ namespace Pal3.Dev
(_gameSettings.MusicVolume == 0f ? "关闭" : "开启") + ""));
});
const string sfxEnabledText = "音效:已开启";
const string sfxDisabledText = "音效:已关闭";
const string sfxEnabledText = "音效:开启";
const string sfxDisabledText = "音效:关闭";
string GetSfxButtonText() => _gameSettings.SfxVolume == 0f ? sfxDisabledText : sfxEnabledText;
CreateMenuButton(GetSfxButtonText(), buttonTextUGUI => delegate
{
@@ -5,8 +5,6 @@
namespace Pal3.Effect.PostProcessing
{
using System;
using System.Collections;
using Command;
using Command.InternalCommands;
using Command.SceCommands;
@@ -164,33 +162,6 @@ namespace Pal3.Effect.PostProcessing
ToggleAmbientOcclusionBasedOnSetting();
TogglePostProcessLayerWhenNeeded();
}
#if UNITY_IOS || UNITY_STANDALONE_OSX
if (command.SettingName is nameof(GameSettings.ResolutionScale))
{
StartCoroutine(ReloadAmbientOcclusionSettingAsync());
}
#endif
}
#if UNITY_IOS || UNITY_STANDALONE_OSX
private IEnumerator Start()
{
yield return ReloadAmbientOcclusionSettingAsync();
}
// On iOS and MacOS, the SSAO and Resolution changing are causing the RoundedFrostedGlass
// shader to malfunction. This is a workaround to disable and re-enable SSAO to fix the issue.
private IEnumerator ReloadAmbientOcclusionSettingAsync()
{
if (_gameSettings.IsAmbientOcclusionEnabled)
{
yield return null;
_gameSettings.IsAmbientOcclusionEnabled = false;
yield return null;
_gameSettings.IsAmbientOcclusionEnabled = true;
}
}
#endif
}
}
+12 -24
View File
@@ -142,7 +142,7 @@ namespace Pal3
string userPickedGameDataFolderPath = null;
yield return WaitForUserToPickGameDataFolder((path) => userPickedGameDataFolderPath = path);
yield return WaitForUserToPickGameDataFolderAsync(path => userPickedGameDataFolderPath = path);
if (!string.IsNullOrEmpty(userPickedGameDataFolderPath))
{
@@ -209,7 +209,7 @@ namespace Pal3
FinalizeInit();
}
private IEnumerator WaitForUserToPickGameDataFolder(Action<string> callback)
private IEnumerator WaitForUserToPickGameDataFolderAsync(Action<string> callback)
{
string userPickedGameDataFolderPath = null;
@@ -334,32 +334,20 @@ namespace Pal3
{
ICpkFileSystem cpkFileSystem = new CpkFileSystem(gameRootPath, crcHash);
var filesToMount = new List<string>();
var baseDataCpk = FileConstants.BaseDataCpkPathInfo.relativePath +
Path.DirectorySeparatorChar + FileConstants.BaseDataCpkPathInfo.cpkName;
filesToMount.Add(baseDataCpk);
var musicCpk = FileConstants.MusicCpkPathInfo.relativePath +
Path.DirectorySeparatorChar + FileConstants.MusicCpkPathInfo.cpkName;
filesToMount.Add(musicCpk);
foreach ((string cpkName, string relativePath) sceneCpkPathInfo in FileConstants.SceneCpkPathInfos)
List<string> filesToMount = new ()
{
var sceneCpkPath = sceneCpkPathInfo.relativePath + Path.DirectorySeparatorChar +
sceneCpkPathInfo.cpkName;
filesToMount.Add(sceneCpkPath);
FileConstants.BaseDataCpkFilePath,
FileConstants.MusicCpkFilePath
};
foreach (string sceneCpkFileName in FileConstants.SceneCpkFileNames)
{
filesToMount.Add(FileConstants.GetSceneCpkFilePath(sceneCpkFileName));
}
#if PAL3A
var scnCpk = FileConstants.ScnCpkPathInfo.relativePath +
Path.DirectorySeparatorChar + FileConstants.ScnCpkPathInfo.cpkName;
filesToMount.Add(scnCpk);
var sceCpk = FileConstants.SceCpkPathInfo.relativePath +
Path.DirectorySeparatorChar + FileConstants.SceCpkPathInfo.cpkName;
filesToMount.Add(sceCpk);
filesToMount.Add(FileConstants.ScnCpkFilePath);
filesToMount.Add(FileConstants.SceCpkFilePath);
#endif
foreach (var cpkFilePath in filesToMount)
@@ -10,6 +10,7 @@ namespace Pal3.GameSystem
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading;
using Command;
using Command.InternalCommands;
using Command.SceCommands;
@@ -28,6 +29,7 @@ namespace Pal3.GameSystem
using UnityEngine.InputSystem;
using UnityEngine.InputSystem.DualShock;
using UnityEngine.UI;
using Debug = UnityEngine.Debug;
public sealed class DialogueManager : MonoBehaviour,
ICommandExecutor<DialogueRenderActorAvatarCommand>,
@@ -39,6 +41,7 @@ namespace Pal3.GameSystem
private const float LIMIT_TIME_DIALOGUE_PLAYER_MAX_REACTION_TIME_IN_SECONDS = 4f;
private const float DIALOGUE_SHOW_HIDE_ANIMATION_DURATION = 0.1f;
private const float DIALOGUE_SHOW_HIDE_ANIMATION_Y_OFFSET = -30f;
private const float DIALOGUE_FLASHING_ANIMATION_DURATION = 0.5f;
private const string INFORMATION_TEXT_COLOR_HEX = "#ffff05";
@@ -68,6 +71,8 @@ namespace Pal3.GameSystem
private int _lastSelectedButtonIndex;
private readonly List<GameObject> _selectionButtons = new();
private double _totalTimeUsedBeforeSkippingTheLastDialogue;
private readonly Stopwatch _reactionTimer = new ();
private CancellationTokenSource _flashingAnimationCts = new ();
private DialogueRenderActorAvatarCommand _lastAvatarCommand;
private readonly Queue<IEnumerator> _dialogueRenderQueue = new();
@@ -240,6 +245,7 @@ namespace Pal3.GameSystem
Action onFinished = null)
{
CommandDispatcher<ICommand>.Instance.Dispatch(new DialogueRenderingStartedNotification());
_totalTimeUsedBeforeSkippingTheLastDialogue = 0f;
bool isRightAligned = true;
bool isAvatarPresented = false;
@@ -266,19 +272,28 @@ namespace Pal3.GameSystem
TextMeshProUGUI dialogueTextUI = GetRenderingTextUI(isAvatarPresented, isRightAligned);
// TODO: when trackReactionTime set to true, we should also show alert on UI
// to let player know
var timer = new Stopwatch();
timer.Start();
_dialogueBackgroundImage.enabled = true;
_dialogueCanvasGroup.alpha = 0f;
_dialogueCanvasGroup.enabled = true;
_isSkipDialogueRequested = false;
yield return StartDialogueAnimationAsync(true);
yield return PlayDialogueBackgroundPopAnimationAsync(true);
_isSkipDialogueRequested = false; // Ignore skip request during dialogue rendering animation
if (trackReactionTime) // Setup timer and start flashing animation
{
_reactionTimer.Restart();
if (!_flashingAnimationCts.IsCancellationRequested)
{
_flashingAnimationCts.Cancel();
}
_flashingAnimationCts = new CancellationTokenSource();
StartCoroutine(PlayDialogueBackgroundFlashingAnimationAsync(
duration: LIMIT_TIME_DIALOGUE_PLAYER_MAX_REACTION_TIME_IN_SECONDS,
_flashingAnimationCts.Token));
}
// Render dialogue text typing animation
foreach (var dialogue in GetSubDialoguesAsync(text))
{
IEnumerator renderDialogue = RenderDialogueTextWithAnimationAsync(dialogueTextUI, dialogue);
@@ -296,13 +311,15 @@ namespace Pal3.GameSystem
}
}
timer.Stop();
if (trackReactionTime)
if (trackReactionTime) // Stop flashing animation and timer
{
_totalTimeUsedBeforeSkippingTheLastDialogue = timer.Elapsed.TotalSeconds;
_flashingAnimationCts.Cancel();
_reactionTimer.Stop();
_totalTimeUsedBeforeSkippingTheLastDialogue = _reactionTimer.Elapsed.TotalSeconds;
Debug.LogWarning($"Reaction time: {_totalTimeUsedBeforeSkippingTheLastDialogue:0.00f}");
}
yield return StartDialogueAnimationAsync(false);
yield return PlayDialogueBackgroundPopAnimationAsync(false);
ResetUI();
@@ -311,7 +328,33 @@ namespace Pal3.GameSystem
onFinished?.Invoke();
}
private IEnumerator StartDialogueAnimationAsync(bool showDialogue)
private IEnumerator PlayDialogueBackgroundFlashingAnimationAsync(float duration, CancellationToken cancellationToken)
{
var startTime = Time.realtimeSinceStartup;
while (!cancellationToken.IsCancellationRequested)
{
yield return CoreAnimation.EnumerateValueAsync(1f, 0.2f, DIALOGUE_FLASHING_ANIMATION_DURATION / 2f,
AnimationCurveType.Linear, value =>
{
_dialogueCanvasGroup.alpha = value;
}, cancellationToken);
if (Time.realtimeSinceStartup - startTime >= duration) break;
yield return CoreAnimation.EnumerateValueAsync(0.2f, 1f, DIALOGUE_FLASHING_ANIMATION_DURATION / 2f,
AnimationCurveType.Linear, value =>
{
_dialogueCanvasGroup.alpha = value;
}, cancellationToken);
if (Time.realtimeSinceStartup - startTime >= duration) break;
}
_dialogueCanvasGroup.alpha = 1f;
}
private IEnumerator PlayDialogueBackgroundPopAnimationAsync(bool showDialogue)
{
const float yOffset = DIALOGUE_SHOW_HIDE_ANIMATION_Y_OFFSET;
Transform dialogueCanvasGroupTransform = _dialogueCanvasGroup.transform;
@@ -579,6 +622,14 @@ namespace Pal3.GameSystem
_lastAvatarCommand = null;
_totalTimeUsedBeforeSkippingTheLastDialogue = 0f;
_dialogueRenderQueue.Clear();
_reactionTimer?.Reset();
if (!_flashingAnimationCts.IsCancellationRequested)
{
_flashingAnimationCts.Cancel();
_flashingAnimationCts = new CancellationTokenSource();
}
ResetUI();
}
}
+15 -19
View File
@@ -38,51 +38,47 @@ namespace Pal3.MetaData
private const char PathSeparator = CpkConstants.DirectorySeparator;
private static readonly string EffectScnRelativePath =
$"{FileConstants.BaseDataCpkPathInfo.cpkName}{PathSeparator}" +
$"{FileConstants.EffectScnFolderName}{PathSeparator}";
#if PAL3
public static readonly Dictionary<FireEffectType, (string TexturePathFormat, string ModelPath, float Size, float lightSourceYOffset)>
FireEffectInfo = new()
{
{FireEffectType.Type1, new (
EffectScnRelativePath + "Fire1" + PathSeparator + "torch{0:00}.tga",
FileConstants.EffectScnFolderVirtualPath + "Fire1" + PathSeparator + "torch{0:00}.tga",
"", 3.3f, 0.5f) },
{FireEffectType.Type2, new (
EffectScnRelativePath + "Fire2" + PathSeparator + "{0:00}.tga",
FileConstants.EffectScnFolderVirtualPath + "Fire2" + PathSeparator + "{0:00}.tga",
"", 1f, 0.2f) },
{FireEffectType.Type3, new (
EffectScnRelativePath + "Candle" + PathSeparator + "{0:000}.tga",
$"{EffectScnRelativePath}Candle{PathSeparator}candle.pol", 1f, 0.2f) },
FileConstants.EffectScnFolderVirtualPath + "Candle" + PathSeparator + "{0:000}.tga",
$"{FileConstants.EffectScnFolderVirtualPath}Candle{PathSeparator}candle.pol", 1f, 0.2f) },
{FireEffectType.Type4, new (
EffectScnRelativePath + "Fire4" + PathSeparator + "{0:00}.tga",
FileConstants.EffectScnFolderVirtualPath + "Fire4" + PathSeparator + "{0:00}.tga",
"", 5.8f, 0.5f) },
{FireEffectType.Type5, new (
EffectScnRelativePath + "Candle" + PathSeparator + "{0:000}.tga",
$"{EffectScnRelativePath}Lamp{PathSeparator}lamp.pol", 0.7f, 0.2f) },
FileConstants.EffectScnFolderVirtualPath + "Candle" + PathSeparator + "{0:000}.tga",
$"{FileConstants.EffectScnFolderVirtualPath}Lamp{PathSeparator}lamp.pol", 0.7f, 0.2f) },
};
#elif PAL3A
public static readonly Dictionary<FireEffectType, (string TexturePathFormat, string ModelPath, float Size, float lightSourceYOffset)>
FireEffectInfo = new()
{
{FireEffectType.Type1, new (
EffectScnRelativePath + "Fire4" + PathSeparator + "{0:00}.tga",
FileConstants.EffectScnFolderVirtualPath + "Fire4" + PathSeparator + "{0:00}.tga",
"", 5.8f, 0.5f) },
{FireEffectType.Type2, new (
EffectScnRelativePath + "Fire1" + PathSeparator + "torch{0:00}.tga",
FileConstants.EffectScnFolderVirtualPath + "Fire1" + PathSeparator + "torch{0:00}.tga",
"", 3.3f, 0.5f) },
{FireEffectType.Type3, new (
EffectScnRelativePath + "Candle" + PathSeparator + "{0:000}.tga",
$"{EffectScnRelativePath}Lamp{PathSeparator}lamp.pol", 0.7f, 0.2f) },
FileConstants.EffectScnFolderVirtualPath + "Candle" + PathSeparator + "{0:000}.tga",
$"{FileConstants.EffectScnFolderVirtualPath}Lamp{PathSeparator}lamp.pol", 0.7f, 0.2f) },
{FireEffectType.Type4, new (
EffectScnRelativePath + "Candle" + PathSeparator + "{0:000}.tga",
$"{EffectScnRelativePath}Candle{PathSeparator}candle.pol", 1f, 0.2f) },
FileConstants.EffectScnFolderVirtualPath + "Candle" + PathSeparator + "{0:000}.tga",
$"{FileConstants.EffectScnFolderVirtualPath}Candle{PathSeparator}candle.pol", 1f, 0.2f) },
{FireEffectType.Type5, new (
EffectScnRelativePath + "Fire2" + PathSeparator + "{0:00}.tga",
FileConstants.EffectScnFolderVirtualPath + "Fire2" + PathSeparator + "{0:00}.tga",
"", 1f, 0.3f) },
{FireEffectType.Type6, new (
EffectScnRelativePath + "Candle" + PathSeparator + "{0:000}.tga",
FileConstants.EffectScnFolderVirtualPath + "Candle" + PathSeparator + "{0:000}.tga",
"", 1f, 0.6f) },
};
#endif
+196 -126
View File
@@ -6,146 +6,216 @@
namespace Pal3.MetaData
{
using System.Collections.Generic;
using System.IO;
using Core.DataReader.Cpk;
using Core.DataReader.Scn;
public static class FileConstants
{
public const string SystemSceFileVirtualPath = @"basedata.cpk\init.sce";
public const string BigMapSceFileVirtualPath = @"basedata.cpk\ui\BigMap\BigMap.sce";
public const string UISceneFolderVirtualPath = @"basedata.cpk\ui\scene";
public const string ObjectFolderVirtualPath = @"basedata.cpk\object";
#if PAL3
public const string EffectScnFolderName = "EffectScn";
#elif PAL3A
public const string EffectScnFolderName = "effectscn";
#endif
public const string EffectFolderName = "effect";
public const string SfxFolderName = "snd";
#if PAL3
public const string ActorFolderName = "ROLE";
#elif PAL3A
public const string ActorFolderName = "role";
#endif
public const string UIFolderName = "ui";
public const string CombatDataFolderName = "cbdata";
public const string CaptionFolderName = "caption";
public const string EmojiFolderName = "EMOTE";
public const string CursorFolderName = "cursor";
public const string MovieFolderName = "movie";
public const string WeaponFolderName = "weapon";
public static readonly (string cpkName, string relativePath) BaseDataCpkPathInfo = new ("basedata.cpk", "basedata");
public static readonly (string cpkName, string relativePath) MusicCpkPathInfo = new ("music.cpk", "music");
public static readonly List<(string cpkName, string relativePath)> MovieCpkPathInfos = new()
{
("movie.cpk", "movie"),
("movie_end.cpk", "movie")
};
#if PAL3A
public static readonly (string cpkName, string relativePath) ScnCpkPathInfo = new ("SCN.CPK", "scene");
public static readonly (string cpkName, string relativePath) SceCpkPathInfo = new ("sce.cpk", "scene");
#if PAL3
private const string ACTOR_FOLDER_NAME = "ROLE";
#elif PAL3A
private const string ACTOR_FOLDER_NAME = "role";
#endif
#if PAL3
public static readonly List<(string cpkName, string relativePath)> SceneCpkPathInfos = new()
private const string EFFECT_SCN_FOLDER_NAME = "EffectScn";
#elif PAL3A
private const string EFFECT_SCN_FOLDER_NAME = "effectscn";
#endif
private const string SCENE_FOLDER_NAME = "scene";
private const string EFFECT_FOLDER_NAME = "effect";
private const string UI_FOLDER_NAME = "ui";
private const string BIG_MAP_FOLDER_NAME = "BigMap";
private const string OBJECT_FOLDER_NAME = "object";
private const string COMBAT_DATA_FOLDER_NAME = "cbdata";
private const string CAPTION_FOLDER_NAME = "caption";
private const string EMOJI_FOLDER_NAME = "EMOTE";
private const string CURSOR_FOLDER_NAME = "cursor";
private const string WEAPON_FOLDER_NAME = "weapon";
private const string BASE_DATA_FOLDER_NAME = "basedata";
private const string MUSIC_FOLDER_NAME = "music";
private const string BASE_DATA_CPK_FILE_NAME = "basedata.cpk";
private const string MUSIC_CPK_FILE_NAME = "music.cpk";
#if PAL3A
private const string SCN_CPK_FILE_NAME = "SCN.CPK";
private const string SCE_CPK_FILE_NAME = "sce.cpk";
#endif
public static readonly HashSet<string> MovieCpkFileNames = new()
{
("M01.cpk", "scene"),
("M02.cpk", "scene"),
("M03.cpk", "scene"),
("M04.cpk", "scene"),
("M05.cpk", "scene"),
("M06.cpk", "scene"),
("m08.cpk", "scene"),
("M09.cpk", "scene"),
("m10.cpk", "scene"),
("m11.cpk", "scene"),
("M15.cpk", "scene"),
("M16.cpk", "scene"),
("M17.cpk", "scene"),
("M18.cpk", "scene"),
("M19.cpk", "scene"),
("M20.cpk", "scene"),
("M21.cpk", "scene"),
("M22.cpk", "scene"),
("M23.cpk", "scene"),
("M24.cpk", "scene"),
("M25.cpk", "scene"),
("M26.cpk", "scene"),
("Q01.cpk", "scene"),
("Q02.cpk", "scene"),
("Q03.cpk", "scene"),
("Q04.cpk", "scene"),
("Q05.cpk", "scene"),
("Q06.cpk", "scene"),
("Q07.cpk", "scene"),
("Q08.cpk", "scene"),
("Q09.cpk", "scene"),
("Q10.cpk", "scene"),
("Q11.cpk", "scene"),
("Q12.cpk", "scene"),
("Q13.cpk", "scene"),
("Q14.cpk", "scene"),
("Q15.cpk", "scene"),
("Q16.cpk", "scene"),
("Q17.cpk", "scene"),
("T01.cpk", "scene"),
("T02.cpk", "scene"),
"movie.cpk",
"movie_end.cpk"
};
#if PAL3
public static readonly HashSet<string> SceneCpkFileNames = new ()
{
"M01.cpk", "M02.cpk", "M03.cpk", "M04.cpk", "M05.cpk", "M06.cpk", "m08.cpk", "M09.cpk",
"m10.cpk", "m11.cpk", "M15.cpk", "M16.cpk", "M17.cpk", "M18.cpk", "M19.cpk",
"M20.cpk", "M21.cpk", "M22.cpk", "M23.cpk", "M24.cpk", "M25.cpk", "M26.cpk",
"Q01.cpk", "Q02.cpk", "Q03.cpk", "Q04.cpk", "Q05.cpk", "Q06.cpk", "Q07.cpk", "Q08.cpk", "Q09.cpk",
"Q10.cpk", "Q11.cpk", "Q12.cpk", "Q13.cpk", "Q14.cpk", "Q15.cpk", "Q16.cpk", "Q17.cpk",
"T01.cpk", "T02.cpk"
};
#elif PAL3A
public static readonly List<(string cpkName, string relativePath)> SceneCpkPathInfos = new()
public static readonly HashSet<string> SceneCpkFileNames = new ()
{
("m01.cpk", "scene"),
("m02.cpk", "scene"),
("m03.cpk", "scene"),
("m04.cpk", "scene"),
("m05.cpk", "scene"),
("m06.cpk", "scene"),
("m07.cpk", "scene"),
("m08.cpk", "scene"),
("m09.cpk", "scene"),
("m10.cpk", "scene"),
("m11.cpk", "scene"),
("m12.cpk", "scene"),
("m13.cpk", "scene"),
("m14.cpk", "scene"),
("m15.cpk", "scene"),
("m16.cpk", "scene"),
("m17.cpk", "scene"),
("m18.cpk", "scene"),
("m19.cpk", "scene"),
("m20.cpk", "scene"),
("m21.cpk", "scene"),
("q01.cpk", "scene"),
("q02_01.cpk", "scene"),
("q02_02.cpk", "scene"),
("q02_03.cpk", "scene"),
("q03.cpk", "scene"),
("q04.cpk", "scene"),
("q05.cpk", "scene"),
("q06.cpk", "scene"),
("q07.cpk", "scene"),
("q08.cpk", "scene"),
("q09.cpk", "scene"),
("q10.cpk", "scene"),
("q11.cpk", "scene"),
("y01.cpk", "scene"),
"m01.cpk", "m02.cpk", "m03.cpk", "m04.cpk", "m05.cpk", "m06.cpk", "m07.cpk", "m08.cpk", "m09.cpk",
"m10.cpk", "m11.cpk", "m12.cpk", "m13.cpk", "m14.cpk", "m15.cpk", "m16.cpk", "m17.cpk", "m18.cpk", "m19.cpk",
"m20.cpk", "m21.cpk",
"q01.cpk", "q02_01.cpk", "q02_02.cpk", "q02_03.cpk", "q03.cpk", "q04.cpk", "q05.cpk", "q06.cpk", "q07.cpk", "q08.cpk", "q09.cpk",
"q10.cpk", "q11.cpk",
"y01.cpk"
};
#endif
#region Platform specific file names and paths
public static readonly string BaseDataCpkFilePath =
$"{BASE_DATA_FOLDER_NAME}{Path.DirectorySeparatorChar}{BASE_DATA_CPK_FILE_NAME}";
public static readonly string MusicCpkFilePath =
$"{MUSIC_FOLDER_NAME}{Path.DirectorySeparatorChar}{MUSIC_CPK_FILE_NAME}";
#if PAL3A
public static readonly string ScnCpkFilePath = $"{SCENE_FOLDER_NAME}{Path.DirectorySeparatorChar}{SCN_CPK_FILE_NAME}";
public static readonly string SceCpkFilePath = $"{SCENE_FOLDER_NAME}{Path.DirectorySeparatorChar}{SCE_CPK_FILE_NAME}";
#endif
public static string GetSceneCpkFilePath(string sceneCpkFileName)
{
return $"{SCENE_FOLDER_NAME}{Path.DirectorySeparatorChar}{sceneCpkFileName}";
}
#endregion
#region CPK file system virtual file names and paths
private const char CpkPathSeparator = CpkConstants.DirectorySeparator;
#if PAL3
public static readonly string GameDatabaseFileVirtualPath =
$"{BASE_DATA_CPK_FILE_NAME}{CpkPathSeparator}{COMBAT_DATA_FOLDER_NAME}{CpkPathSeparator}PAL3_Softstar.gdb";
#elif PAL3A
public static readonly string GameDatabaseFileVirtualPath =
$"{BASE_DATA_CPK_FILE_NAME}{CpkPathSeparator}{COMBAT_DATA_FOLDER_NAME}{CpkPathSeparator}PAL3A_Softstar.gdb";
#endif
public static readonly string EffectFolderVirtualPath =
$"{BASE_DATA_CPK_FILE_NAME}{CpkPathSeparator}{EFFECT_FOLDER_NAME}{CpkPathSeparator}";
public static readonly string EffectScnFolderVirtualPath =
$"{BASE_DATA_CPK_FILE_NAME}{CpkPathSeparator}{EFFECT_SCN_FOLDER_NAME}{CpkPathSeparator}";
public static readonly string SystemSceFileVirtualPath = $"{BASE_DATA_CPK_FILE_NAME}{CpkPathSeparator}init.sce";
public static readonly string BigMapSceFileVirtualPath =
$"{BASE_DATA_CPK_FILE_NAME}{CpkPathSeparator}{UI_FOLDER_NAME}{CpkPathSeparator}{BIG_MAP_FOLDER_NAME}{CpkPathSeparator}BigMap.sce";
public static readonly string UISceneFolderVirtualPath =
$"{BASE_DATA_CPK_FILE_NAME}{CpkPathSeparator}{UI_FOLDER_NAME}{CpkPathSeparator}scene{CpkPathSeparator}";
public static readonly string[] SkyBoxTexturePathFormat =
{
EffectScnFolderVirtualPath + "skybox" + CpkPathSeparator + "{0:00}" + CpkPathSeparator + "{0:00}_lf.tga",
EffectScnFolderVirtualPath + "skybox" + CpkPathSeparator + "{0:00}" + CpkPathSeparator + "{0:00}_fr.tga",
EffectScnFolderVirtualPath + "skybox" + CpkPathSeparator + "{0:00}" + CpkPathSeparator + "{0:00}_rt.tga",
EffectScnFolderVirtualPath + "skybox" + CpkPathSeparator + "{0:00}" + CpkPathSeparator + "{0:00}_bk.tga",
EffectScnFolderVirtualPath + "skybox" + CpkPathSeparator + "{0:00}" + CpkPathSeparator + "{0:00}_up.tga",
EffectScnFolderVirtualPath + "skybox" + CpkPathSeparator + "{0:00}" + CpkPathSeparator + "{0:00}_dn.tga",
};
public static readonly string EmojiSpriteSheetFolderVirtualPath =
$"{BASE_DATA_CPK_FILE_NAME}{CpkPathSeparator}{UI_FOLDER_NAME}{CpkPathSeparator}{EMOJI_FOLDER_NAME}{CpkPathSeparator}";
public static readonly string CursorSpriteFolderVirtualPath =
$"{BASE_DATA_CPK_FILE_NAME}{CpkPathSeparator}{UI_FOLDER_NAME}{CpkPathSeparator}{CURSOR_FOLDER_NAME}{CpkPathSeparator}";
public static readonly string CaptionFolderVirtualPath =
$"{BASE_DATA_CPK_FILE_NAME}{CpkPathSeparator}{CAPTION_FOLDER_NAME}{CpkPathSeparator}";
public static string GetWeaponModelFileVirtualPath(string weaponName)
{
return $"{BASE_DATA_CPK_FILE_NAME}{CpkPathSeparator}" +
$"{WEAPON_FOLDER_NAME}{CpkPathSeparator}{weaponName}{CpkPathSeparator}{weaponName}.pol";
}
public static string GetGameItemModelFileVirtualPath(string itemName)
{
return $"{BASE_DATA_CPK_FILE_NAME}{CpkPathSeparator}item" +
$"{CpkPathSeparator}{itemName}{CpkPathSeparator}{itemName}.pol";
}
public static string GetGameObjectModelFileVirtualPath(string objectFileName)
{
return $"{BASE_DATA_CPK_FILE_NAME}{CpkPathSeparator}{OBJECT_FOLDER_NAME}" +
CpkConstants.DirectorySeparator + objectFileName;
}
public static string GetGameObjectModelFileVirtualPath(ScnSceneInfo sceneInfo, string objectName)
{
return $"{sceneInfo.CityName}{CpkConstants.FileExtension}{CpkPathSeparator}" +
$"{sceneInfo.Model}{CpkPathSeparator}{objectName}";
}
public static string GetMusicFileVirtualPath(string musicName)
{
var separator = CpkConstants.DirectorySeparator;
return $"{MUSIC_CPK_FILE_NAME}{separator}" +
$"{MUSIC_FOLDER_NAME}{separator}{musicName}.mp3";
}
public static string GetActorFolderVirtualPath(string actorName)
{
return $"{BASE_DATA_CPK_FILE_NAME}{CpkPathSeparator}" +
$"{ACTOR_FOLDER_NAME}{CpkPathSeparator}{actorName}{CpkPathSeparator}";
}
public static string GetNavFileVirtualPath(string sceneFileName, string sceneName)
{
#if PAL3
var navFilePath = $"{sceneFileName}{CpkConstants.FileExtension}{CpkPathSeparator}" +
$"{sceneName}{CpkPathSeparator}{sceneName}.nav";
#elif PAL3A
var navFilePath = $"{SCN_CPK_FILE_NAME}{CpkPathSeparator}SCN{CpkPathSeparator}" +
$"{sceneFileName}{CpkPathSeparator}{sceneName}{CpkPathSeparator}{sceneName}.nav";
#endif
return navFilePath;
}
public static string GetScnFileVirtualPath(string sceneFileName, string sceneName)
{
#if PAL3
var scnFilePath = $"{sceneFileName}{CpkConstants.FileExtension}{CpkPathSeparator}{sceneName}.scn";
#elif PAL3A
var scnFilePath = $"{SCN_CPK_FILE_NAME}{CpkPathSeparator}SCN{CpkPathSeparator}" +
$"{sceneFileName}{CpkPathSeparator}{sceneFileName}_{sceneName}.scn";
#endif
return scnFilePath;
}
public static string GetSceneSceFileVirtualPath(string sceneFileName)
{
#if PAL3
var sceFilePath = $"{sceneFileName}{CpkConstants.FileExtension}{CpkPathSeparator}{sceneFileName}.sce";
#elif PAL3A
var sceFilePath = $"{SCE_CPK_FILE_NAME}{CpkPathSeparator}Sce{CpkPathSeparator}{sceneFileName}.sce";
#endif
return sceFilePath;
}
#endregion
public static string GetActorFolderName()
{
return ACTOR_FOLDER_NAME;
}
}
}
@@ -6,26 +6,9 @@
namespace Pal3.MetaData
{
using System.Collections.Generic;
using Core.DataReader.Cpk;
public static class SceneConstants
{
private static readonly char PathSeparator = CpkConstants.DirectorySeparator;
private static readonly string EffectScnRelativePath =
$"{FileConstants.BaseDataCpkPathInfo.cpkName}{PathSeparator}" +
$"{FileConstants.EffectScnFolderName}{PathSeparator}";
public static readonly string[] SkyBoxTexturePathFormat =
{
EffectScnRelativePath + "skybox" + PathSeparator + "{0:00}" + PathSeparator + "{0:00}_lf.tga",
EffectScnRelativePath + "skybox" + PathSeparator + "{0:00}" + PathSeparator + "{0:00}_fr.tga",
EffectScnRelativePath + "skybox" + PathSeparator + "{0:00}" + PathSeparator + "{0:00}_rt.tga",
EffectScnRelativePath + "skybox" + PathSeparator + "{0:00}" + PathSeparator + "{0:00}_bk.tga",
EffectScnRelativePath + "skybox" + PathSeparator + "{0:00}" + PathSeparator + "{0:00}_up.tga",
EffectScnRelativePath + "skybox" + PathSeparator + "{0:00}" + PathSeparator + "{0:00}_dn.tga",
};
#if PAL3
public static readonly List<(string cpkName, string sceneName)> SceneCpkNameInfos = new()
{
@@ -404,7 +404,7 @@ namespace Pal3.Renderer
_animationCts = new CancellationTokenSource();
yield return PlayAnimationInternal(timeScale,
yield return PlayAnimationInternalAsync(timeScale,
_animationDuration * durationPercentage,
loopCount,
startFromBeginning,
@@ -412,7 +412,7 @@ namespace Pal3.Renderer
_animationCts.Token);
}
private IEnumerator PlayAnimationInternal(float timeScale,
private IEnumerator PlayAnimationInternalAsync(float timeScale,
float duration,
int loopCount,
bool startFromBeginning,
@@ -423,21 +423,21 @@ namespace Pal3.Renderer
{
while (!cancellationToken.IsCancellationRequested)
{
yield return PlayOneTimeAnimationInternal(timeScale, duration, startFromBeginning, cancellationToken);
yield return PlayOneTimeAnimationInternalAsync(timeScale, duration, startFromBeginning, cancellationToken);
}
}
else if (loopCount > 0)
{
while (!cancellationToken.IsCancellationRequested && --loopCount >= 0)
{
yield return PlayOneTimeAnimationInternal(timeScale, duration, startFromBeginning, cancellationToken);
yield return PlayOneTimeAnimationInternalAsync(timeScale, duration, startFromBeginning, cancellationToken);
}
}
onFinished?.Invoke();
}
private IEnumerator PlayOneTimeAnimationInternal(float timeScale,
private IEnumerator PlayOneTimeAnimationInternalAsync(float timeScale,
float duration,
bool startFromBeginning,
CancellationToken cancellationToken)
+1 -1
View File
@@ -116,7 +116,7 @@ namespace Pal3.Scene
private void InitNavData()
{
NavFile = _resourceProvider.GetNav(ScnFile.SceneInfo.CityName, ScnFile.SceneInfo.Model);
NavFile = _resourceProvider.GetNavFile(ScnFile.SceneInfo.CityName, ScnFile.SceneInfo.Model);
Tilemap = new Tilemap(NavFile);
}
+2 -2
View File
@@ -76,7 +76,7 @@ namespace Pal3.Scene
timer.Start();
DisposeCurrentScene();
ScnFile scnFile = _resourceProvider.GetScn(sceneFileName, sceneName);
ScnFile scnFile = _resourceProvider.GetScnFile(sceneFileName, sceneName);
CommandDispatcher<ICommand>.Instance.Dispatch(new ScenePreLoadingNotification(scnFile.SceneInfo));
Debug.Log("Loading scene: " + JsonConvert.SerializeObject(scnFile.SceneInfo));
@@ -95,7 +95,7 @@ namespace Pal3.Scene
_sceneObjectIdsToNotLoadFromSaveState.Clear();
// Add scene script if exists.
SceFile sceFile = _resourceProvider.GetSceneSce(sceneFileName);
SceFile sceFile = _resourceProvider.GetSceneSceFile(sceneFileName);
CommandDispatcher<ICommand>.Instance.Dispatch(
_scriptManager.TryAddSceneScript(sceFile, $"_{sceneFileName}_{sceneName}", out var sceneScriptId)
? new ScenePostLoadingNotification(scnFile.SceneInfo, sceneScriptId)
@@ -28,8 +28,8 @@ namespace Pal3.Scene.SceneObjects
private readonly PlayerGamePlayController _playerGamePlayController;
private readonly string _interactionIndicatorModelPath = FileConstants.ObjectFolderVirtualPath +
CpkConstants.DirectorySeparator + "g02.cvd";
private const string INTERACTION_INDICATOR_MODEL_FILE_NAME = "g02.cvd";
private CvdModelRenderer _upperInteractionIndicatorRenderer;
private CvdModelRenderer _lowerInteractionIndicatorRenderer;
private GameObject _upperInteractionIndicatorGameObject;
@@ -59,9 +59,10 @@ namespace Pal3.Scene.SceneObjects
IMaterialFactory materialFactory = resourceProvider.GetMaterialFactory();
CvdFile indicatorCvdFile = resourceProvider.GetGameResourceFile<CvdFile>(_interactionIndicatorModelPath);
string indicatorModelPath = FileConstants.GetGameObjectModelFileVirtualPath(INTERACTION_INDICATOR_MODEL_FILE_NAME);
CvdFile indicatorCvdFile = resourceProvider.GetGameResourceFile<CvdFile>(indicatorModelPath);
ITextureResourceProvider textureProvider = resourceProvider.CreateTextureResourceProvider(
Utility.GetRelativeDirectoryPath(_interactionIndicatorModelPath));
Utility.GetRelativeDirectoryPath(indicatorModelPath));
// Upper indicator
{
@@ -42,13 +42,13 @@ namespace Pal3.Scene.SceneObjects
state.SwitchState == 1)
{
isFlowerInOpenState = false;
ModelFilePath = ModelFilePath.Replace("1.pol", "2.pol",
ModelFileVirtualPath = ModelFileVirtualPath.Replace("1.pol", "2.pol",
StringComparison.OrdinalIgnoreCase);
}
else
{
isFlowerInOpenState = true;
ModelFilePath = ModelFilePath.Replace("2.pol", "1.pol",
ModelFileVirtualPath = ModelFileVirtualPath.Replace("2.pol", "1.pol",
StringComparison.OrdinalIgnoreCase);
}
@@ -49,7 +49,7 @@ namespace Pal3.Scene.SceneObjects
#if PAL3
// Fix the color(texture) issue of impulsive mechanism in M11-2 which uses _r.pol as the main model
if (string.Equals(ModelFilePath, @"M11.cpk\2\_r.pol", StringComparison.OrdinalIgnoreCase))
if (string.Equals(ModelFileVirtualPath, @"M11.cpk\2\_r.pol", StringComparison.OrdinalIgnoreCase))
{
tintColor = new Color(0.9f, 0.45f, 0f, 0.1f);
}
@@ -59,7 +59,7 @@ namespace Pal3.Scene.SceneObjects
_subObjectGameObject = new GameObject($"Object_{ObjectInfo.Id}_{ObjectInfo.Type}_SubObject");
var subObjectModelPath = ModelFilePath.Insert(ModelFilePath.LastIndexOf('.'), "a");
var subObjectModelPath = ModelFileVirtualPath.Insert(ModelFileVirtualPath.LastIndexOf('.'), "a");
PolFile polFile = resourceProvider.GetGameResourceFile<PolFile>(subObjectModelPath);
ITextureResourceProvider textureProvider = resourceProvider.CreateTextureResourceProvider(
Utility.GetRelativeDirectoryPath(subObjectModelPath));
@@ -41,11 +41,11 @@ namespace Pal3.Scene.SceneObjects
_meshCollider.Init(new Vector3(-1f, 0f, 0f));
// Add sub-component to the main object.
if (ModelFilePath.EndsWith("1.pol"))
if (ModelFileVirtualPath.EndsWith("1.pol"))
{
_subObjectGameObject = new GameObject($"Object_{ObjectInfo.Id}_{ObjectInfo.Type}_SubObject");
var subObjectModelPath = ModelFilePath.Replace("1.pol", "2.pol");
var subObjectModelPath = ModelFileVirtualPath.Replace("1.pol", "2.pol");
PolFile polFile = resourceProvider.GetGameResourceFile<PolFile>(subObjectModelPath);
ITextureResourceProvider textureProvider = resourceProvider.CreateTextureResourceProvider(
Utility.GetRelativeDirectoryPath(subObjectModelPath));
@@ -15,12 +15,10 @@ namespace Pal3.Scene.SceneObjects
using Command.SceCommands;
using Core.Animation;
using Core.DataLoader;
using Core.DataReader.Cpk;
using Core.DataReader.Cvd;
using Core.DataReader.Pol;
using Core.DataReader.Scn;
using Core.GameBox;
using Core.Services;
using Core.Utils;
using Data;
using Dev;
@@ -52,7 +50,7 @@ namespace Pal3.Scene.SceneObjects
public SceneObjectModelType ModelType { get; }
internal bool Activated;
internal string ModelFilePath;
internal string ModelFileVirtualPath;
private IEffect _effectComponent;
private GameObject _sceneObjectGameObject;
@@ -65,10 +63,10 @@ namespace Pal3.Scene.SceneObjects
ObjectInfo = objectInfo;
SceneInfo = sceneInfo;
ModelFilePath = hasModel && !string.IsNullOrEmpty(objectInfo.Name) ?
ModelFileVirtualPath = hasModel && !string.IsNullOrEmpty(objectInfo.Name) ?
GetModelFilePath(objectInfo, sceneInfo) : string.Empty;
ModelType = SceneObjectModelTypeResolver.GetType(Path.GetFileName(ModelFilePath));
ModelType = SceneObjectModelTypeResolver.GetType(Path.GetFileName(ModelFileVirtualPath));
GraphicsEffect = GetEffectType(objectInfo);
}
@@ -87,27 +85,23 @@ namespace Pal3.Scene.SceneObjects
private string GetModelFilePath(ScnObjectInfo objectInfo, ScnSceneInfo sceneInfo)
{
var separator = CpkConstants.DirectorySeparator;
var modelFilePath = string.Empty;
if (objectInfo.Name.StartsWith('_'))
if (objectInfo.Name.StartsWith('_')) // is object model in current scene folder
{
modelFilePath = $"{sceneInfo.CityName}{CpkConstants.FileExtension}{separator}" +
$"{sceneInfo.Model}{separator}{objectInfo.Name}";
modelFilePath = FileConstants.GetGameObjectModelFileVirtualPath(sceneInfo, objectInfo.Name);
}
else if (objectInfo.Name.StartsWith('+'))
{
// Special vfx effect.
}
else if (!objectInfo.Name.Contains('.'))
else if (!objectInfo.Name.Contains('.')) // is item name
{
modelFilePath = $"{FileConstants.BaseDataCpkPathInfo.cpkName}{separator}item" +
$"{separator}{objectInfo.Name}{separator}{objectInfo.Name}.pol";
modelFilePath = FileConstants.GetGameItemModelFileVirtualPath(objectInfo.Name);
}
else
else // is object model in game object folder
{
modelFilePath = $"{FileConstants.BaseDataCpkPathInfo.cpkName}{separator}object" +
$"{separator}{objectInfo.Name}";
modelFilePath = FileConstants.GetGameObjectModelFileVirtualPath(objectInfo.Name);
}
return modelFilePath;
@@ -130,9 +124,9 @@ namespace Pal3.Scene.SceneObjects
if (ModelType == SceneObjectModelType.PolModel)
{
PolFile polFile = resourceProvider.GetGameResourceFile<PolFile>(ModelFilePath);
PolFile polFile = resourceProvider.GetGameResourceFile<PolFile>(ModelFileVirtualPath);
ITextureResourceProvider textureProvider = resourceProvider.CreateTextureResourceProvider(
Utility.GetRelativeDirectoryPath(ModelFilePath));
Utility.GetRelativeDirectoryPath(ModelFileVirtualPath));
_polyModelRenderer = _sceneObjectGameObject.AddComponent<PolyModelRenderer>();
_polyModelRenderer.Render(polFile,
textureProvider,
@@ -141,9 +135,9 @@ namespace Pal3.Scene.SceneObjects
}
else if (ModelType == SceneObjectModelType.CvdModel)
{
CvdFile cvdFile = resourceProvider.GetGameResourceFile<CvdFile>(ModelFilePath);
CvdFile cvdFile = resourceProvider.GetGameResourceFile<CvdFile>(ModelFileVirtualPath);
ITextureResourceProvider textureProvider = resourceProvider.CreateTextureResourceProvider(
Utility.GetRelativeDirectoryPath(ModelFilePath));
Utility.GetRelativeDirectoryPath(ModelFileVirtualPath));
_cvdModelRenderer = _sceneObjectGameObject.AddComponent<CvdModelRenderer>();
_cvdModelRenderer.Init(cvdFile,
textureProvider,
@@ -31,8 +31,8 @@ namespace Pal3.Scene.SceneObjects
private SceneObjectMeshCollider _meshCollider;
private readonly string _interactionIndicatorModelPath = FileConstants.ObjectFolderVirtualPath +
CpkConstants.DirectorySeparator + "g03.cvd";
private const string INTERACTION_INDICATOR_MODEL_FILE_NAME = "g03.cvd";
private CvdModelRenderer _interactionIndicatorRenderer;
private GameObject _interactionIndicatorGameObject;
@@ -66,14 +66,18 @@ namespace Pal3.Scene.SceneObjects
// and Parameter[1] is 0 (1 means the switch is not directly interactable)
if (ObjectInfo.Times > 0 && ObjectInfo.Parameters[1] == 0)
{
string interactionIndicatorModelPath = FileConstants.GetGameObjectModelFileVirtualPath(
INTERACTION_INDICATOR_MODEL_FILE_NAME);
Vector3 switchPosition = sceneGameObject.transform.position;
_interactionIndicatorGameObject = new GameObject("Switch_Interaction_Indicator");
_interactionIndicatorGameObject.transform.SetParent(sceneGameObject.transform, false);
_interactionIndicatorGameObject.transform.position =
new Vector3(switchPosition.x, GetRendererBounds().max.y + 1f, switchPosition.z);
CvdFile cvdFile = resourceProvider.GetGameResourceFile<CvdFile>(_interactionIndicatorModelPath);
CvdFile cvdFile = resourceProvider.GetGameResourceFile<CvdFile>(interactionIndicatorModelPath);
ITextureResourceProvider textureProvider = resourceProvider.CreateTextureResourceProvider(
Utility.GetRelativeDirectoryPath(_interactionIndicatorModelPath));
Utility.GetRelativeDirectoryPath(interactionIndicatorModelPath));
_interactionIndicatorRenderer = _interactionIndicatorGameObject.AddComponent<CvdModelRenderer>();
_interactionIndicatorRenderer.Init(cvdFile,
textureProvider,
+24 -19
View File
@@ -119,25 +119,6 @@ namespace Pal3.Script
CommandExecutorRegistry<ICommand>.Instance.Register(this);
}
public void Dispose()
{
Dispose(true);
GC.SuppressFinalize(this);
}
private void Dispose(bool disposing)
{
if (!_isDisposed)
{
if (disposing)
{
CommandExecutorRegistry<ICommand>.Instance.UnRegister(this);
_scriptDataReader.Dispose();
}
_isDisposed = true;
}
}
public bool Update(float deltaTime)
{
var canExecute = true;
@@ -242,6 +223,30 @@ namespace Pal3.Script
}
}
~PalScriptRunner()
{
Dispose(disposing: false);
}
public void Dispose()
{
Dispose(true);
GC.SuppressFinalize(this);
}
private void Dispose(bool disposing)
{
if (!_isDisposed)
{
if (disposing)
{
CommandExecutorRegistry<ICommand>.Instance.UnRegister(this);
_scriptDataReader.Dispose();
}
_isDisposed = true;
}
}
public void Execute(ScriptVarSetValueCommand command)
{
if (!_isExecuting) return;
+2 -2
View File
@@ -40,8 +40,8 @@ namespace Pal3.Script
public ScriptManager(GameResourceProvider resourceProvider)
{
resourceProvider = Requires.IsNotNull(resourceProvider, nameof(resourceProvider));
_systemSceFile = resourceProvider.GetSystemSce();
_bigMapSceFile = resourceProvider.GetBigMapSce();
_systemSceFile = resourceProvider.GetSystemSceFile();
_bigMapSceFile = resourceProvider.GetBigMapSceFile();
CommandExecutorRegistry<ICommand>.Instance.Register(this);
}
@@ -18,10 +18,12 @@ namespace ResourceViewer
using Core.DataReader.Gdb;
using Core.DataReader.Mov;
using Core.DataReader.Msh;
using Core.DataReader.Mtl;
using Core.DataReader.Mv3;
using Core.DataReader.Pol;
using Core.DataReader.Sce;
using Core.DataReader.Scn;
using Core.Extensions;
using Core.FileSystem;
using Core.Services;
using Core.Utils;
@@ -52,6 +54,7 @@ namespace ResourceViewer
[SerializeField] private Button randomCvdButton;
[SerializeField] private Button randomMv3Button;
[SerializeField] private Button randomMp3Button;
[SerializeField] private Button randomMovButton;
[SerializeField] private AudioSource audioSource;
[SerializeField] private FpsCounter fpsCounter;
@@ -62,6 +65,7 @@ namespace ResourceViewer
private IList<string> _polFiles = new List<string>();
private IList<string> _cvdFiles = new List<string>();
private IList<string> _mv3Files = new List<string>();
private IList<string> _movFiles = new List<string>();
private IList<string> _mp3Files = new List<string>();
private static readonly Random Random = new ();
@@ -98,11 +102,13 @@ namespace ResourceViewer
_polFiles = _fileSystem.Search(".pol").ToList();
_cvdFiles = _fileSystem.Search(".cvd").ToList();
_mv3Files = _fileSystem.Search(".mv3").ToList();
_movFiles = _fileSystem.Search(".mov").ToList();
_mp3Files = _fileSystem.Search(".mp3").ToList();
randomPolButton.onClick.AddListener(RandPol);
randomCvdButton.onClick.AddListener(RandCvd);
randomMv3Button.onClick.AddListener(RandMv3);
randomMovButton.onClick.AddListener(RandMov);
randomMp3Button.onClick.AddListener(RandMp3);
DebugLogConsole.AddCommand<string>("Search", "Search files using keyword.", Search);
@@ -201,6 +207,11 @@ namespace ResourceViewer
while (!LoadMv3(_mv3Files[Random.Next(0, _mv3Files.Count)])) { }
}
private void RandMov()
{
while (!LoadMov(_movFiles[Random.Next(0, _movFiles.Count)])) { }
}
private void RandMp3()
{
while (!LoadMp3(_mp3Files[Random.Next(0, _mp3Files.Count)])) { }
@@ -228,6 +239,7 @@ namespace ResourceViewer
".pol" => LoadPol(filePath),
".cvd" => LoadCvd(filePath),
".mv3" => LoadMv3(filePath),
".mov" => LoadMov(filePath),
".mp3" => LoadMp3(filePath),
_ => throw new Exception($"File extension: <{ext}> not supported.")
};
@@ -281,9 +293,9 @@ namespace ResourceViewer
ITextureResourceProvider textureProvider = _resourceProvider.CreateTextureResourceProvider(
Utility.GetRelativeDirectoryPath(filePath));
var mesh = new GameObject(Utility.GetFileName(filePath, CpkConstants.DirectorySeparator));
var meshRenderer = mesh.AddComponent<CvdModelRenderer>();
mesh.transform.SetParent(_renderingRoot.transform);
var animationNode = new GameObject(Utility.GetFileName(filePath, CpkConstants.DirectorySeparator));
var meshRenderer = animationNode.AddComponent<CvdModelRenderer>();
animationNode.transform.SetParent(_renderingRoot.transform);
meshRenderer.Init(cvdFile,
textureProvider,
@@ -325,24 +337,26 @@ namespace ResourceViewer
var animationNode = new GameObject(Utility.GetFileName(filePath, CpkConstants.DirectorySeparator));
animationNode.transform.SetParent(_renderingRoot.transform);
var mv3AnimationRenderer = animationNode.AddComponent<Mv3ModelRenderer>();
// For debugging tag node:
//For debugging tag node:
// if (mv3File.TagNodes is {Length: > 0} &&
// !mv3File.TagNodes[0].Name.Equals("tag_weapon3", StringComparison.OrdinalIgnoreCase) &&
// filePath.Contains(@"ROLE\101"))
// {
// var weaponName = "JT13";
//
// var separator = CpkConstants.CpkDirectorySeparatorChar;
// var weaponPath = FileConstants.GetWeaponModelFileVirtualPath(weaponName);
//
// var weaponPath = $"{FileConstants.BaseDataCpkPathInfo.cpkName}{separator}" +
// $"{FileConstants.WeaponFolderName}{separator}{weaponName}{separator}{weaponName}.pol";
//
// var (polFile, weaponTextureProvider) = _resourceProvider.GetPol(weaponPath);
// mv3AnimationRenderer.Init(mv3File, textureProvider, Color.white,
// polFile, weaponTextureProvider, Color.white);
// PolFile polFile = _resourceProvider.GetGameResourceFile<PolFile>(weaponPath);
// ITextureResourceProvider weaponTextureProvider = _resourceProvider.CreateTextureResourceProvider(
// Utility.GetRelativeDirectoryPath(weaponPath));
// mv3AnimationRenderer.Init(mv3File,
// _resourceProvider.GetMaterialFactory(),
// textureProvider,
// Color.white,
// polFile,
// weaponTextureProvider);
// }
// else
{
@@ -367,6 +381,55 @@ namespace ResourceViewer
}
}
private bool LoadMov(string filePath)
{
DestroyExistingRenderingObjects();
consoleTextUI.text = $"Loading: {filePath}";
Debug.Log($"Loading: {filePath}");
try
{
var actorFolderPath = Utility.GetRelativeDirectoryPath(filePath);
var actorName = Path.GetFileName(actorFolderPath);
string mshFilePath = actorFolderPath + CpkConstants.DirectorySeparator + actorName + ".msh";
var mshFile = _resourceProvider.GetGameResourceFile<MshFile>(mshFilePath);
string mtlFilePath = actorFolderPath + CpkConstants.DirectorySeparator + actorName + ".mtl";
var mtlFile = _resourceProvider.GetGameResourceFile<MtlFile>(mtlFilePath);
var movFile = _resourceProvider.GetGameResourceFile<MovFile>(filePath);
ITextureResourceProvider textureProvider = _resourceProvider.CreateTextureResourceProvider(
Utility.GetRelativeDirectoryPath(mtlFilePath));
var animationNode = new GameObject(Utility.GetFileName(filePath, CpkConstants.DirectorySeparator));
animationNode.transform.SetParent(_renderingRoot.transform);
var skeletalModelRenderer = animationNode.GetOrAddComponent<SkeletalModelRenderer>();
skeletalModelRenderer.Init(mshFile,
mtlFile,
_resourceProvider.GetMaterialFactory(),
textureProvider);
skeletalModelRenderer.StartAnimation(movFile);
consoleTextUI.text = $"{filePath}";
Camera.main!.transform.LookAt(new Vector3(0, 2, 0));
return true;
}
catch (Exception ex)
{
Debug.LogException(ex);
consoleTextUI.text = $"Failed to load: {filePath}";
return false;
}
}
#if UNITY_EDITOR
private void DecompileAllSceScripts(bool dialogueOnly)
{
@@ -537,7 +600,7 @@ namespace ResourceViewer
{
nowPlayingTextUI.text = "* Now Playing: " + Utility.GetFileName(filePath, CpkConstants.DirectorySeparator);
StartCoroutine(LoadMp3AudioClipAsync(filePath,
_resourceProvider.GetMp3FilePathInCacheFolder(filePath)));
_resourceProvider.GetMusicFilePathInCacheFolder(filePath)));
return true;
}
+49 -10
View File
@@ -133,7 +133,7 @@ PlayerSettings:
vulkanEnableLateAcquireNextImage: 0
vulkanEnableCommandBufferRecycling: 1
loadStoreDebugModeEnabled: 0
bundleVersion: 0.66
bundleVersion: 0.67
preloadedAssets: []
metroInputSource: 0
wsaTransparentSwapchain: 0
@@ -155,8 +155,17 @@ PlayerSettings:
androidMaxAspectRatio: 2.1
applicationIdentifier:
Android: com.Jackil.PAL3
GameCoreScarlett: com.Jackil.PAL3
GameCoreXboxOne: com.Jackil.PAL3
Nintendo Switch: com.Jackil.PAL3
PS4: com.Jackil.PAL3
PS5: com.Jackil.PAL3
Standalone: com.Jackil.PAL3
VisionOS: com.Jackil.PAL3
Windows Store Apps: com.Jackil.PAL3
XboxOne: com.Jackil.PAL3
iPhone: com.Jackil.PAL3
tvOS: com.Jackil.PAL3
buildNumber:
Bratwurst: 0
Standalone: 0
@@ -328,6 +337,36 @@ PlayerSettings:
m_Width: 16
m_Height: 16
m_Kind: 0
- m_BuildTarget: PS4
m_Icons:
- serializedVersion: 2
m_Icon: {fileID: 2800000, guid: 6b32649dccc45df4ebe8e3f8eccee249, type: 3}
m_Width: 512
m_Height: 512
m_Kind: 0
- m_BuildTarget: XboxOne
m_Icons:
- serializedVersion: 2
m_Icon: {fileID: 2800000, guid: 6b32649dccc45df4ebe8e3f8eccee249, type: 3}
m_Width: 100
m_Height: 100
m_Kind: 0
- serializedVersion: 2
m_Icon: {fileID: 2800000, guid: 6b32649dccc45df4ebe8e3f8eccee249, type: 3}
m_Width: 208
m_Height: 208
m_Kind: 0
- serializedVersion: 2
m_Icon: {fileID: 2800000, guid: 6b32649dccc45df4ebe8e3f8eccee249, type: 3}
m_Width: 480
m_Height: 480
m_Kind: 0
- m_BuildTarget: Nintendo Switch
m_Icons: []
- m_BuildTarget: Windows Store Apps
m_Icons: []
- m_BuildTarget: VisionOS
m_Icons: []
m_BuildTargetPlatformIcons:
- m_BuildTarget: iPhone
m_Icons:
@@ -910,22 +949,22 @@ PlayerSettings:
Bratwurst: UNITY_POST_PROCESSING_STACK_V2
CloudRendering: UNITY_POST_PROCESSING_STACK_V2
EmbeddedLinux: UNITY_POST_PROCESSING_STACK_V2
GameCoreScarlett: UNITY_POST_PROCESSING_STACK_V2
GameCoreXboxOne: UNITY_POST_PROCESSING_STACK_V2
GameCoreScarlett: PAL3;UNITY_POST_PROCESSING_STACK_V2
GameCoreXboxOne: PAL3;UNITY_POST_PROCESSING_STACK_V2
LinuxHeadlessSimulation: UNITY_POST_PROCESSING_STACK_V2
Lumin: UNITY_POST_PROCESSING_STACK_V2
Nintendo Switch: UNITY_POST_PROCESSING_STACK_V2
PS4: UNITY_POST_PROCESSING_STACK_V2
PS5: UNITY_POST_PROCESSING_STACK_V2
Nintendo Switch: PAL3;UNITY_POST_PROCESSING_STACK_V2
PS4: PAL3;UNITY_POST_PROCESSING_STACK_V2
PS5: PAL3;UNITY_POST_PROCESSING_STACK_V2
QNX: UNITY_POST_PROCESSING_STACK_V2
Stadia: UNITY_POST_PROCESSING_STACK_V2
Standalone: PAL3;UNITY_POST_PROCESSING_STACK_V2
VisionOS: UNITY_POST_PROCESSING_STACK_V2
VisionOS: PAL3;UNITY_POST_PROCESSING_STACK_V2
WebGL: UNITY_POST_PROCESSING_STACK_V2
Windows Store Apps: UNITY_POST_PROCESSING_STACK_V2
XboxOne: UNITY_POST_PROCESSING_STACK_V2
Windows Store Apps: PAL3;UNITY_POST_PROCESSING_STACK_V2
XboxOne: PAL3;UNITY_POST_PROCESSING_STACK_V2
iPhone: PAL3
tvOS: UNITY_POST_PROCESSING_STACK_V2
tvOS: PAL3;UNITY_POST_PROCESSING_STACK_V2
additionalCompilerArguments: {}
platformArchitecture: {}
scriptingBackend: