- 完善设置面板的具体功能,全局性的设置项已经可以发挥作用了
- 调整部分项目结构和AB包设置,打包测试设置面板的功能
This commit is contained in:
@@ -1,4 +0,0 @@
|
||||
Game.Id
|
||||
Star Force
|
||||
Scene.Menu1
|
||||
Scene.Main2
|
||||
@@ -1,6 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7fd11dc5d29076d469d414dec2818f11
|
||||
TextScriptImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 44c8db52241385c45bbb14a1718f17bf
|
||||
timeCreated: 1528026123
|
||||
licenseType: Pro
|
||||
TextScriptImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -2,14 +2,14 @@
|
||||
<UnityGameFramework>
|
||||
<ResourceBuilder>
|
||||
<Settings>
|
||||
<InternalResourceVersion>0</InternalResourceVersion>
|
||||
<InternalResourceVersion>1</InternalResourceVersion>
|
||||
<Platforms>1</Platforms>
|
||||
<AssetBundleCompression>1</AssetBundleCompression>
|
||||
<CompressionHelperTypeName>UnityGameFramework.Runtime.DefaultCompressionHelper</CompressionHelperTypeName>
|
||||
<AdditionalCompressionSelected>True</AdditionalCompressionSelected>
|
||||
<ForceRebuildAssetBundleSelected>False</ForceRebuildAssetBundleSelected>
|
||||
<BuildEventHandlerTypeName>StarForce.Editor.StarForceBuildEventHandler</BuildEventHandlerTypeName>
|
||||
<OutputDirectory></OutputDirectory>
|
||||
<OutputDirectory>D:/Learn/GameLearn/UnityProjects/Biography of Li Jian/AssetBundles</OutputDirectory>
|
||||
<OutputPackageSelected>True</OutputPackageSelected>
|
||||
<OutputFullSelected>True</OutputFullSelected>
|
||||
<OutputPackedSelected>True</OutputPackedSelected>
|
||||
|
||||
@@ -2,23 +2,16 @@
|
||||
<UnityGameFramework>
|
||||
<ResourceCollection>
|
||||
<Resources>
|
||||
<Resource Name="Configs" FileSystem="GameData" LoadType="0" Packed="True" ResourceGroups="Base" />
|
||||
<Resource Name="DataTables" FileSystem="GameData" LoadType="0" Packed="True" ResourceGroups="Base" />
|
||||
<Resource Name="Entities" FileSystem="Resources" LoadType="0" Packed="True" />
|
||||
<Resource Name="Fonts" FileSystem="UI" LoadType="0" Packed="True" ResourceGroups="Base" />
|
||||
<Resource Name="Localization/Dictionaries" Variant="en-us" FileSystem="UI" LoadType="0" Packed="True" ResourceGroups="Base" />
|
||||
<Resource Name="Localization/Dictionaries" Variant="ko-kr" FileSystem="UI" LoadType="0" Packed="True" ResourceGroups="Base" />
|
||||
<Resource Name="Localization/Dictionaries" Variant="zh-cn" FileSystem="UI" LoadType="0" Packed="True" ResourceGroups="Base" />
|
||||
<Resource Name="Localization/Dictionaries" Variant="zh-tw" FileSystem="UI" LoadType="0" Packed="True" ResourceGroups="Base" />
|
||||
<Resource Name="Materials" FileSystem="Resources" LoadType="0" Packed="True" />
|
||||
<Resource Name="Meshes" FileSystem="Resources" LoadType="0" Packed="True" />
|
||||
<Resource Name="Music/About" FileSystem="Resources" LoadType="0" Packed="True" ResourceGroups="Music" />
|
||||
<Resource Name="Music/Background" FileSystem="Resources" LoadType="0" Packed="True" ResourceGroups="Music" />
|
||||
<Resource Name="Music/Menu" FileSystem="Resources" LoadType="0" Packed="True" ResourceGroups="Music" />
|
||||
<Resource Name="Scenes" FileSystem="Resources" LoadType="0" Packed="True" />
|
||||
<Resource Name="SceneSettings" LoadType="0" Packed="True" />
|
||||
<Resource Name="Sounds" FileSystem="Resources" LoadType="0" Packed="True" />
|
||||
<Resource Name="Textures" FileSystem="Resources" LoadType="0" Packed="True" />
|
||||
<Resource Name="UI/UIForms" FileSystem="UI" LoadType="0" Packed="True" />
|
||||
<Resource Name="UI/UIItems" LoadType="0" Packed="True" />
|
||||
<Resource Name="UI/UISounds" FileSystem="UI" LoadType="0" Packed="True" />
|
||||
<Resource Name="UI/UISprites/Common" FileSystem="UI" LoadType="0" Packed="True" />
|
||||
<Resource Name="UI/UISprites/Icons" FileSystem="UI" LoadType="0" Packed="True" />
|
||||
@@ -26,133 +19,58 @@
|
||||
</Resources>
|
||||
<Assets>
|
||||
<Asset Guid="0179316b5fc7c2946a67c5877c02fc30" ResourceName="UI/UISprites/Common" />
|
||||
<Asset Guid="01ce90464744bbb40a9d235bdcc27328" ResourceName="UI/UIForms" />
|
||||
<Asset Guid="04d7dde7615d71b4db1a0c8d67a62e95" ResourceName="UI/UIForms" />
|
||||
<Asset Guid="04dbc0581071c254ea6564b2ff06ff9b" ResourceName="Textures" />
|
||||
<Asset Guid="093f8873cfe371d41b854ed9fb6bff69" ResourceName="Music/About" />
|
||||
<Asset Guid="0963e6c65b2b1f74d9f455e21901e2dc" ResourceName="Textures" />
|
||||
<Asset Guid="0992f89f84d762f478fd32f8225168b0" ResourceName="Entities" />
|
||||
<Asset Guid="09966b19e546cc94aa84d0743cb2a83d" ResourceName="UI/UIForms" />
|
||||
<Asset Guid="0a65a68c01a76ea4b8b574827a6467aa" ResourceName="UI/UISprites/Common" />
|
||||
<Asset Guid="0ed73dc47f4cb38489020d05e9f02c99" ResourceName="Materials" />
|
||||
<Asset Guid="0f995b3145e0e7247a42da6cef1dbf23" ResourceName="Materials" />
|
||||
<Asset Guid="1053b0070685be347ab58587156842dc" ResourceName="Localization/Dictionaries" ResourceVariant="zh-tw" />
|
||||
<Asset Guid="11e27c26ac87b40f0a62ec40d7261989" ResourceName="Entities" />
|
||||
<Asset Guid="1478894bc9a1ed241b05b0862a7b8bce" ResourceName="Textures" />
|
||||
<Asset Guid="14869ac0d4433f04db1704e39d03412e" ResourceName="Localization/Dictionaries" ResourceVariant="en-us" />
|
||||
<Asset Guid="0bbb3a6d1e6bb8b4a9b4d8f0510d9c63" ResourceName="UI/UIItems" />
|
||||
<Asset Guid="156d241f796508c4da4fc354a7fbf5a8" ResourceName="UI/UISprites/Common" />
|
||||
<Asset Guid="160925a6fe2664f2a978566b819f0af0" ResourceName="Entities" />
|
||||
<Asset Guid="185f97f18bd603a478461ce9c08bd039" ResourceName="Materials" />
|
||||
<Asset Guid="1b4bad6cea5a94611b21f9757fe41444" ResourceName="Materials" />
|
||||
<Asset Guid="1be4472894949437694aead55c6da60f" ResourceName="Sounds" />
|
||||
<Asset Guid="1c89236d45255234ebd1d39657ff7e02" ResourceName="Textures" />
|
||||
<Asset Guid="1cfe02ffd0b74854ea5bcd1a3c63ac3c" ResourceName="Materials" />
|
||||
<Asset Guid="1d46a17a95a444c08830612bc1146d1d" ResourceName="Materials" />
|
||||
<Asset Guid="1e0350b97c61bfb4a91c62d756d01727" ResourceName="Materials" />
|
||||
<Asset Guid="236433a27ce40a7429b87d14d8fa3035" ResourceName="UI/UISprites/Common" />
|
||||
<Asset Guid="239366f83979ffa48a45dac2f0f1e8cb" ResourceName="DataTables" />
|
||||
<Asset Guid="24ca310f92a6796408f1db7647ec4e55" ResourceName="UI/UISprites/Common" />
|
||||
<Asset Guid="2768a9a4c8d289840918dcb879705893" ResourceName="Meshes" />
|
||||
<Asset Guid="2cb5eef4d7d7bf6459dd13a3f8d90246" ResourceName="Textures" />
|
||||
<Asset Guid="315e8ed2db27c254cb3366ff0793cd90" ResourceName="DataTables" />
|
||||
<Asset Guid="3455fe69f7ddc4604b95bf9b0a1e88d7" ResourceName="Entities" />
|
||||
<Asset Guid="352da872791696c48af3b21132e3e3c3" ResourceName="DataTables" />
|
||||
<Asset Guid="372a8b1e52bedc64b9207b12d167afaa" ResourceName="DataTables" />
|
||||
<Asset Guid="3aa539b1e46111d4299a83c73ebe762c" ResourceName="UI/UIForms" />
|
||||
<Asset Guid="378604b840f56ae49831978cf0e0a6ea" ResourceName="DataTables" />
|
||||
<Asset Guid="3b1611489367200459a07da915578b6a" ResourceName="SceneSettings" />
|
||||
<Asset Guid="3be3fac3611f4584695662c4889f722d" ResourceName="UI/UISprites/Common" />
|
||||
<Asset Guid="3dc7455402dfa462b89a4bbd513955e9" ResourceName="Sounds" />
|
||||
<Asset Guid="3e504a46a8fcec34db3c4776530c6eb2" ResourceName="Textures" />
|
||||
<Asset Guid="3f54fcfdac53aec42ae18a6a1c6d8cb1" ResourceName="UI/UISprites/Common" />
|
||||
<Asset Guid="4473d81b14ddb0143addf0e6050d8491" ResourceName="Scenes" />
|
||||
<Asset Guid="44c8db52241385c45bbb14a1718f17bf" ResourceName="Configs" />
|
||||
<Asset Guid="4a17d2c656f5c6b44a31e3ee547a76b0" ResourceName="DataTables" />
|
||||
<Asset Guid="4c3865b2ac420cd46a9cde6ab468d016" ResourceName="Materials" />
|
||||
<Asset Guid="4db6a299939bfe94893585eb387f577a" ResourceName="DataTables" />
|
||||
<Asset Guid="4f688097e85071841a2c3ba165000c20" ResourceName="Textures" />
|
||||
<Asset Guid="5282f20eba4d44213820e21af8481932" ResourceName="Meshes" />
|
||||
<Asset Guid="42fee552f83943645beb47cf7093927a" ResourceName="DataTables" />
|
||||
<Asset Guid="56b8df63bbad60749a69e38bc687fadf" ResourceName="UI/UISprites/Common" />
|
||||
<Asset Guid="578af1667322bab45b652b79a40bb4fb" ResourceName="Materials" />
|
||||
<Asset Guid="583ff7026dac91849b7c7b2468ba456b" ResourceName="Materials" />
|
||||
<Asset Guid="5dcd89912e222bf4c87f76db4044bc5e" ResourceName="Localization/Dictionaries" ResourceVariant="ko-kr" />
|
||||
<Asset Guid="59ac12de6091b7741bc2819cf790146f" ResourceName="UI/UIForms" />
|
||||
<Asset Guid="5ae1171af6ab9b646b7a915598c657f1" ResourceName="Scenes" />
|
||||
<Asset Guid="62af9e5c8f39cfa49af9e10ccf42f1da" ResourceName="UI/UISprites/Common" />
|
||||
<Asset Guid="638ff8ae4a0d15047839cd265d3bc296" ResourceName="Music/Background" />
|
||||
<Asset Guid="63fe6ff9ab9e1433f8db4ebd940f2442" ResourceName="Materials" />
|
||||
<Asset Guid="64f3bb52c6a54854688fcc656af2b1c9" ResourceName="DataTables" />
|
||||
<Asset Guid="639c98846a76d624cbac99ade4a1e1a3" ResourceName="Scenes" />
|
||||
<Asset Guid="66fa61c3dfce3444fb3239ac93e6e75d" ResourceName="UI/UIForms" />
|
||||
<Asset Guid="68d252316715f9f4fbb327802325e2e2" ResourceName="UI/UIItems" />
|
||||
<Asset Guid="6cbc2c323b77f804fb958fa4eca33998" ResourceName="UI/UISprites/Common" />
|
||||
<Asset Guid="6d9b42ac01f24bf4d98923573f103575" ResourceName="Textures" />
|
||||
<Asset Guid="6db0c8354d868834abf29840037591b1" ResourceName="Textures" />
|
||||
<Asset Guid="6e023ca4283b3a7469cd61d24c83048c" ResourceName="Textures" />
|
||||
<Asset Guid="6e3730451fa077346abd4ac642ea71d8" ResourceName="Textures" />
|
||||
<Asset Guid="6e5d026bf0652ed4380f6a66f4aa26c5" ResourceName="Textures" />
|
||||
<Asset Guid="71646ebaae78d43aeb8b53cacdb69671" ResourceName="Textures" />
|
||||
<Asset Guid="72e76810224064300b7d32e8322a5d12" ResourceName="Sounds" />
|
||||
<Asset Guid="738bdf56857a65f479c367c7b62c4ad7" ResourceName="Entities" />
|
||||
<Asset Guid="75da5a4ba56425747be081b9b396ba4e" ResourceName="UI/UIForms" />
|
||||
<Asset Guid="77cbb7c5404c10242ab59953e0746314" ResourceName="Fonts" />
|
||||
<Asset Guid="7d5f7699d6d1d48e485ac71126e12061" ResourceName="Entities" />
|
||||
<Asset Guid="7e91cd9bad7babf4b975882a4b7453cb" ResourceName="Textures" />
|
||||
<Asset Guid="7eae0d2701845a54aa570b07c55dab44" ResourceName="Textures" />
|
||||
<Asset Guid="788b17ff3aef4cd4fb6c808826c875e5" ResourceName="DataTables" />
|
||||
<Asset Guid="7f5aee8da226edf4991598327cb32ce0" ResourceName="UI/UISprites/Logos" />
|
||||
<Asset Guid="7fd11dc5d29076d469d414dec2818f11" ResourceName="Configs" />
|
||||
<Asset Guid="834bfaee90a9d4e04b1e8c1ca22cc88e" ResourceName="Entities" />
|
||||
<Asset Guid="836be25be3e1e8c41ae5545bc8a9a4d7" ResourceName="Textures" />
|
||||
<Asset Guid="8940b037a9b441c4cbd3d2b446838424" ResourceName="Materials" />
|
||||
<Asset Guid="8b1acacd22538f34cb85287a0781ea5e" ResourceName="DataTables" />
|
||||
<Asset Guid="8cf749fdfa5edc3478d16893efeaa0eb" ResourceName="Entities" />
|
||||
<Asset Guid="8e114ded6a865324588170636872943c" ResourceName="DataTables" />
|
||||
<Asset Guid="8e27380ee68aa4a219b4db9018e7da31" ResourceName="Materials" />
|
||||
<Asset Guid="9143e2b62ad50488482f9b73672fc331" ResourceName="Entities" />
|
||||
<Asset Guid="955000b4d1441470e8cbf94f483228b5" ResourceName="Materials" />
|
||||
<Asset Guid="97b1f8b25cca2bc458cb9d6127c8d186" ResourceName="Materials" />
|
||||
<Asset Guid="97d117308cf86924289e81e7e71dd5dd" ResourceName="DataTables" />
|
||||
<Asset Guid="9afa958d6d8235941b9badb42aae4370" ResourceName="Meshes" />
|
||||
<Asset Guid="9b433f0bb7fef6f4085c316a0d88c307" ResourceName="DataTables" />
|
||||
<Asset Guid="9be2e1e45f4edd74c8764538ad306b78" ResourceName="Localization/Dictionaries" ResourceVariant="zh-cn" />
|
||||
<Asset Guid="9c3961f379234354e813d7b38146424d" ResourceName="DataTables" />
|
||||
<Asset Guid="9c3faac13c8ced84a9f3018303b7bb98" ResourceName="DataTables" />
|
||||
<Asset Guid="9ddab293e2a8af3499dac05f5fd6169c" ResourceName="Meshes" />
|
||||
<Asset Guid="7f72e35a938b99d478b47012eacff084" ResourceName="UI/UIItems" />
|
||||
<Asset Guid="87ba2cae099325c4bb0121cd8df50f43" ResourceName="DataTables" />
|
||||
<Asset Guid="99d811b0183246646a2ce8df996f4bca" ResourceName="Fonts" />
|
||||
<Asset Guid="9f847ec5e66e03e4ead1d3c5f7b510e8" ResourceName="UI/UISprites/Common" />
|
||||
<Asset Guid="a019ae3af8e864616b85773c509f5285" ResourceName="Sounds" />
|
||||
<Asset Guid="a23eef5e20ff8cb46adf33491fc443fb" ResourceName="Materials" />
|
||||
<Asset Guid="a33e23ae848110243820cda82120b105" ResourceName="DataTables" />
|
||||
<Asset Guid="a6d58f54ce5934781962a4f887e834f3" ResourceName="Entities" />
|
||||
<Asset Guid="a71f8bb1b1b2c51438e2bafc884cb02c" ResourceName="DataTables" />
|
||||
<Asset Guid="a7b030cffa2dc44478c14e49a22771c2" ResourceName="Materials" />
|
||||
<Asset Guid="a8c07bbe04fdaf04b80e27f651a8edd6" ResourceName="UI/UISprites/Common" />
|
||||
<Asset Guid="ab45c3f613f388d43bbf43ec05eb92e2" ResourceName="UI/UISprites/Common" />
|
||||
<Asset Guid="ab4774faf71b57a40a29a9e902403fe3" ResourceName="DataTables" />
|
||||
<Asset Guid="abd1565e9e268f04cac3631d022b4ace" ResourceName="Entities" />
|
||||
<Asset Guid="ad56aae2bb0f2ce4a86711287e14e223" ResourceName="DataTables" />
|
||||
<Asset Guid="ae6a7f967521769458b0913fa39caaf4" ResourceName="Textures" />
|
||||
<Asset Guid="afc18fc39ade3744397c0c993b57be53" ResourceName="Entities" />
|
||||
<Asset Guid="b031b4f2980561542a7f7ba41391edc3" ResourceName="Scenes" />
|
||||
<Asset Guid="b0c7cf51d3fecb446ab93bf854419715" ResourceName="Materials" />
|
||||
<Asset Guid="b2cebe04343227945bab3729ca9a3493" ResourceName="DataTables" />
|
||||
<Asset Guid="ba157ba55f72c424a9e88f3c029997c4" ResourceName="Textures" />
|
||||
<Asset Guid="baedbbad82997f445a8cb4da210404e0" ResourceName="Meshes" />
|
||||
<Asset Guid="bbfd75fe6fe00e1448fe988173ede7f9" ResourceName="UI/UIForms" />
|
||||
<Asset Guid="bf75b984df8a84987bcf3a8bf6e2862d" ResourceName="Sounds" />
|
||||
<Asset Guid="c547624e174de984882f0a14b4bb32e1" ResourceName="Materials" />
|
||||
<Asset Guid="c58c9afddbd36d14d837fa218d772996" ResourceName="Materials" />
|
||||
<Asset Guid="c7d1e11dd37634b48a9dd4012b8e4306" ResourceName="UI/UISounds" />
|
||||
<Asset Guid="caa829ab2ffc71340a69253afdf58365" ResourceName="Music/Menu" />
|
||||
<Asset Guid="cadd0764941c8b646ae79b51d0ea8285" ResourceName="UI/UISprites/Common" />
|
||||
<Asset Guid="cccff1c0cc661424294ed55e531c767b" ResourceName="UI/UIForms" />
|
||||
<Asset Guid="cfe53cf384344bd47a8680f8c5f97a7b" ResourceName="DataTables" />
|
||||
<Asset Guid="d9808401c68af274a8edfbed3d1b53c7" ResourceName="Meshes" />
|
||||
<Asset Guid="db58965402f12ed47b4dad61a9e48c9d" ResourceName="UI/UISprites/Icons" />
|
||||
<Asset Guid="e0792649e7774a24d8e7cceba0231c61" ResourceName="DataTables" />
|
||||
<Asset Guid="dde468eff36cc784fa023279ae4d4d33" ResourceName="SceneSettings" />
|
||||
<Asset Guid="e5ca26c53b6ab8a46b52817008d7c7fa" ResourceName="UI/UISprites/Icons" />
|
||||
<Asset Guid="e82837c9099f69a48b48fc44eb8d119d" ResourceName="UI/UISprites/Common" />
|
||||
<Asset Guid="e830964cdb85ff3429bca484c16bab44" ResourceName="UI/UISounds" />
|
||||
<Asset Guid="e85864330b68dde498dcb6e8711815d3" ResourceName="UI/UISprites/Common" />
|
||||
<Asset Guid="eabb37cb6d738b443b398b701a64cd88" ResourceName="Textures" />
|
||||
<Asset Guid="f2f4df0b7211e4c42a5638273525d8ee" ResourceName="UI/UISprites/Common" />
|
||||
<Asset Guid="f2f97a713beae744181ba934f9c4113a" ResourceName="DataTables" />
|
||||
<Asset Guid="f36c72c738c55f741afcd674a0b1245f" ResourceName="Materials" />
|
||||
<Asset Guid="f438a72a91e1c3c4a9ced40888ffec96" ResourceName="UI/UISprites/Icons" />
|
||||
<Asset Guid="f4ec271e525e14ca9927a07e6a2e153d" ResourceName="Entities" />
|
||||
<Asset Guid="f6db5bbdfe0e9894798706814cd6b336" ResourceName="Textures" />
|
||||
<Asset Guid="fd3cbf51780694849b9b019b36a3938e" ResourceName="Textures" />
|
||||
<Asset Guid="fdb5edd099d06b045af609ba3172400a" ResourceName="DataTables" />
|
||||
<Asset Guid="fedd25a3c60e7ae499fc6efab9ee180b" ResourceName="Entities" />
|
||||
</Assets>
|
||||
</ResourceCollection>
|
||||
</UnityGameFramework>
|
||||
@@ -1,7 +0,0 @@
|
||||
# 音乐配置表
|
||||
# Id AssetName
|
||||
# int string
|
||||
# 音乐编号 策划备注 资源名称
|
||||
1 菜单音乐 music_menu
|
||||
2 战斗音乐 music_background
|
||||
3 关于音乐 music_about
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 315e8ed2db27c254cb3366ff0793cd90
|
||||
timeCreated: 1528026124
|
||||
licenseType: Pro
|
||||
TextScriptImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,9 +0,0 @@
|
||||
# 声音配置表
|
||||
# Id AssetName Priority Loop Volume SpatialBlend MaxDistance
|
||||
# int string int bool float float float
|
||||
# 声音编号 策划备注 资源名称 优先级(默认0,128最高,-128最低) 是否循环 音量(0~1) 声音空间混合量(0为2D,1为3D,中间值混合效果) 声音最大距离
|
||||
10000 玩家子弹 weapon_player 0 False 1 0 100
|
||||
10001 敌人子弹 weapon_enemy 0 False 1 0 100
|
||||
20000 玩家爆炸 explosion_player 0 False 1 0 100
|
||||
20001 敌人爆炸 explosion_enemy 0 False 1 0 100
|
||||
20002 小行星爆炸 explosion_asteroid 0 False 1 0 100
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 372a8b1e52bedc64b9207b12d167afaa
|
||||
timeCreated: 1528026124
|
||||
licenseType: Pro
|
||||
TextScriptImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -2,7 +2,7 @@
|
||||
# Id AssetName UIGroupName AllowMultiInstance PauseCoveredUIForm
|
||||
# int string string bool bool
|
||||
# 界面编号 策划备注 资源名称 界面组名称 是否允许多个界面实例 是否暂停被其覆盖的界面
|
||||
1 弹出框 DialogForm Default True True
|
||||
1 弹出框 DialogForm Dialog True True
|
||||
100 主菜单 MenuForm Default False True
|
||||
101 设置 SettingForm Default False True
|
||||
102 关于 AboutForm Default False True
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
# 声音配置表
|
||||
# Id AssetName Priority Volume
|
||||
# int string int float
|
||||
# 声音编号 策划备注 资源名称 优先级(默认0,128最高,-128最低) 音量(0~1)
|
||||
10000 选择音效 select 0 1
|
||||
10001 点击音效 click 0 1
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f2f97a713beae744181ba934f9c4113a
|
||||
timeCreated: 1528026124
|
||||
licenseType: Pro
|
||||
TextScriptImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
+2
-15
@@ -1,17 +1,4 @@
|
||||
//------------------------------------------------------------
|
||||
// Game Framework
|
||||
// Copyright © 2013-2021 Jiang Yin. All rights reserved.
|
||||
// Homepage: https://gameframework.cn/
|
||||
// Feedback: mailto:ellan@gameframework.cn
|
||||
//------------------------------------------------------------
|
||||
// 此文件由工具自动生成,请勿直接修改。
|
||||
// 生成时间:2021-06-16 21:54:35.591
|
||||
//------------------------------------------------------------
|
||||
|
||||
using GameFramework;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using UnityEngine;
|
||||
using UnityGameFramework.Runtime;
|
||||
@@ -21,7 +8,7 @@ namespace DataTable
|
||||
/// <summary>
|
||||
/// 音乐配置表。
|
||||
/// </summary>
|
||||
public class DRMusic : DataRowBase
|
||||
public class DRBGM : DataRowBase
|
||||
{
|
||||
private int m_Id = 0;
|
||||
|
||||
+2
-5
@@ -1,7 +1,4 @@
|
||||
using GameFramework;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using UnityEngine;
|
||||
using UnityGameFramework.Runtime;
|
||||
@@ -11,7 +8,7 @@ namespace DataTable
|
||||
/// <summary>
|
||||
/// 声音配置表。
|
||||
/// </summary>
|
||||
public class DRUISound : DataRowBase
|
||||
public class DRSE : DataRowBase
|
||||
{
|
||||
private int m_Id = 0;
|
||||
|
||||
@@ -1,127 +0,0 @@
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using UnityGameFramework.Runtime;
|
||||
|
||||
namespace DataTable
|
||||
{
|
||||
/// <summary>
|
||||
/// 声音配置表。
|
||||
/// </summary>
|
||||
public class DRSound : DataRowBase
|
||||
{
|
||||
private int m_Id = 0;
|
||||
|
||||
/// <summary>
|
||||
/// 获取声音编号。
|
||||
/// </summary>
|
||||
public override int Id
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Id;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取资源名称。
|
||||
/// </summary>
|
||||
public string AssetName
|
||||
{
|
||||
get;
|
||||
private set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取优先级(默认0,128最高,-128最低)。
|
||||
/// </summary>
|
||||
public int Priority
|
||||
{
|
||||
get;
|
||||
private set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取是否循环。
|
||||
/// </summary>
|
||||
public bool Loop
|
||||
{
|
||||
get;
|
||||
private set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取音量(0~1)。
|
||||
/// </summary>
|
||||
public float Volume
|
||||
{
|
||||
get;
|
||||
private set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取声音空间混合量(0为2D,1为3D,中间值混合效果)。
|
||||
/// </summary>
|
||||
public float SpatialBlend
|
||||
{
|
||||
get;
|
||||
private set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取声音最大距离。
|
||||
/// </summary>
|
||||
public float MaxDistance
|
||||
{
|
||||
get;
|
||||
private set;
|
||||
}
|
||||
|
||||
public override bool ParseDataRow(string dataRowString, object userData)
|
||||
{
|
||||
string[] columnStrings = dataRowString.Split(DataTableExtension.DataSplitSeparators);
|
||||
for (int i = 0; i < columnStrings.Length; i++)
|
||||
{
|
||||
columnStrings[i] = columnStrings[i].Trim(DataTableExtension.DataTrimSeparators);
|
||||
}
|
||||
|
||||
int index = 0;
|
||||
index++;
|
||||
m_Id = int.Parse(columnStrings[index++]);
|
||||
index++;
|
||||
AssetName = columnStrings[index++];
|
||||
Priority = int.Parse(columnStrings[index++]);
|
||||
Loop = bool.Parse(columnStrings[index++]);
|
||||
Volume = float.Parse(columnStrings[index++]);
|
||||
SpatialBlend = float.Parse(columnStrings[index++]);
|
||||
MaxDistance = float.Parse(columnStrings[index++]);
|
||||
|
||||
GeneratePropertyArray();
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool ParseDataRow(byte[] dataRowBytes, int startIndex, int length, object userData)
|
||||
{
|
||||
using (MemoryStream memoryStream = new MemoryStream(dataRowBytes, startIndex, length, false))
|
||||
{
|
||||
using (BinaryReader binaryReader = new BinaryReader(memoryStream, Encoding.UTF8))
|
||||
{
|
||||
m_Id = binaryReader.Read7BitEncodedInt32();
|
||||
AssetName = binaryReader.ReadString();
|
||||
Priority = binaryReader.Read7BitEncodedInt32();
|
||||
Loop = binaryReader.ReadBoolean();
|
||||
Volume = binaryReader.ReadSingle();
|
||||
SpatialBlend = binaryReader.ReadSingle();
|
||||
MaxDistance = binaryReader.ReadSingle();
|
||||
}
|
||||
}
|
||||
|
||||
GeneratePropertyArray();
|
||||
return true;
|
||||
}
|
||||
|
||||
private void GeneratePropertyArray()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fc0abcc42a26c844d91d422da22eb94d
|
||||
timeCreated: 1528026147
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,9 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5479812568543994bbbcdbee6c42fce1
|
||||
folderAsset: yes
|
||||
timeCreated: 1528026148
|
||||
licenseType: Pro
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,86 +0,0 @@
|
||||
//------------------------------------------------------------
|
||||
// Game Framework
|
||||
// Copyright © 2013-2021 Jiang Yin. All rights reserved.
|
||||
// Homepage: https://gameframework.cn/
|
||||
// Feedback: mailto:ellan@gameframework.cn
|
||||
//------------------------------------------------------------
|
||||
|
||||
using Definition;
|
||||
using GameFramework.Debugger;
|
||||
using GameFramework.Localization;
|
||||
using UnityEngine;
|
||||
using UnityGameFramework.Runtime;
|
||||
|
||||
namespace StarForce
|
||||
{
|
||||
public class ChangeLanguageDebuggerWindow : IDebuggerWindow
|
||||
{
|
||||
private Vector2 m_ScrollPosition = Vector2.zero;
|
||||
private bool m_NeedRestart = false;
|
||||
|
||||
public void Initialize(params object[] args)
|
||||
{
|
||||
}
|
||||
|
||||
public void Shutdown()
|
||||
{
|
||||
}
|
||||
|
||||
public void OnEnter()
|
||||
{
|
||||
}
|
||||
|
||||
public void OnLeave()
|
||||
{
|
||||
}
|
||||
|
||||
public void OnUpdate(float elapseSeconds, float realElapseSeconds)
|
||||
{
|
||||
if (m_NeedRestart)
|
||||
{
|
||||
m_NeedRestart = false;
|
||||
UnityGameFramework.Runtime.GameEntry.Shutdown(ShutdownType.Restart);
|
||||
}
|
||||
}
|
||||
|
||||
public void OnDraw()
|
||||
{
|
||||
m_ScrollPosition = GUILayout.BeginScrollView(m_ScrollPosition);
|
||||
{
|
||||
DrawSectionChangeLanguage();
|
||||
}
|
||||
GUILayout.EndScrollView();
|
||||
}
|
||||
|
||||
private void DrawSectionChangeLanguage()
|
||||
{
|
||||
GUILayout.Label("<b>Change Language</b>");
|
||||
GUILayout.BeginHorizontal("box");
|
||||
{
|
||||
if (GUILayout.Button("Chinese Simplified", GUILayout.Height(30)))
|
||||
{
|
||||
GameEntry.Localization.Language = Language.ChineseSimplified;
|
||||
SaveLanguage();
|
||||
}
|
||||
if (GUILayout.Button("Chinese Traditional", GUILayout.Height(30)))
|
||||
{
|
||||
GameEntry.Localization.Language = Language.ChineseTraditional;
|
||||
SaveLanguage();
|
||||
}
|
||||
if (GUILayout.Button("English", GUILayout.Height(30)))
|
||||
{
|
||||
GameEntry.Localization.Language = Language.English;
|
||||
SaveLanguage();
|
||||
}
|
||||
}
|
||||
GUILayout.EndHorizontal();
|
||||
}
|
||||
|
||||
private void SaveLanguage()
|
||||
{
|
||||
GameEntry.Setting.SetString(Constant.Setting.Language, GameEntry.Localization.Language.ToString());
|
||||
GameEntry.Setting.Save();
|
||||
m_NeedRestart = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 278a7992e66d1ea4081597614f912f3d
|
||||
timeCreated: 1528026148
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -11,15 +11,18 @@ namespace Definition
|
||||
{
|
||||
public static class Setting
|
||||
{
|
||||
public const string Language = "Setting.Language";
|
||||
public const string SoundGroupMuted = "Setting.{0}Muted";
|
||||
public const string SoundGroupVolume = "Setting.{0}Volume";
|
||||
public const string MusicMuted = "Setting.MusicMuted";
|
||||
public const string MusicVolume = "Setting.MusicVolume";
|
||||
public const string SoundMuted = "Setting.SoundMuted";
|
||||
public const string SoundVolume = "Setting.SoundVolume";
|
||||
public const string UISoundMuted = "Setting.UISoundMuted";
|
||||
public const string UISoundVolume = "Setting.UISoundVolume";
|
||||
public const string BGMVolume = "Setting.BGMVolume";
|
||||
public const string SEVolume = "Setting.SEVolume";
|
||||
|
||||
public const string AllowShake = "Setting.AllowShake";
|
||||
public const string AllowBlink = "Setting.AllowBlink";
|
||||
public const string DialogWindowAlpha = "Setting.DialogWindowAlpha";
|
||||
public const string DialogPlayingSpeed = "Setting.PlayingSpeed";
|
||||
|
||||
public const string ScreenSolution = "Setting.ScreenSolution";
|
||||
public const string ScreenWindow = "Setting.ScreenWindow";
|
||||
public const string VSync = "Setting.VSync";
|
||||
public const string AntiAliasing = "Setting.AntiAliasing";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace Definition.DataStruct
|
||||
/// <summary>
|
||||
/// 对话播放速度
|
||||
/// </summary>
|
||||
public DialogPlayingSpeed PlayingSpeed { get; set; }
|
||||
public DialogPlayingSpeed DialogPlayingSpeed { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace Definition.DataStruct
|
||||
/// <summary>
|
||||
/// 屏幕分辨率
|
||||
/// </summary>
|
||||
public ScreenSolutionType ScreenSolution { get; set; }
|
||||
public ScreenResolutionType ScreenResolution { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 屏幕窗口模式
|
||||
|
||||
@@ -15,14 +15,20 @@ namespace Definition.Enum
|
||||
High
|
||||
}
|
||||
|
||||
public enum ScreenSolutionType : byte
|
||||
public enum ScreenResolutionType : byte
|
||||
{
|
||||
_1280x720,
|
||||
_1366x768,
|
||||
_1600x900,
|
||||
_1920x1080,
|
||||
_2560x1440,
|
||||
_2560x1600
|
||||
}
|
||||
|
||||
public enum ScreenWindowType : byte
|
||||
{
|
||||
NoneBoard,
|
||||
Window,
|
||||
FullScreen
|
||||
Borderless,
|
||||
FullScreen,
|
||||
Windowed,
|
||||
}
|
||||
}
|
||||
@@ -11,7 +11,7 @@ namespace Event
|
||||
public override int Id => EventId;
|
||||
|
||||
|
||||
public GameSetting? GameSettings;
|
||||
public GameSetting GameSettings;
|
||||
|
||||
public SettingSaveEventArgs()
|
||||
{
|
||||
@@ -26,7 +26,7 @@ namespace Event
|
||||
|
||||
public override void Clear()
|
||||
{
|
||||
GameSettings = null;
|
||||
GameSettings = new GameSetting();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,7 +4,7 @@ using Definition;
|
||||
using Definition.Enum;
|
||||
using GameFramework.DataTable;
|
||||
using GameFramework.Event;
|
||||
using StarForce;
|
||||
using Sound;
|
||||
using UnityGameFramework.Runtime;
|
||||
using ProcedureOwner = GameFramework.Fsm.IFsm<GameFramework.Procedure.IProcedureManager>;
|
||||
|
||||
@@ -57,7 +57,8 @@ namespace Procedure
|
||||
return;
|
||||
}
|
||||
|
||||
GameEntry.Scene.LoadScene(AssetUtility.GetSceneAsset(drScene.AssetName), Constant.AssetPriority.SceneAsset, this);
|
||||
GameEntry.Scene.LoadScene(AssetUtility.GetSceneAsset(drScene.AssetName), Constant.AssetPriority.SceneAsset,
|
||||
this);
|
||||
_backgroundMusicId = drScene.BackgroundMusicId;
|
||||
}
|
||||
|
||||
@@ -83,6 +84,9 @@ namespace Procedure
|
||||
SceneId sceneId = (SceneId)_nextSceneId;
|
||||
switch (sceneId)
|
||||
{
|
||||
case SceneId.Menu:
|
||||
ChangeState<ProcedureMenu>(procedureOwner);
|
||||
break;
|
||||
case SceneId.GameplayA:
|
||||
ChangeState<ProcedureCombine>(procedureOwner);
|
||||
break;
|
||||
@@ -105,7 +109,7 @@ namespace Procedure
|
||||
|
||||
if (_backgroundMusicId > 0)
|
||||
{
|
||||
GameEntry.Sound.PlayMusic(_backgroundMusicId);
|
||||
GameEntry.Sound.PlayBGM(_backgroundMusicId);
|
||||
}
|
||||
|
||||
_isChangeSceneComplete = true;
|
||||
@@ -141,7 +145,8 @@ namespace Procedure
|
||||
return;
|
||||
}
|
||||
|
||||
Log.Info("Load scene '{0}' dependency asset '{1}', count '{2}/{3}'.", ne.SceneAssetName, ne.DependencyAssetName, ne.LoadedCount.ToString(), ne.TotalCount.ToString());
|
||||
Log.Info("Load scene '{0}' dependency asset '{1}', count '{2}/{3}'.", ne.SceneAssetName,
|
||||
ne.DependencyAssetName, ne.LoadedCount.ToString(), ne.TotalCount.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,5 @@
|
||||
using GameFramework.Localization;
|
||||
using System;
|
||||
using Definition;
|
||||
using StarForce;
|
||||
using Definition;
|
||||
using Sound;
|
||||
using UnityGameFramework.Runtime;
|
||||
using ProcedureOwner = GameFramework.Fsm.IFsm<GameFramework.Procedure.IProcedureManager>;
|
||||
|
||||
@@ -17,19 +15,10 @@ namespace Procedure
|
||||
|
||||
// 构建信息:发布版本时,把一些数据以 Json 的格式写入 Assets/GameMain/Configs/BuildInfo.txt,供游戏逻辑读取
|
||||
GameEntry.BuiltinData.InitBuildInfo();
|
||||
|
||||
// 语言配置:设置当前使用的语言,如果不设置,则默认使用操作系统语言
|
||||
InitLanguageSettings();
|
||||
|
||||
// 变体配置:根据使用的语言,通知底层加载对应的资源变体
|
||||
InitCurrentVariant();
|
||||
|
||||
// 声音配置:根据用户配置数据,设置即将使用的声音选项
|
||||
InitSoundSettings();
|
||||
|
||||
|
||||
// 默认字典:加载默认字典文件 Assets/GameMain/Configs/DefaultDictionary.xml
|
||||
// 此字典文件记录了资源更新前使用的各种语言的字符串,会随 App 一起发布,故不可更新
|
||||
GameEntry.BuiltinData.InitDefaultDictionary();
|
||||
// GameEntry.BuiltinData.InitDefaultDictionary();
|
||||
}
|
||||
|
||||
protected override void OnUpdate(ProcedureOwner procedureOwner, float elapseSeconds, float realElapseSeconds)
|
||||
@@ -39,89 +28,5 @@ namespace Procedure
|
||||
// 运行一帧即切换到 Splash 展示流程
|
||||
ChangeState<ProcedureSplash>(procedureOwner);
|
||||
}
|
||||
|
||||
private void InitLanguageSettings()
|
||||
{
|
||||
if (GameEntry.Base.EditorResourceMode && GameEntry.Base.EditorLanguage != Language.Unspecified)
|
||||
{
|
||||
// 编辑器资源模式直接使用 Inspector 上设置的语言
|
||||
return;
|
||||
}
|
||||
|
||||
Language language = GameEntry.Localization.Language;
|
||||
if (GameEntry.Setting.HasSetting(Constant.Setting.Language))
|
||||
{
|
||||
try
|
||||
{
|
||||
string languageString = GameEntry.Setting.GetString(Constant.Setting.Language);
|
||||
language = (Language)Enum.Parse(typeof(Language), languageString);
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
if (language != Language.English
|
||||
&& language != Language.ChineseSimplified
|
||||
&& language != Language.ChineseTraditional
|
||||
&& language != Language.Korean)
|
||||
{
|
||||
// 若是暂不支持的语言,则使用英语
|
||||
language = Language.English;
|
||||
|
||||
GameEntry.Setting.SetString(Constant.Setting.Language, language.ToString());
|
||||
GameEntry.Setting.Save();
|
||||
}
|
||||
|
||||
GameEntry.Localization.Language = language;
|
||||
Log.Info("Init language settings complete, current language is '{0}'.", language.ToString());
|
||||
}
|
||||
|
||||
private void InitCurrentVariant()
|
||||
{
|
||||
if (GameEntry.Base.EditorResourceMode)
|
||||
{
|
||||
// 编辑器资源模式不使用 AssetBundle,也就没有变体了
|
||||
return;
|
||||
}
|
||||
|
||||
string currentVariant = null;
|
||||
switch (GameEntry.Localization.Language)
|
||||
{
|
||||
case Language.English:
|
||||
currentVariant = "en-us";
|
||||
break;
|
||||
|
||||
case Language.ChineseSimplified:
|
||||
currentVariant = "zh-cn";
|
||||
break;
|
||||
|
||||
case Language.ChineseTraditional:
|
||||
currentVariant = "zh-tw";
|
||||
break;
|
||||
|
||||
case Language.Korean:
|
||||
currentVariant = "ko-kr";
|
||||
break;
|
||||
|
||||
default:
|
||||
currentVariant = "zh-cn";
|
||||
break;
|
||||
}
|
||||
|
||||
GameEntry.Resource.SetCurrentVariant(currentVariant);
|
||||
Log.Info("Init current variant complete.");
|
||||
}
|
||||
|
||||
private void InitSoundSettings()
|
||||
{
|
||||
GameEntry.Sound.Mute("Music", GameEntry.Setting.GetBool(Constant.Setting.MusicMuted, false));
|
||||
GameEntry.Sound.SetVolume("Music", GameEntry.Setting.GetFloat(Constant.Setting.MusicVolume, 0.3f));
|
||||
GameEntry.Sound.Mute("Sound", GameEntry.Setting.GetBool(Constant.Setting.SoundMuted, false));
|
||||
GameEntry.Sound.SetVolume("Sound", GameEntry.Setting.GetFloat(Constant.Setting.SoundVolume, 1f));
|
||||
GameEntry.Sound.Mute("UISound", GameEntry.Setting.GetBool(Constant.Setting.UISoundMuted, false));
|
||||
GameEntry.Sound.SetVolume("UISound", GameEntry.Setting.GetFloat(Constant.Setting.UISoundVolume, 1f));
|
||||
Log.Info("Init sound settings complete.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,14 +1,19 @@
|
||||
using GameFramework;
|
||||
using System;
|
||||
using GameFramework;
|
||||
using GameFramework.Event;
|
||||
using GameFramework.Resource;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using CustomUtility;
|
||||
using DataTable;
|
||||
using Definition;
|
||||
using Definition.Enum;
|
||||
using Setting;
|
||||
using Sound;
|
||||
using TMPro;
|
||||
using UI;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Rendering;
|
||||
using UnityGameFramework.Runtime;
|
||||
using ProcedureOwner = GameFramework.Fsm.IFsm<GameFramework.Procedure.IProcedureManager>;
|
||||
|
||||
@@ -19,11 +24,10 @@ namespace Procedure
|
||||
public static readonly string[] DataTableNames = new string[]
|
||||
{
|
||||
"Entity",
|
||||
"Music",
|
||||
"BGM",
|
||||
"Scene",
|
||||
"Sound",
|
||||
"UIForm",
|
||||
"UISound",
|
||||
"SE",
|
||||
"Dialog",
|
||||
"DialogLine"
|
||||
};
|
||||
@@ -72,15 +76,12 @@ namespace Procedure
|
||||
}
|
||||
}
|
||||
|
||||
procedureOwner.SetData<VarInt32>("NextSceneId", (int)SceneId.Main);
|
||||
procedureOwner.SetData<VarInt32>("NextSceneId", (int)SceneId.Menu);
|
||||
ChangeState<ProcedureChangeScene>(procedureOwner);
|
||||
}
|
||||
|
||||
private void PreloadResources()
|
||||
{
|
||||
// Preload configs
|
||||
LoadConfig("DefaultConfig");
|
||||
|
||||
// Preload data tables
|
||||
foreach (string dataTableName in DataTableNames)
|
||||
{
|
||||
@@ -88,18 +89,13 @@ namespace Procedure
|
||||
}
|
||||
|
||||
// Preload dictionaries
|
||||
LoadDictionary("Default");
|
||||
// LoadDictionary("Default");
|
||||
|
||||
// Preload fonts
|
||||
LoadFont("MainFont");
|
||||
LoadTMPFont("MainTMPFont");
|
||||
}
|
||||
|
||||
private void LoadConfig(string configName)
|
||||
{
|
||||
string configAssetName = AssetUtility.GetConfigAsset(configName, false);
|
||||
_loadedFlag.Add(configAssetName, false);
|
||||
GameEntry.Config.ReadData(configAssetName, this);
|
||||
LoadSetting();
|
||||
}
|
||||
|
||||
private void LoadDataTable(string dataTableName)
|
||||
@@ -152,6 +148,81 @@ namespace Procedure
|
||||
}));
|
||||
}
|
||||
|
||||
private void LoadSetting()
|
||||
{
|
||||
var setting = GameEntry.Setting.GetGameSetting();
|
||||
|
||||
GameEntry.Sound.SetVolume("BGM", setting.BGMVolume);
|
||||
GameEntry.Sound.SetVolume("SE", setting.SEVolume);
|
||||
|
||||
ScreenResolutionType resolution = setting.ScreenResolution;
|
||||
int width = 0, height = 0;
|
||||
switch (resolution)
|
||||
{
|
||||
case ScreenResolutionType._1280x720:
|
||||
width = 1280;
|
||||
height = 720;
|
||||
break;
|
||||
case ScreenResolutionType._1366x768:
|
||||
width = 1366;
|
||||
height = 768;
|
||||
break;
|
||||
case ScreenResolutionType._1600x900:
|
||||
width = 1600;
|
||||
height = 900;
|
||||
break;
|
||||
case ScreenResolutionType._1920x1080:
|
||||
width = 1920;
|
||||
height = 1080;
|
||||
break;
|
||||
case ScreenResolutionType._2560x1440:
|
||||
width = 2560;
|
||||
height = 1440;
|
||||
break;
|
||||
case ScreenResolutionType._2560x1600:
|
||||
width = 2560;
|
||||
height = 1600;
|
||||
break;
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
|
||||
ScreenWindowType resolutionWindow = setting.ScreenWindow;
|
||||
switch (resolutionWindow)
|
||||
{
|
||||
case ScreenWindowType.FullScreen:
|
||||
Screen.SetResolution(width, height, FullScreenMode.ExclusiveFullScreen);
|
||||
break;
|
||||
case ScreenWindowType.Borderless:
|
||||
Screen.SetResolution(width, height, FullScreenMode.FullScreenWindow);
|
||||
break;
|
||||
case ScreenWindowType.Windowed:
|
||||
Screen.SetResolution(width, height, FullScreenMode.Windowed);
|
||||
break;
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
|
||||
Application.targetFrameRate = -1;
|
||||
QualitySettings.vSyncCount = setting.VSync ? 1 : 0;
|
||||
if (setting.AntiAliasing)
|
||||
{
|
||||
foreach (var asset in GraphicsSettings.allConfiguredRenderPipelines)
|
||||
{
|
||||
if (asset.name == "URP-AntiAliasing") GraphicsSettings.renderPipelineAsset = asset;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (var asset in GraphicsSettings.allConfiguredRenderPipelines)
|
||||
{
|
||||
if (asset.name == "URP-Normal") GraphicsSettings.renderPipelineAsset = asset;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#region Event Hanlders
|
||||
|
||||
private void OnLoadConfigSuccess(object sender, GameEventArgs e)
|
||||
{
|
||||
LoadConfigSuccessEventArgs ne = (LoadConfigSuccessEventArgs)e;
|
||||
@@ -223,5 +294,7 @@ namespace Procedure
|
||||
Log.Error("Can not load dictionary '{0}' from '{1}' with error message '{2}'.", ne.DictionaryAssetName,
|
||||
ne.DictionaryAssetName, ne.ErrorMessage);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,15 @@
|
||||
using System;
|
||||
using Definition.DataStruct;
|
||||
using Definition.Enum;
|
||||
using Event;
|
||||
using GameFramework.Event;
|
||||
using GameFramework.Fsm;
|
||||
using GameFramework.Procedure;
|
||||
using Setting;
|
||||
using Sound;
|
||||
using UI;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Rendering;
|
||||
|
||||
|
||||
namespace Procedure
|
||||
@@ -11,18 +20,64 @@ namespace Procedure
|
||||
|
||||
private MenuFormController _menuFormController;
|
||||
|
||||
private SettingFormController _settingFormController;
|
||||
|
||||
private const string SettingPrefix = "Setting.";
|
||||
|
||||
private void StartGame()
|
||||
{
|
||||
}
|
||||
|
||||
private void LoadGame()
|
||||
{
|
||||
}
|
||||
|
||||
private void OpenSettingForm()
|
||||
{
|
||||
if (_settingFormController == null)
|
||||
{
|
||||
_settingFormController = new SettingFormController();
|
||||
}
|
||||
|
||||
var settingContext = new SettingFormContext
|
||||
{
|
||||
Setting = GameEntry.Setting.GetGameSetting()
|
||||
};
|
||||
_settingFormController.OpenUI(settingContext);
|
||||
}
|
||||
|
||||
private void ExitGame()
|
||||
{
|
||||
Application.Quit();
|
||||
}
|
||||
|
||||
#region FSM
|
||||
|
||||
protected override void OnEnter(IFsm<IProcedureManager> procedureOwner)
|
||||
{
|
||||
base.OnEnter(procedureOwner);
|
||||
|
||||
var e = GameEntry.Event;
|
||||
e.Subscribe(MenuStartEventArgs.EventId, MenuStart);
|
||||
e.Subscribe(MenuContinueEventArgs.EventId, MenuContinue);
|
||||
e.Subscribe(MenuSettingEventArgs.EventId, MenuSetting);
|
||||
e.Subscribe(MenuExitEventArgs.EventId, MenuExit);
|
||||
e.Subscribe(SettingSaveEventArgs.EventId, SettingSave);
|
||||
|
||||
|
||||
_menuFormController = new MenuFormController();
|
||||
_menuFormController.OpenUI(new MenuFormContext());
|
||||
}
|
||||
|
||||
protected override void OnLeave(IFsm<IProcedureManager> procedureOwner, bool isShutdown)
|
||||
{
|
||||
var e = GameEntry.Event;
|
||||
e.Unsubscribe(MenuStartEventArgs.EventId, MenuStart);
|
||||
e.Unsubscribe(MenuContinueEventArgs.EventId, MenuContinue);
|
||||
e.Unsubscribe(MenuSettingEventArgs.EventId, MenuSetting);
|
||||
e.Unsubscribe(MenuExitEventArgs.EventId, MenuExit);
|
||||
e.Unsubscribe(SettingSaveEventArgs.EventId, SettingSave);
|
||||
|
||||
base.OnLeave(procedureOwner, isShutdown);
|
||||
}
|
||||
|
||||
@@ -33,5 +88,107 @@ namespace Procedure
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Event Handlers
|
||||
|
||||
private void MenuStart(object sender, GameEventArgs e)
|
||||
{
|
||||
if (!(e is MenuStartEventArgs)) return;
|
||||
}
|
||||
|
||||
private void MenuContinue(object sender, GameEventArgs e)
|
||||
{
|
||||
if (!(e is MenuContinueEventArgs)) return;
|
||||
}
|
||||
|
||||
private void MenuSetting(object sender, GameEventArgs e)
|
||||
{
|
||||
if (!(e is MenuSettingEventArgs)) return;
|
||||
OpenSettingForm();
|
||||
}
|
||||
|
||||
private void MenuExit(object sender, GameEventArgs e)
|
||||
{
|
||||
if (!(e is MenuExitEventArgs)) return;
|
||||
ExitGame();
|
||||
}
|
||||
|
||||
private void SettingSave(object sender, GameEventArgs e)
|
||||
{
|
||||
if (!(e is SettingSaveEventArgs args)) return;
|
||||
|
||||
GameEntry.Sound.SetVolume("BGM", args.GameSettings.BGMVolume);
|
||||
GameEntry.Sound.SetVolume("SE", args.GameSettings.SEVolume);
|
||||
|
||||
ScreenResolutionType resolution = args.GameSettings.ScreenResolution;
|
||||
int width = 0, height = 0;
|
||||
switch (resolution)
|
||||
{
|
||||
case ScreenResolutionType._1280x720:
|
||||
width = 1280;
|
||||
height = 720;
|
||||
break;
|
||||
case ScreenResolutionType._1366x768:
|
||||
width = 1366;
|
||||
height = 768;
|
||||
break;
|
||||
case ScreenResolutionType._1600x900:
|
||||
width = 1600;
|
||||
height = 900;
|
||||
break;
|
||||
case ScreenResolutionType._1920x1080:
|
||||
width = 1920;
|
||||
height = 1080;
|
||||
break;
|
||||
case ScreenResolutionType._2560x1440:
|
||||
width = 2560;
|
||||
height = 1440;
|
||||
break;
|
||||
case ScreenResolutionType._2560x1600:
|
||||
width = 2560;
|
||||
height = 1600;
|
||||
break;
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
|
||||
ScreenWindowType resolutionWindow = args.GameSettings.ScreenWindow;
|
||||
switch (resolutionWindow)
|
||||
{
|
||||
case ScreenWindowType.FullScreen:
|
||||
Screen.SetResolution(width, height, FullScreenMode.ExclusiveFullScreen);
|
||||
break;
|
||||
case ScreenWindowType.Borderless:
|
||||
Screen.SetResolution(width, height, FullScreenMode.FullScreenWindow);
|
||||
break;
|
||||
case ScreenWindowType.Windowed:
|
||||
Screen.SetResolution(width, height, FullScreenMode.Windowed);
|
||||
break;
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
|
||||
if (args.GameSettings.AntiAliasing)
|
||||
{
|
||||
foreach (var asset in GraphicsSettings.allConfiguredRenderPipelines)
|
||||
{
|
||||
if (asset.name == "URP-AntiAliasing") GraphicsSettings.renderPipelineAsset = asset;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (var asset in GraphicsSettings.allConfiguredRenderPipelines)
|
||||
{
|
||||
if (asset.name == "URP-Normal") GraphicsSettings.renderPipelineAsset = asset;
|
||||
}
|
||||
}
|
||||
|
||||
Application.targetFrameRate = -1;
|
||||
QualitySettings.vSyncCount = args.GameSettings.VSync ? 1 : 0;
|
||||
|
||||
GameEntry.Setting.SaveSetting(args.GameSettings);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,33 +1,25 @@
|
||||
//------------------------------------------------------------
|
||||
// Game Framework
|
||||
// Copyright © 2013-2021 Jiang Yin. All rights reserved.
|
||||
// Homepage: https://gameframework.cn/
|
||||
// Feedback: mailto:ellan@gameframework.cn
|
||||
//------------------------------------------------------------
|
||||
|
||||
using CustomUtility;
|
||||
using CustomUtility;
|
||||
using DataTable;
|
||||
using Definition;
|
||||
using Entity;
|
||||
using GameFramework;
|
||||
using GameFramework.DataTable;
|
||||
using GameFramework.Sound;
|
||||
using UnityGameFramework.Runtime;
|
||||
|
||||
namespace StarForce
|
||||
namespace Sound
|
||||
{
|
||||
public static class SoundExtension
|
||||
{
|
||||
private const float FadeVolumeDuration = 1f;
|
||||
private static int? s_MusicSerialId = null;
|
||||
|
||||
public static int? PlayMusic(this SoundComponent soundComponent, int musicId, object userData = null)
|
||||
public static int? PlayBGM(this SoundComponent soundComponent, int musicId, object userData = null)
|
||||
{
|
||||
soundComponent.StopMusic();
|
||||
|
||||
IDataTable<DRMusic> dtMusic = GameEntry.DataTable.GetDataTable<DRMusic>();
|
||||
DRMusic drMusic = dtMusic.GetDataRow(musicId);
|
||||
if (drMusic == null)
|
||||
IDataTable<DRBGM> dtMusic = GameEntry.DataTable.GetDataTable<DRBGM>();
|
||||
DRBGM drBgm = dtMusic.GetDataRow(musicId);
|
||||
if (drBgm == null)
|
||||
{
|
||||
Log.Warning("Can not load music '{0}' from data table.", musicId.ToString());
|
||||
return null;
|
||||
@@ -39,7 +31,8 @@ namespace StarForce
|
||||
playSoundParams.VolumeInSoundGroup = 1f;
|
||||
playSoundParams.FadeInSeconds = FadeVolumeDuration;
|
||||
playSoundParams.SpatialBlend = 0f;
|
||||
s_MusicSerialId = soundComponent.PlaySound(AssetUtility.GetMusicAsset(drMusic.AssetName), "Music", Constant.AssetPriority.MusicAsset, playSoundParams, null, userData);
|
||||
s_MusicSerialId = soundComponent.PlaySound(AssetUtility.GetMusicAsset(drBgm.AssetName), "BGM",
|
||||
Constant.AssetPriority.MusicAsset, playSoundParams, null, userData);
|
||||
return s_MusicSerialId;
|
||||
}
|
||||
|
||||
@@ -54,28 +47,10 @@ namespace StarForce
|
||||
s_MusicSerialId = null;
|
||||
}
|
||||
|
||||
public static int? PlaySound(this SoundComponent soundComponent, int soundId, EntityBase bindingEntity = null, object userData = null)
|
||||
public static int? PlaySE(this SoundComponent soundComponent, int uiSoundId, object userData = null)
|
||||
{
|
||||
IDataTable<DRSound> dtSound = GameEntry.DataTable.GetDataTable<DRSound>();
|
||||
DRSound drSound = dtSound.GetDataRow(soundId);
|
||||
if (drSound == null)
|
||||
{
|
||||
Log.Warning("Can not load sound '{0}' from data table.", soundId.ToString());
|
||||
return null;
|
||||
}
|
||||
|
||||
PlaySoundParams playSoundParams = PlaySoundParams.Create();
|
||||
playSoundParams.Priority = drSound.Priority;
|
||||
playSoundParams.Loop = drSound.Loop;
|
||||
playSoundParams.VolumeInSoundGroup = drSound.Volume;
|
||||
playSoundParams.SpatialBlend = drSound.SpatialBlend;
|
||||
return soundComponent.PlaySound(AssetUtility.GetSoundAsset(drSound.AssetName), "Sound", Constant.AssetPriority.SoundAsset, playSoundParams, bindingEntity != null ? bindingEntity.Entity : null, userData);
|
||||
}
|
||||
|
||||
public static int? PlayUISound(this SoundComponent soundComponent, int uiSoundId, object userData = null)
|
||||
{
|
||||
IDataTable<DRUISound> dtUISound = GameEntry.DataTable.GetDataTable<DRUISound>();
|
||||
DRUISound drUISound = dtUISound.GetDataRow(uiSoundId);
|
||||
IDataTable<DRSE> dtUISound = GameEntry.DataTable.GetDataTable<DRSE>();
|
||||
DRSE drUISound = dtUISound.GetDataRow(uiSoundId);
|
||||
if (drUISound == null)
|
||||
{
|
||||
Log.Warning("Can not load UI sound '{0}' from data table.", uiSoundId.ToString());
|
||||
@@ -87,46 +62,8 @@ namespace StarForce
|
||||
playSoundParams.Loop = false;
|
||||
playSoundParams.VolumeInSoundGroup = drUISound.Volume;
|
||||
playSoundParams.SpatialBlend = 0f;
|
||||
return soundComponent.PlaySound(AssetUtility.GetUISoundAsset(drUISound.AssetName), "UISound", Constant.AssetPriority.UISoundAsset, playSoundParams, userData);
|
||||
}
|
||||
|
||||
public static bool IsMuted(this SoundComponent soundComponent, string soundGroupName)
|
||||
{
|
||||
if (string.IsNullOrEmpty(soundGroupName))
|
||||
{
|
||||
Log.Warning("Sound group is invalid.");
|
||||
return true;
|
||||
}
|
||||
|
||||
ISoundGroup soundGroup = soundComponent.GetSoundGroup(soundGroupName);
|
||||
if (soundGroup == null)
|
||||
{
|
||||
Log.Warning("Sound group '{0}' is invalid.", soundGroupName);
|
||||
return true;
|
||||
}
|
||||
|
||||
return soundGroup.Mute;
|
||||
}
|
||||
|
||||
public static void Mute(this SoundComponent soundComponent, string soundGroupName, bool mute)
|
||||
{
|
||||
if (string.IsNullOrEmpty(soundGroupName))
|
||||
{
|
||||
Log.Warning("Sound group is invalid.");
|
||||
return;
|
||||
}
|
||||
|
||||
ISoundGroup soundGroup = soundComponent.GetSoundGroup(soundGroupName);
|
||||
if (soundGroup == null)
|
||||
{
|
||||
Log.Warning("Sound group '{0}' is invalid.", soundGroupName);
|
||||
return;
|
||||
}
|
||||
|
||||
soundGroup.Mute = mute;
|
||||
|
||||
GameEntry.Setting.SetBool(Utility.Text.Format(Constant.Setting.SoundGroupMuted, soundGroupName), mute);
|
||||
GameEntry.Setting.Save();
|
||||
return soundComponent.PlaySound(AssetUtility.GetUISoundAsset(drUISound.AssetName), "SE",
|
||||
Constant.AssetPriority.UISoundAsset, playSoundParams, userData);
|
||||
}
|
||||
|
||||
public static float GetVolume(this SoundComponent soundComponent, string soundGroupName)
|
||||
@@ -164,8 +101,8 @@ namespace StarForce
|
||||
|
||||
soundGroup.Volume = volume;
|
||||
|
||||
GameEntry.Setting.SetFloat(Utility.Text.Format(Constant.Setting.SoundGroupVolume, soundGroupName), volume);
|
||||
GameEntry.Setting.SetFloat($"Setting.{soundGroup}Volume", volume);
|
||||
GameEntry.Setting.Save();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -25,6 +25,7 @@ namespace UI
|
||||
return null;
|
||||
}
|
||||
|
||||
context.Controller = this;
|
||||
_context = context;
|
||||
|
||||
if (_settingForm != null)
|
||||
|
||||
@@ -1,13 +1,6 @@
|
||||
//------------------------------------------------------------
|
||||
// Game Framework
|
||||
// Copyright © 2013-2021 Jiang Yin. All rights reserved.
|
||||
// Homepage: https://gameframework.cn/
|
||||
// Feedback: mailto:ellan@gameframework.cn
|
||||
//------------------------------------------------------------
|
||||
|
||||
using System.Collections;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using StarForce;
|
||||
using Sound;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
@@ -51,7 +44,7 @@ namespace UI
|
||||
|
||||
public void PlayUISound(int uiSoundId)
|
||||
{
|
||||
GameEntry.Sound.PlayUISound(uiSoundId);
|
||||
GameEntry.Sound.PlaySE(uiSoundId);
|
||||
}
|
||||
|
||||
public static void SetMainFont(Font mainFont)
|
||||
@@ -108,10 +101,6 @@ namespace UI
|
||||
foreach (var text in tmp_texts)
|
||||
{
|
||||
text.font = _mainTMPFont;
|
||||
if (!string.IsNullOrEmpty(text.text))
|
||||
{
|
||||
text.text = GameEntry.Localization.GetString(text.text);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -125,10 +114,6 @@ namespace UI
|
||||
foreach (var text in texts)
|
||||
{
|
||||
text.font = _mainFont;
|
||||
if (!string.IsNullOrEmpty(text.text))
|
||||
{
|
||||
text.text = GameEntry.Localization.GetString(text.text);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,15 +46,15 @@ namespace UI
|
||||
|
||||
var setting = context.Setting;
|
||||
|
||||
_bgmVolumeSlider.value = setting.BGMVolume;
|
||||
_seVolumeSlider.value = setting.SEVolume;
|
||||
_bgmVolumeSlider.value = setting.BGMVolume * 4;
|
||||
_seVolumeSlider.value = setting.SEVolume * 4;
|
||||
|
||||
_allowBlinkGroup.SetValue(setting.AllowBlink);
|
||||
_allowShakeGroup.SetValue(setting.AllowShake);
|
||||
_dialogWindowAlpha.SetValue((int)setting.DialogWindowAlpha);
|
||||
_playingSpeed.SetValue((int)setting.PlayingSpeed);
|
||||
_playingSpeed.SetValue((int)setting.DialogPlayingSpeed);
|
||||
|
||||
_screenSolution.SetValue((int)setting.ScreenSolution);
|
||||
_screenSolution.SetValue((int)setting.ScreenResolution);
|
||||
_screenWindow.SetValue((int)setting.ScreenWindow);
|
||||
_vSyncGroup.SetValue(setting.VSync);
|
||||
_antiAliasingGroup.SetValue(setting.AntiAliasing);
|
||||
@@ -77,15 +77,15 @@ namespace UI
|
||||
{
|
||||
var setting = new GameSetting
|
||||
{
|
||||
BGMVolume = _bgmVolumeSlider.value,
|
||||
SEVolume = _seVolumeSlider.value,
|
||||
BGMVolume = _bgmVolumeSlider.value / 4,
|
||||
SEVolume = _seVolumeSlider.value / 4,
|
||||
|
||||
AllowShake = _allowShakeGroup.GetBoolValue(),
|
||||
AllowBlink = _allowBlinkGroup.GetBoolValue(),
|
||||
DialogWindowAlpha = (DialogWindowAlpha)_dialogWindowAlpha.GetIntValue(),
|
||||
PlayingSpeed = (DialogPlayingSpeed)_playingSpeed.GetIntValue(),
|
||||
DialogPlayingSpeed = (DialogPlayingSpeed)_playingSpeed.GetIntValue(),
|
||||
|
||||
ScreenSolution = (ScreenSolutionType)_screenSolution.GetIntValue(),
|
||||
ScreenResolution = (ScreenResolutionType)_screenSolution.GetIntValue(),
|
||||
ScreenWindow = (ScreenWindowType)_screenWindow.GetIntValue(),
|
||||
VSync = _vSyncGroup.GetBoolValue(),
|
||||
AntiAliasing = _antiAliasingGroup.GetBoolValue()
|
||||
@@ -129,6 +129,7 @@ namespace UI
|
||||
{
|
||||
var setting = CollectSetting();
|
||||
GameEntry.Event.Fire(this, SettingSaveEventArgs.Create(setting));
|
||||
_controller.CloseUI();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4564,7 +4564,7 @@ GameObject:
|
||||
- component: {fileID: 5634799414351515039}
|
||||
- component: {fileID: 8849553200166011154}
|
||||
m_Layer: 5
|
||||
m_Name: ScreenSolution
|
||||
m_Name: ScreenResolution
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
|
||||
Reference in New Issue
Block a user