no
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 79d3c6f43b7201c4da72759bfc9131dd
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cb7768b1641f8344aad8b46746ff61e3
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,21 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 15d3c44401c8efa4998c665132bb7030
|
||||
TrueTypeFontImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 4
|
||||
fontSize: 16
|
||||
forceTextureCase: -2
|
||||
characterSpacing: 0
|
||||
characterPadding: 1
|
||||
includeFontData: 1
|
||||
fontNames:
|
||||
- Noto Sans SC
|
||||
fallbackFontReferences: []
|
||||
customCharacters:
|
||||
fontRenderingMode: 0
|
||||
ascentCalculationMode: 1
|
||||
useLegacyBoundsCalculation: 0
|
||||
shouldRoundAdvanceValue: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,7 +0,0 @@
|
||||
# Generated Art
|
||||
|
||||
本目录的 11 张 PNG 于 2026-08-17 使用 OpenAI `gpt-image-2` 批量生成,并作为实际游戏 Sprite/Texture 导入:工厂地面、采集器、传送带、分流器、熔炼机、组装机、装填器、炮塔、能量站、物料箱和攻城无人机。
|
||||
|
||||
生成提示采用统一的俯视工业蓝图语言、金属机械结构、青色状态灯与黄色警示标识;机器和物料要求透明背景,地面要求可平铺且无文字。原始批处理清单位于工作区 `tmp/imagegen/demo2-prompts.jsonl`,生成输出位于 `output/imagegen/demo2`。
|
||||
|
||||
这些资源只服务 Demo2,未替换 Demo1 或 SDK 公共资源。
|
||||
@@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e589b95ec351cfa4094b48d409fe75e6
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1e4ad6d03211ddd48823cec6fb7d0731
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
Before Width: | Height: | Size: 2.5 MiB |
@@ -1,140 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b452c88a0cf86db498ed52901b0b8ca4
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 1024
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 1024
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 2
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: WebGL
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
Before Width: | Height: | Size: 4.4 MiB |
@@ -1,140 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c41720ca61016d241adc77b0acb21b22
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 64
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 2
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: WebGL
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
Before Width: | Height: | Size: 2.3 MiB |
@@ -1,140 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 33348165749c3f642abdbd128a6d4d36
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 1024
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 1024
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 2
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: WebGL
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
Before Width: | Height: | Size: 2.3 MiB |
@@ -1,140 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9affed53665a34948898c0753948c7e1
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 1024
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 1024
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 2
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: WebGL
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
Before Width: | Height: | Size: 2.1 MiB |
@@ -1,140 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4db1742d8176163488ffd1b097ad51f7
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 1024
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 1024
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 2
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: WebGL
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
Before Width: | Height: | Size: 2.3 MiB |
@@ -1,140 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9bb2b13fa139f6747ae34363c441b952
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 1024
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 1024
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 2
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: WebGL
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
Before Width: | Height: | Size: 1.9 MiB |
@@ -1,140 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: efbb53bf6ddaf2b4e8ee1dbd2a5d5e2d
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 1024
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 1024
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 2
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: WebGL
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
Before Width: | Height: | Size: 1.9 MiB |
@@ -1,140 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5b16a2336e567ff47a010effae5289a2
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 1024
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 1024
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 2
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: WebGL
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
Before Width: | Height: | Size: 1.8 MiB |
@@ -1,140 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 101a5a4eef59995469862b5ec9d190bc
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 1024
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 1024
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 2
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: WebGL
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
Before Width: | Height: | Size: 1.8 MiB |
@@ -1,140 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 23a085599a885574d946089e38659930
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 1024
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 1024
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 2
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: WebGL
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
Before Width: | Height: | Size: 2.0 MiB |
@@ -1,140 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ed97685bc5914fa4b977fb9f20f8767e
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 1024
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 1024
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 2
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: WebGL
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,255 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!29 &1
|
||||
OcclusionCullingSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_OcclusionBakeSettings:
|
||||
smallestOccluder: 5
|
||||
smallestHole: 0.25
|
||||
backfaceThreshold: 100
|
||||
m_SceneGUID: 00000000000000000000000000000000
|
||||
m_OcclusionCullingData: {fileID: 0}
|
||||
--- !u!104 &2
|
||||
RenderSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 9
|
||||
m_Fog: 0
|
||||
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
|
||||
m_FogMode: 3
|
||||
m_FogDensity: 0.01
|
||||
m_LinearFogStart: 0
|
||||
m_LinearFogEnd: 300
|
||||
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
|
||||
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
|
||||
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
|
||||
m_AmbientIntensity: 1
|
||||
m_AmbientMode: 3
|
||||
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
|
||||
m_SkyboxMaterial: {fileID: 0}
|
||||
m_HaloStrength: 0.5
|
||||
m_FlareStrength: 1
|
||||
m_FlareFadeSpeed: 3
|
||||
m_HaloTexture: {fileID: 0}
|
||||
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_DefaultReflectionMode: 0
|
||||
m_DefaultReflectionResolution: 128
|
||||
m_ReflectionBounces: 1
|
||||
m_ReflectionIntensity: 1
|
||||
m_CustomReflection: {fileID: 0}
|
||||
m_Sun: {fileID: 0}
|
||||
m_UseRadianceAmbientProbe: 0
|
||||
--- !u!157 &3
|
||||
LightmapSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 12
|
||||
m_GIWorkflowMode: 1
|
||||
m_GISettings:
|
||||
serializedVersion: 2
|
||||
m_BounceScale: 1
|
||||
m_IndirectOutputScale: 1
|
||||
m_AlbedoBoost: 1
|
||||
m_EnvironmentLightingMode: 0
|
||||
m_EnableBakedLightmaps: 0
|
||||
m_EnableRealtimeLightmaps: 0
|
||||
m_LightmapEditorSettings:
|
||||
serializedVersion: 12
|
||||
m_Resolution: 2
|
||||
m_BakeResolution: 40
|
||||
m_AtlasSize: 1024
|
||||
m_AO: 0
|
||||
m_AOMaxDistance: 1
|
||||
m_CompAOExponent: 1
|
||||
m_CompAOExponentDirect: 0
|
||||
m_ExtractAmbientOcclusion: 0
|
||||
m_Padding: 2
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_LightmapsBakeMode: 1
|
||||
m_TextureCompression: 1
|
||||
m_FinalGather: 0
|
||||
m_FinalGatherFiltering: 1
|
||||
m_FinalGatherRayCount: 256
|
||||
m_ReflectionCompression: 2
|
||||
m_MixedBakeMode: 2
|
||||
m_BakeBackend: 1
|
||||
m_PVRSampling: 1
|
||||
m_PVRDirectSampleCount: 32
|
||||
m_PVRSampleCount: 512
|
||||
m_PVRBounces: 2
|
||||
m_PVREnvironmentSampleCount: 256
|
||||
m_PVREnvironmentReferencePointCount: 2048
|
||||
m_PVRFilteringMode: 1
|
||||
m_PVRDenoiserTypeDirect: 1
|
||||
m_PVRDenoiserTypeIndirect: 1
|
||||
m_PVRDenoiserTypeAO: 1
|
||||
m_PVRFilterTypeDirect: 0
|
||||
m_PVRFilterTypeIndirect: 0
|
||||
m_PVRFilterTypeAO: 0
|
||||
m_PVREnvironmentMIS: 1
|
||||
m_PVRCulling: 1
|
||||
m_PVRFilteringGaussRadiusDirect: 1
|
||||
m_PVRFilteringGaussRadiusIndirect: 5
|
||||
m_PVRFilteringGaussRadiusAO: 2
|
||||
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
|
||||
m_PVRFilteringAtrousPositionSigmaIndirect: 2
|
||||
m_PVRFilteringAtrousPositionSigmaAO: 1
|
||||
m_ExportTrainingData: 0
|
||||
m_TrainingDataDestination: TrainingData
|
||||
m_LightProbeSampleCountMultiplier: 4
|
||||
m_LightingDataAsset: {fileID: 0}
|
||||
m_LightingSettings: {fileID: 0}
|
||||
--- !u!196 &4
|
||||
NavMeshSettings:
|
||||
serializedVersion: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_BuildSettings:
|
||||
serializedVersion: 3
|
||||
agentTypeID: 0
|
||||
agentRadius: 0.5
|
||||
agentHeight: 2
|
||||
agentSlope: 45
|
||||
agentClimb: 0.4
|
||||
ledgeDropHeight: 0
|
||||
maxJumpAcrossDistance: 0
|
||||
minRegionArea: 2
|
||||
manualCellSize: 0
|
||||
cellSize: 0.16666667
|
||||
manualTileSize: 0
|
||||
tileSize: 256
|
||||
buildHeightMesh: 0
|
||||
maxJobWorkers: 0
|
||||
preserveTilesOutsideBounds: 0
|
||||
debug:
|
||||
m_Flags: 0
|
||||
m_NavMeshData: {fileID: 0}
|
||||
--- !u!1001 &1862891898
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: 8242645858535981536, guid: 352b8b71da8ab714593f02e051f3ead4, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: Demo2Root
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8672822441849276680, guid: 352b8b71da8ab714593f02e051f3ead4, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8672822441849276680, guid: 352b8b71da8ab714593f02e051f3ead4, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8672822441849276680, guid: 352b8b71da8ab714593f02e051f3ead4, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8672822441849276680, guid: 352b8b71da8ab714593f02e051f3ead4, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8672822441849276680, guid: 352b8b71da8ab714593f02e051f3ead4, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8672822441849276680, guid: 352b8b71da8ab714593f02e051f3ead4, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8672822441849276680, guid: 352b8b71da8ab714593f02e051f3ead4, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8672822441849276680, guid: 352b8b71da8ab714593f02e051f3ead4, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8672822441849276680, guid: 352b8b71da8ab714593f02e051f3ead4, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8672822441849276680, guid: 352b8b71da8ab714593f02e051f3ead4, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 352b8b71da8ab714593f02e051f3ead4, type: 3}
|
||||
--- !u!1 &1886032575
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1886032578}
|
||||
- component: {fileID: 1886032577}
|
||||
- component: {fileID: 1886032576}
|
||||
m_Layer: 0
|
||||
m_Name: EventSystem
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &1886032576
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1886032575}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_SendPointerHoverToParent: 1
|
||||
m_HorizontalAxis: Horizontal
|
||||
m_VerticalAxis: Vertical
|
||||
m_SubmitButton: Submit
|
||||
m_CancelButton: Cancel
|
||||
m_InputActionsPerSecond: 10
|
||||
m_RepeatDelay: 0.5
|
||||
m_ForceModuleActive: 0
|
||||
--- !u!114 &1886032577
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1886032575}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_FirstSelected: {fileID: 0}
|
||||
m_sendNavigationEvents: 1
|
||||
m_DragThreshold: 10
|
||||
--- !u!4 &1886032578
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1886032575}
|
||||
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: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1660057539 &9223372036854775807
|
||||
SceneRoots:
|
||||
m_ObjectHideFlags: 0
|
||||
m_Roots:
|
||||
- {fileID: 1862891898}
|
||||
- {fileID: 1886032578}
|
||||
@@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3799c313173423549b8ec39f284eb115
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f641e1bd9cfe2844caebfbe357419939
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,32 +0,0 @@
|
||||
# 架构与确定性契约
|
||||
|
||||
## 版本边界
|
||||
|
||||
- Unity:2022.3.62f3
|
||||
- Entities:1.0.11
|
||||
- 模拟协议:1
|
||||
- 固定频率:20 Hz
|
||||
- 地图:32 × 20
|
||||
|
||||
Demo2 创建独立 `World`,不接管默认 World,也不依赖 Entities Graphics。机器与传送带使用池化 SpriteRenderer 代理;物料状态只存在于 ECS,并通过 `Graphics.DrawMeshInstanced` 批量绘制。
|
||||
|
||||
界面使用运行时 UI Toolkit:`UI/Demo2.uxml` 定义结构,`UI/Demo2.uss` 定义 1920×1080 基准下的响应式布局,`UIDocument` 通过 `PanelSettings` 适配 16:9、16:10、4:3 和安全区。工厂中央的 UI Toolkit 输入面只拦截网格区域,侧栏和工具栏不会把指针事件穿透给工厂。
|
||||
|
||||
## 固定系统顺序
|
||||
|
||||
1. `Demo2BuildCommandSystem`:复制指令缓冲后处理建造/拆除和幂等令牌。
|
||||
2. `Demo2ExtractionSystem`:采集器与能量站按整数 Tick 产出。
|
||||
3. `Demo2ConveyorSystem`:物料以千分位子格进度移动。
|
||||
4. `Demo2InputAllocationSystem`:把同格物料送入机器并计算物流条件。
|
||||
5. `Demo2ProcessingSystem`:按整数加工时间消耗输入。
|
||||
6. `Demo2OutputSystem`:创建批量物料实体。
|
||||
7. `Demo2RuleTriggerSystem`:防御结算时按槽位顺序解释规则指令。
|
||||
8. `Demo2TurretLoadingSystem`:按稳定 ID 选定装填目标,不依赖实体迭代顺序。
|
||||
9. `Demo2CycleStatisticsSystem`:提交周期统计并递增模拟 Tick。
|
||||
10. `Demo2StateHashSystem`:按稳定 ID 排序后计算 FNV-1a 风格 64 位状态哈希。
|
||||
|
||||
模拟不使用浮点数保存传送、产量、倍率、加工时间或随机状态。倍率以 1000 为 1.0;长整型运算使用饱和加法/乘法。状态哈希包含经济、核心、周期统计、机器、物料和炮塔弹药。快照恢复后继续 Tick 必须得到相同哈希。
|
||||
|
||||
## 性能验收
|
||||
|
||||
`Demo2EcsTests.StressTick_HandlesTenThousandItemsAndOneThousandMachines` 创建至少 10,000 个物料和 1,000 个机器实体,记录单 Tick 时间与当前线程托管分配。`SameSeedAndCommands_RemainIdenticalForTenThousandTicks` 对两个同种子 World 连续运行 10,000 Tick 并比较最终哈希。
|
||||
@@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a2b8a3bbd40f2514ca34582b3eeb157a
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,17 +0,0 @@
|
||||
# Unity Headless Server
|
||||
|
||||
Entities World 必须运行在 Unity Player 中,因此 Demo2 不提供纯 .NET 独服。
|
||||
|
||||
在 Unity 菜单执行 `ShrinkSDK > Demo2 > 构建 Headless Server`,输出为 `Builds/Demo2Headless/Demo2Server.exe`。构建器只包含 `Demo2.unity`,目标为 Windows x64 Server subtarget。
|
||||
|
||||
构建机需要为当前 Unity 版本安装 `Windows Dedicated Server Build Support` 模块;缺少模块时 Unity 会在生成 Player 前直接拒绝 Server subtarget 构建。
|
||||
|
||||
启动示例:
|
||||
|
||||
```powershell
|
||||
& .\Builds\Demo2Headless\Demo2Server.exe -batchmode -nographics -demo2-port 27320 -demo2-transport TCP -logFile .\Builds\Demo2Headless\server.log
|
||||
```
|
||||
|
||||
运行时 `Demo2HeadlessBootstrap` 会在 batch mode 创建游戏服务、使用固定种子启动对局,并监听指定端口。可把 `TCP` 替换为 `KCP`。
|
||||
|
||||
真实双 Player 验收应覆盖:重复包、同格建造、Mod 不一致、30 秒内重连、主动制造哈希失配,以及快照恢复后继续对局。
|
||||
@@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5f50f595911850748b3b3f592a312a6b
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,15 +0,0 @@
|
||||
# Mod API
|
||||
|
||||
联机兼容面是 `IDemo2Mod.Register(Demo2ContentRegistry)`,允许注册机器、配方、规则牌和波次。规则先变为 `RuleInstruction` 动态缓冲与 BlobAsset,再由 ECS 系统解释;禁止在每个物料上执行托管 Mod 回调,也不把 Harmony 改写 ECS System 作为受支持的联机接口。
|
||||
|
||||
示例位于 `Assets/Demos/Demo2/Mods/NightShiftProtocol`:
|
||||
|
||||
- Mod ID:`example.night-shift-protocol`
|
||||
- 机器:夜班熔炉
|
||||
- 配方:循环冷却(ID 100)
|
||||
- 规则:连续夜班
|
||||
- 命令:`demo2 night-shift status`
|
||||
|
||||
热重载先调用 `demo2 reload-mods` 暂存新目录。已开始的生产周期不改变内容;新内容只在下一周期边界或下一局生效。加入 LAN 前,双方需提供一致的 Mod ID、版本和内容 SHA-256。
|
||||
|
||||
新增规则操作需要在编译期扩展 `Demo2RuleOpcode` 及其解释分支,并提升模拟协议版本。不要通过反射或运行时委托绕过指令解释器。
|
||||
@@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9a99a82a304e44946807935aae285c35
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,29 +0,0 @@
|
||||
# LAN 同步协议
|
||||
|
||||
Host 是建造、拆除、旋转、配方、准备、奖励选择、周期切换和种子的权威端。客户端运行相同 ECS 模拟;Host 每 20 Tick 广播一次状态哈希。哈希失配时,Host 发送 GZip 压缩快照,客户端清空并重建 Demo2 World。
|
||||
|
||||
## 连接与发现
|
||||
|
||||
- 默认游戏端口:27320
|
||||
- 默认传输:TCP
|
||||
- 可在标题界面切换 KCP
|
||||
- UDP 广播用于房间发现
|
||||
- 支持直接 IP
|
||||
- 会话发放重连令牌,断线保留 30 秒
|
||||
|
||||
## 握手校验
|
||||
|
||||
准备前严格比较:游戏版本、模拟协议版本、内容 SHA-256,以及每个 Mod 的 ID、版本和内容哈希。规则、配方、机器或波次数据任一变化都会改变内容指纹。不一致时拒绝进入准备状态并返回差异。
|
||||
|
||||
## 指令语义
|
||||
|
||||
建造指令包含序号、玩家 ID 和幂等令牌。Host 按收到顺序裁决同格冲突;重复令牌返回已接受但不重复执行。越界、格子占用、空格拆除和资金不足分别返回稳定错误码。拆除按机器造价全额退款。
|
||||
|
||||
远程管理命令应由宿主的 ShrinkCommand 权限层限制。运行时提供:
|
||||
|
||||
- `demo2 status`
|
||||
- `demo2 spawn-item <kind> <quantity>`
|
||||
- `demo2 set-speed <1|4|10|20>`
|
||||
- `demo2 start-wave`
|
||||
- `demo2 dump-ecs`
|
||||
- `demo2 reload-mods`
|
||||
@@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d3e8ef634038fed4ab7d184153b24f07
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,34 +0,0 @@
|
||||
# 规则与数值契约
|
||||
|
||||
## 结算
|
||||
|
||||
`最终火力 = 载荷 × 倍率`。倍率内部使用千分位整数,例如 1.25 为 1250。所有规则按槽位 1 → 5 执行;同一张牌内的指令也按声明顺序执行,因此先加载荷再乘载荷与先乘再加会产生不同结果。
|
||||
|
||||
单张内置牌不提供无条件指数增长。64 位计算饱和到 `long.MinValue`/`long.MaxValue`,大数 UI 使用科学计数法。
|
||||
|
||||
## 内置 18 张规则
|
||||
|
||||
| ID | 类别 | 名称 | 条件与效果 |
|
||||
| --- | --- | --- | --- |
|
||||
| `production.triple-echo` | 生产链修正 | 三连复写 | 连续三次相同配方后,复制下一件产物 |
|
||||
| `production.hot-ingot` | 生产链修正 | 灼热锭 | 无故障时 +120 载荷 |
|
||||
| `production.precision-gears` | 生产链修正 | 精密齿轮 | 首批完成时载荷 ×1.25 |
|
||||
| `production.dense-ammo` | 生产链修正 | 高密弹药 | +180 载荷 |
|
||||
| `logistics.twin-stream` | 物流条件 | 双流共振 | 铁矿与燃料相邻流动时 +0.35 倍率 |
|
||||
| `logistics.clear-belt` | 物流条件 | 净空运输 | 传送带占用低于 80% 时倍率 ×1.20 |
|
||||
| `logistics.split-balance` | 物流条件 | 均衡分流 | +90 载荷 |
|
||||
| `logistics.long-haul` | 物流条件 | 长距惯性 | 低占用且无故障时 +0.20 倍率 |
|
||||
| `machine.overclock` | 机器状态 | 红区超频 | 载荷 ×1.50,然后 +1 故障 |
|
||||
| `machine.preventive-maintenance` | 机器状态 | 预防维护 | 有故障时修复 1 次,并 +60 载荷 |
|
||||
| `machine.night-shift` | 机器状态 | 夜班协议 | 无故障时 +0.25 倍率 |
|
||||
| `machine.thermal-bank` | 机器状态 | 余热银行 | 剩余能量每点转为 3 载荷 |
|
||||
| `cycle.energy-settlement` | 周期结算 | 能量清算 | 结算时剩余能量每点转为 5 载荷 |
|
||||
| `cycle.excess-credit` | 周期结算 | 过量授信 | 每 20 超额火力兑换 1 资金 |
|
||||
| `cycle.first-batch` | 周期结算 | 首批红利 | 首批完成时 +0.30 倍率 |
|
||||
| `cycle.reserve-capacitor` | 周期结算 | 储备电容 | 有剩余能量时倍率 ×1.15 |
|
||||
| `risk.glass-core` | 风险交换 | 玻璃核心 | 核心仅剩 1 点时 +0.65 倍率 |
|
||||
| `risk.debt-leverage` | 风险交换 | 负债杠杆 | +260 载荷,然后 +2 故障 |
|
||||
|
||||
## 波次
|
||||
|
||||
五轮生命依次为 500、900、1620、2916、5248,对应标准装甲、分散队列、电磁护盾、高速突击和核心压制。未达到波次生命会扣除 1 点核心耐久;成功后超额火力进入资金兑换。
|
||||
@@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 60e9dc6b5a1f45648a2c3e31048bd077
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c110b83d6908a444eb11f1dd2acd03e9
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,13 +0,0 @@
|
||||
{
|
||||
"name": "Demo2.Domain",
|
||||
"rootNamespace": "Demo2.Domain",
|
||||
"references": [],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": true
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 60f0384ea03a1314da9f3fc30edf2bc5
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,150 +0,0 @@
|
||||
#nullable enable
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
|
||||
namespace Demo2.Domain
|
||||
{
|
||||
public interface IDemo2Mod
|
||||
{
|
||||
string Id { get; }
|
||||
string Version { get; }
|
||||
void Register(Demo2ContentRegistry registry);
|
||||
}
|
||||
|
||||
public sealed class Demo2ModManifest
|
||||
{
|
||||
public string Id = string.Empty;
|
||||
public string Version = string.Empty;
|
||||
public string ContentSha256 = string.Empty;
|
||||
}
|
||||
|
||||
public sealed class Demo2ContentRegistry
|
||||
{
|
||||
private readonly Dictionary<string, Demo2RuleDefinition> _rules = new(StringComparer.Ordinal);
|
||||
private readonly Dictionary<int, Demo2RecipeDefinition> _recipes = new();
|
||||
private readonly Dictionary<Demo2MachineKind, Demo2MachineDefinition> _machines = new();
|
||||
private readonly List<Demo2WaveDefinition> _waves = new();
|
||||
|
||||
public IReadOnlyDictionary<string, Demo2RuleDefinition> Rules => _rules;
|
||||
public IReadOnlyDictionary<int, Demo2RecipeDefinition> Recipes => _recipes;
|
||||
public IReadOnlyDictionary<Demo2MachineKind, Demo2MachineDefinition> Machines => _machines;
|
||||
public IReadOnlyList<Demo2WaveDefinition> Waves => _waves;
|
||||
|
||||
public void AddRule(Demo2RuleDefinition definition) => _rules.Add(definition.Id, definition);
|
||||
public void AddRecipe(Demo2RecipeDefinition definition) => _recipes.Add(definition.Id, definition);
|
||||
public void AddMachine(Demo2MachineDefinition definition) => _machines.Add(definition.Kind, definition);
|
||||
public void AddWave(Demo2WaveDefinition definition) => _waves.Add(definition);
|
||||
|
||||
public string ComputeContentHash()
|
||||
{
|
||||
var text = new StringBuilder();
|
||||
foreach (var rule in _rules.Values.OrderBy(value => value.Id, StringComparer.Ordinal))
|
||||
{
|
||||
text.Append(rule.Id).Append('|').Append(rule.Name).Append('|').Append((int)rule.Category);
|
||||
foreach (var instruction in rule.Instructions)
|
||||
text.Append(':').Append((int)instruction.Opcode).Append(',').Append((int)instruction.Condition).Append(',').Append(instruction.Operand);
|
||||
text.AppendLine();
|
||||
}
|
||||
foreach (var recipe in _recipes.Values.OrderBy(value => value.Id))
|
||||
text.Append(recipe.Id).Append('|').Append(recipe.Name).Append('|')
|
||||
.Append((int)recipe.InputA).Append(',').Append(recipe.InputCountA).Append('|')
|
||||
.Append((int)recipe.InputB).Append(',').Append(recipe.InputCountB).Append('|')
|
||||
.Append((int)recipe.Output).Append(',').Append(recipe.OutputCount).Append('|').Append(recipe.ProcessTicks).AppendLine();
|
||||
foreach (var machine in _machines.Values.OrderBy(value => (int)value.Kind))
|
||||
text.Append("machine|").Append((int)machine.Kind).Append('|').Append(machine.Name).Append('|')
|
||||
.Append(machine.Cost).Append('|').Append(machine.RecipeId).Append('|').Append(machine.Capacity).AppendLine();
|
||||
foreach (var wave in _waves.OrderBy(value => value.Cycle))
|
||||
text.Append("wave|").Append(wave.Cycle).Append('|').Append(wave.TotalHealth).Append('|').Append(wave.Trait).AppendLine();
|
||||
using var sha = SHA256.Create();
|
||||
var bytes = sha.ComputeHash(Encoding.UTF8.GetBytes(text.ToString()));
|
||||
var hex = new StringBuilder(bytes.Length * 2);
|
||||
for (var i = 0; i < bytes.Length; i++) hex.Append(bytes[i].ToString("x2"));
|
||||
return hex.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
public static class Demo2BuiltInContent
|
||||
{
|
||||
public static Demo2ContentRegistry Create()
|
||||
{
|
||||
var registry = new Demo2ContentRegistry();
|
||||
AddMachinesAndRecipes(registry);
|
||||
AddWaves(registry);
|
||||
foreach (var rule in BuildRules()) registry.AddRule(rule);
|
||||
return registry;
|
||||
}
|
||||
|
||||
public static IReadOnlyList<Demo2RuleDefinition> BuildRules() => new[]
|
||||
{
|
||||
Rule("production.triple-echo", "三连复写", "连续完成三次相同配方后复制下一件产物。", Demo2RuleCategory.Production, Demo2RuleOpcode.DuplicateNextOutput, 1, Demo2RuleCondition.ThreeSameRecipes),
|
||||
Rule("production.hot-ingot", "灼热锭", "无故障时,每周期增加 120 载荷。", Demo2RuleCategory.Production, Demo2RuleOpcode.AddPayload, 120, Demo2RuleCondition.NoFaults),
|
||||
Rule("production.precision-gears", "精密齿轮", "首批齿轮使载荷提高 25%。", Demo2RuleCategory.Production, Demo2RuleOpcode.MultiplyPayload, 1250, Demo2RuleCondition.FirstBatch),
|
||||
Rule("production.dense-ammo", "高密弹药", "结算载荷固定增加 180。", Demo2RuleCategory.Production, Demo2RuleOpcode.AddPayload, 180),
|
||||
Rule("logistics.twin-stream", "双流共振", "铁矿与燃料相邻流动时,倍率增加 0.35。", Demo2RuleCategory.Logistics, Demo2RuleOpcode.AddMultiplier, 350, Demo2RuleCondition.IronFuelAdjacent),
|
||||
Rule("logistics.clear-belt", "净空运输", "传送带占用低于 80% 时,倍率提高 20%。", Demo2RuleCategory.Logistics, Demo2RuleOpcode.MultiplyMultiplier, 1200, Demo2RuleCondition.BeltBelowEightyPercent),
|
||||
Rule("logistics.split-balance", "均衡分流", "稳定分流为载荷增加 90。", Demo2RuleCategory.Logistics, Demo2RuleOpcode.AddPayload, 90),
|
||||
Rule("logistics.long-haul", "长距惯性", "低占用且无故障时,倍率增加 0.2。", Demo2RuleCategory.Logistics, Demo2RuleOpcode.AddMultiplier, 200, Demo2RuleCondition.BeltBelowEightyPercent | Demo2RuleCondition.NoFaults),
|
||||
Rule("machine.overclock", "红区超频", "载荷提高 50%,并增加 1 次故障。", Demo2RuleCategory.MachineState, new[]
|
||||
{
|
||||
Instruction(Demo2RuleOpcode.MultiplyPayload, 1500), Instruction(Demo2RuleOpcode.AddFaults, 1)
|
||||
}),
|
||||
Rule("machine.preventive-maintenance", "预防维护", "存在故障时修复 1 次并增加 60 载荷。", Demo2RuleCategory.MachineState, new[]
|
||||
{
|
||||
Instruction(Demo2RuleOpcode.RepairFaults, 1, Demo2RuleCondition.HasFaults), Instruction(Demo2RuleOpcode.AddPayload, 60, Demo2RuleCondition.HasFaults)
|
||||
}),
|
||||
Rule("machine.night-shift", "夜班协议", "无故障时倍率增加 0.25。", Demo2RuleCategory.MachineState, Demo2RuleOpcode.AddMultiplier, 250, Demo2RuleCondition.NoFaults),
|
||||
Rule("machine.thermal-bank", "余热银行", "剩余能量每点转化 3 载荷。", Demo2RuleCategory.MachineState, Demo2RuleOpcode.ConvertEnergyToPayload, 3, Demo2RuleCondition.HasExcessEnergy),
|
||||
Rule("cycle.energy-settlement", "能量清算", "结算时剩余能量每点转化 5 载荷。", Demo2RuleCategory.CycleSettlement, Demo2RuleOpcode.ConvertEnergyToPayload, 5, Demo2RuleCondition.HasExcessEnergy),
|
||||
Rule("cycle.excess-credit", "过量授信", "每 20 点超额火力兑换 1 资金。", Demo2RuleCategory.CycleSettlement, Demo2RuleOpcode.AddMoneyFromExcess, 20),
|
||||
Rule("cycle.first-batch", "首批红利", "首批完成时倍率增加 0.3。", Demo2RuleCategory.CycleSettlement, Demo2RuleOpcode.AddMultiplier, 300, Demo2RuleCondition.FirstBatch),
|
||||
Rule("cycle.reserve-capacitor", "储备电容", "剩余能量使倍率提高 15%。", Demo2RuleCategory.CycleSettlement, Demo2RuleOpcode.MultiplyMultiplier, 1150, Demo2RuleCondition.HasExcessEnergy),
|
||||
Rule("risk.glass-core", "玻璃核心", "核心仅剩 1 点耐久时,倍率提高 65%。", Demo2RuleCategory.RiskExchange, Demo2RuleOpcode.AddMultiplier, 650, Demo2RuleCondition.CoreAtRisk),
|
||||
Rule("risk.debt-leverage", "负债杠杆", "立即增加 260 载荷,但故障计数增加 2。", Demo2RuleCategory.RiskExchange, new[]
|
||||
{
|
||||
Instruction(Demo2RuleOpcode.AddPayload, 260), Instruction(Demo2RuleOpcode.AddFaults, 2)
|
||||
})
|
||||
};
|
||||
|
||||
private static void AddMachinesAndRecipes(Demo2ContentRegistry registry)
|
||||
{
|
||||
registry.AddRecipe(new Demo2RecipeDefinition { Id = 1, Name = "采集铁矿", Output = Demo2MaterialKind.IronOre, OutputCount = 1, ProcessTicks = 20 });
|
||||
registry.AddRecipe(new Demo2RecipeDefinition { Id = 2, Name = "燃料电解", Output = Demo2MaterialKind.Fuel, OutputCount = 1, ProcessTicks = 30 });
|
||||
registry.AddRecipe(new Demo2RecipeDefinition { Id = 3, Name = "铁锭熔炼", InputA = Demo2MaterialKind.IronOre, InputB = Demo2MaterialKind.Fuel, Output = Demo2MaterialKind.Ingot, InputCountA = 2, InputCountB = 1, OutputCount = 1, ProcessTicks = 40 });
|
||||
registry.AddRecipe(new Demo2RecipeDefinition { Id = 4, Name = "齿轮装配", InputA = Demo2MaterialKind.Ingot, Output = Demo2MaterialKind.Gear, InputCountA = 2, OutputCount = 1, ProcessTicks = 50 });
|
||||
registry.AddRecipe(new Demo2RecipeDefinition { Id = 5, Name = "弹药压制", InputA = Demo2MaterialKind.Gear, InputB = Demo2MaterialKind.Energy, Output = Demo2MaterialKind.Ammo, InputCountA = 1, InputCountB = 1, OutputCount = 4, ProcessTicks = 35 });
|
||||
|
||||
registry.AddMachine(new Demo2MachineDefinition { Kind = Demo2MachineKind.Miner, Name = "采集器", Cost = 40, RecipeId = 1, Capacity = 8 });
|
||||
registry.AddMachine(new Demo2MachineDefinition { Kind = Demo2MachineKind.Conveyor, Name = "传送带", Cost = 5, Capacity = 4 });
|
||||
registry.AddMachine(new Demo2MachineDefinition { Kind = Demo2MachineKind.Splitter, Name = "分流器", Cost = 15, Capacity = 8 });
|
||||
registry.AddMachine(new Demo2MachineDefinition { Kind = Demo2MachineKind.Smelter, Name = "熔炼机", Cost = 80, RecipeId = 3, Capacity = 12 });
|
||||
registry.AddMachine(new Demo2MachineDefinition { Kind = Demo2MachineKind.Assembler, Name = "组装机", Cost = 110, RecipeId = 4, Capacity = 12 });
|
||||
registry.AddMachine(new Demo2MachineDefinition { Kind = Demo2MachineKind.Loader, Name = "弹药装填器", Cost = 70, RecipeId = 5, Capacity = 24 });
|
||||
registry.AddMachine(new Demo2MachineDefinition { Kind = Demo2MachineKind.Turret, Name = "自动炮塔", Cost = 150, Capacity = 200 });
|
||||
registry.AddMachine(new Demo2MachineDefinition { Kind = Demo2MachineKind.Generator, Name = "能量站", Cost = 60, RecipeId = 2, Capacity = 16 });
|
||||
}
|
||||
|
||||
private static void AddWaves(Demo2ContentRegistry registry)
|
||||
{
|
||||
var health = 500L;
|
||||
var traits = new[] { "标准装甲", "分散队列", "电磁护盾", "高速突击", "核心压制" };
|
||||
for (var cycle = 1; cycle <= Demo2Protocol.CycleCount; cycle++)
|
||||
{
|
||||
registry.AddWave(new Demo2WaveDefinition { Cycle = cycle, TotalHealth = health, Trait = traits[cycle - 1] });
|
||||
health = SaturatingMath.MultiplyScaled(health, 1800);
|
||||
}
|
||||
}
|
||||
|
||||
private static Demo2RuleDefinition Rule(string id, string name, string description, Demo2RuleCategory category, Demo2RuleOpcode opcode, long operand, Demo2RuleCondition condition = Demo2RuleCondition.None)
|
||||
=> Rule(id, name, description, category, new[] { Instruction(opcode, operand, condition) });
|
||||
|
||||
private static Demo2RuleDefinition Rule(string id, string name, string description, Demo2RuleCategory category, IEnumerable<Demo2RuleInstructionData> instructions)
|
||||
=> new() { Id = id, Name = name, Description = description, Category = category, Instructions = instructions.ToList() };
|
||||
|
||||
private static Demo2RuleInstructionData Instruction(Demo2RuleOpcode opcode, long operand, Demo2RuleCondition condition = Demo2RuleCondition.None)
|
||||
=> new() { Opcode = opcode, Operand = operand, Condition = condition };
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 879b2677a87331d48a64a750e7d46537
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,188 +0,0 @@
|
||||
#nullable enable
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Demo2.Domain
|
||||
{
|
||||
public enum Demo2Phase : byte { Title, Lobby, Build, Production, Defense, Reward, Victory, Defeat }
|
||||
public enum Demo2TransportMode : byte { Tcp, Kcp }
|
||||
public enum Demo2MachineKind : byte { Miner, Conveyor, Splitter, Smelter, Assembler, Loader, Turret, Generator, NightShiftSmelter = 100 }
|
||||
public enum Demo2MaterialKind : byte { IronOre, Fuel, Ingot, Gear, Ammo, Energy }
|
||||
public enum Demo2RuleCategory : byte { Production, Logistics, MachineState, CycleSettlement, RiskExchange }
|
||||
public enum Demo2RuleOpcode : byte
|
||||
{
|
||||
AddPayload,
|
||||
MultiplyPayload,
|
||||
AddMultiplier,
|
||||
MultiplyMultiplier,
|
||||
ConvertEnergyToPayload,
|
||||
AddMoneyFromExcess,
|
||||
DuplicateNextOutput,
|
||||
AddFaults,
|
||||
RepairFaults
|
||||
}
|
||||
|
||||
[Flags]
|
||||
public enum Demo2RuleCondition : ushort
|
||||
{
|
||||
None = 0,
|
||||
ThreeSameRecipes = 1 << 0,
|
||||
IronFuelAdjacent = 1 << 1,
|
||||
BeltBelowEightyPercent = 1 << 2,
|
||||
NoFaults = 1 << 3,
|
||||
HasExcessEnergy = 1 << 4,
|
||||
FirstBatch = 1 << 5,
|
||||
CoreAtRisk = 1 << 6,
|
||||
HasFaults = 1 << 7
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public sealed class Demo2RuleInstructionData
|
||||
{
|
||||
public Demo2RuleOpcode Opcode;
|
||||
public Demo2RuleCondition Condition;
|
||||
public long Operand;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public sealed class Demo2RuleDefinition
|
||||
{
|
||||
public string Id = string.Empty;
|
||||
public string Name = string.Empty;
|
||||
public string Description = string.Empty;
|
||||
public Demo2RuleCategory Category;
|
||||
public List<Demo2RuleInstructionData> Instructions = new();
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public sealed class Demo2RecipeDefinition
|
||||
{
|
||||
public int Id;
|
||||
public string Name = string.Empty;
|
||||
public Demo2MaterialKind InputA;
|
||||
public Demo2MaterialKind InputB;
|
||||
public Demo2MaterialKind Output;
|
||||
public int InputCountA;
|
||||
public int InputCountB;
|
||||
public int OutputCount;
|
||||
public int ProcessTicks;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public sealed class Demo2MachineDefinition
|
||||
{
|
||||
public Demo2MachineKind Kind;
|
||||
public string Name = string.Empty;
|
||||
public int Cost;
|
||||
public int RecipeId;
|
||||
public int Capacity;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public sealed class Demo2WaveDefinition
|
||||
{
|
||||
public int Cycle;
|
||||
public long TotalHealth;
|
||||
public string Trait = string.Empty;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public sealed class Demo2BuildCommand
|
||||
{
|
||||
public long Sequence;
|
||||
public string IdempotencyToken = string.Empty;
|
||||
public string PlayerId = string.Empty;
|
||||
public Demo2MachineKind Kind;
|
||||
public int X;
|
||||
public int Y;
|
||||
public byte Rotation;
|
||||
public int RecipeId;
|
||||
public bool Remove;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public sealed class Demo2CommandResult
|
||||
{
|
||||
public bool Accepted;
|
||||
public bool Duplicate;
|
||||
public string ErrorCode = string.Empty;
|
||||
public int Refund;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public sealed class Demo2SnapshotEntity
|
||||
{
|
||||
public int StableId;
|
||||
public Demo2MachineKind MachineKind;
|
||||
public Demo2MaterialKind MaterialKind;
|
||||
public int X;
|
||||
public int Y;
|
||||
public byte Rotation;
|
||||
public int RecipeId;
|
||||
public int Progress;
|
||||
public int Quantity;
|
||||
public int Faults;
|
||||
public int PendingOutputs;
|
||||
public long TurretAmmo;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public sealed class Demo2Snapshot
|
||||
{
|
||||
public int SimulationVersion = Demo2Protocol.SimulationVersion;
|
||||
public long Tick;
|
||||
public ulong Seed;
|
||||
public Demo2Phase Phase;
|
||||
public int Cycle;
|
||||
public int CoreHealth;
|
||||
public long Money;
|
||||
public long Payload;
|
||||
public long MultiplierMilli = SaturatingMath.Scale;
|
||||
public long Energy;
|
||||
public long ExcessFirepower;
|
||||
public int RuleAppliedCycle;
|
||||
public int SpeedMultiplier = 1;
|
||||
public long Extracted;
|
||||
public long Transported;
|
||||
public long Processed;
|
||||
public long AmmoProduced;
|
||||
public int CompletedSameRecipeStreak;
|
||||
public int LastRecipeId;
|
||||
public int Faults;
|
||||
public int BeltOccupancy;
|
||||
public int BeltCapacity;
|
||||
public byte IronFuelAdjacent;
|
||||
public byte FirstBatch;
|
||||
public int DuplicateNextOutputs;
|
||||
public ulong StateHash;
|
||||
public List<string> RuleIds = new();
|
||||
public List<Demo2SnapshotEntity> Entities = new();
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public sealed class Demo2SaveData
|
||||
{
|
||||
public const int CurrentVersion = 1;
|
||||
public int Version = CurrentVersion;
|
||||
public int Cycle = 1;
|
||||
public int CoreHealth = 3;
|
||||
public long Money = 500;
|
||||
public ulong Seed = 20260817;
|
||||
public string BlueprintJson = string.Empty;
|
||||
public List<string> RuleIds = new();
|
||||
public List<string> UnlockIds = new();
|
||||
public string SnapshotJson = string.Empty;
|
||||
public string SnapshotHash = string.Empty;
|
||||
}
|
||||
|
||||
public static class Demo2Protocol
|
||||
{
|
||||
public const string GameVersion = "1.0.0";
|
||||
public const int SimulationVersion = 1;
|
||||
public const int TickRate = 20;
|
||||
public const int GridWidth = 32;
|
||||
public const int GridHeight = 20;
|
||||
public const int CycleCount = 5;
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 06add429ba83dfd4091aade08e445455
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,59 +0,0 @@
|
||||
#nullable enable
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Demo2.Domain
|
||||
{
|
||||
[Serializable]
|
||||
public sealed class Demo2NetworkEnvelope
|
||||
{
|
||||
public string Type = string.Empty;
|
||||
public long Sequence;
|
||||
public string PayloadJson = string.Empty;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public sealed class Demo2Handshake
|
||||
{
|
||||
public string GameVersion = Demo2Protocol.GameVersion;
|
||||
public int SimulationVersion = Demo2Protocol.SimulationVersion;
|
||||
public string PlayerId = string.Empty;
|
||||
public string ReconnectToken = string.Empty;
|
||||
public List<Demo2ModManifest> Mods = new();
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public sealed class Demo2HandshakeResult
|
||||
{
|
||||
public bool Accepted;
|
||||
public string ErrorCode = string.Empty;
|
||||
public string Difference = string.Empty;
|
||||
public string PlayerId = string.Empty;
|
||||
public string ReconnectToken = string.Empty;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public sealed class Demo2HashBroadcast
|
||||
{
|
||||
public long Tick;
|
||||
public ulong StateHash;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public sealed class Demo2LobbyPlayer
|
||||
{
|
||||
public string PlayerId = string.Empty;
|
||||
public string DisplayName = string.Empty;
|
||||
public bool Ready;
|
||||
public bool Connected;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public sealed class Demo2LobbyState
|
||||
{
|
||||
public bool IsHost;
|
||||
public Demo2TransportMode Transport;
|
||||
public List<Demo2LobbyPlayer> Players = new();
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9755a060f8361054d9b41a7e9e3a70e8
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,94 +0,0 @@
|
||||
#nullable enable
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Demo2.Domain
|
||||
{
|
||||
public struct Demo2RuleContext
|
||||
{
|
||||
public long Payload;
|
||||
public long MultiplierMilli;
|
||||
public long Energy;
|
||||
public long Money;
|
||||
public long ExcessFirepower;
|
||||
public int Faults;
|
||||
public bool ThreeSameRecipes;
|
||||
public bool IronFuelAdjacent;
|
||||
public bool BeltBelowEightyPercent;
|
||||
public bool FirstBatch;
|
||||
public bool CoreAtRisk;
|
||||
public int DuplicatedOutputs;
|
||||
|
||||
public long FinalFirepower => SaturatingMath.MultiplyScaled(Payload, MultiplierMilli);
|
||||
}
|
||||
|
||||
public static class Demo2RuleEngine
|
||||
{
|
||||
public static Demo2RuleContext Evaluate(Demo2RuleContext context, IReadOnlyList<Demo2RuleDefinition> orderedRules)
|
||||
{
|
||||
context.MultiplierMilli = context.MultiplierMilli <= 0 ? SaturatingMath.Scale : context.MultiplierMilli;
|
||||
for (var ruleIndex = 0; ruleIndex < orderedRules.Count; ruleIndex++)
|
||||
{
|
||||
var instructions = orderedRules[ruleIndex].Instructions;
|
||||
for (var instructionIndex = 0; instructionIndex < instructions.Count; instructionIndex++)
|
||||
{
|
||||
var instruction = instructions[instructionIndex];
|
||||
if (!Matches(instruction.Condition, context)) continue;
|
||||
Apply(ref context, instruction);
|
||||
}
|
||||
}
|
||||
return context;
|
||||
}
|
||||
|
||||
public static bool Matches(Demo2RuleCondition condition, in Demo2RuleContext context)
|
||||
{
|
||||
if ((condition & Demo2RuleCondition.ThreeSameRecipes) != 0 && !context.ThreeSameRecipes) return false;
|
||||
if ((condition & Demo2RuleCondition.IronFuelAdjacent) != 0 && !context.IronFuelAdjacent) return false;
|
||||
if ((condition & Demo2RuleCondition.BeltBelowEightyPercent) != 0 && !context.BeltBelowEightyPercent) return false;
|
||||
if ((condition & Demo2RuleCondition.NoFaults) != 0 && context.Faults != 0) return false;
|
||||
if ((condition & Demo2RuleCondition.HasExcessEnergy) != 0 && context.Energy <= 0) return false;
|
||||
if ((condition & Demo2RuleCondition.FirstBatch) != 0 && !context.FirstBatch) return false;
|
||||
if ((condition & Demo2RuleCondition.CoreAtRisk) != 0 && !context.CoreAtRisk) return false;
|
||||
if ((condition & Demo2RuleCondition.HasFaults) != 0 && context.Faults <= 0) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
public static void Apply(ref Demo2RuleContext context, Demo2RuleInstructionData instruction)
|
||||
{
|
||||
switch (instruction.Opcode)
|
||||
{
|
||||
case Demo2RuleOpcode.AddPayload:
|
||||
context.Payload = SaturatingMath.Add(context.Payload, instruction.Operand);
|
||||
break;
|
||||
case Demo2RuleOpcode.MultiplyPayload:
|
||||
context.Payload = SaturatingMath.MultiplyScaled(context.Payload, instruction.Operand);
|
||||
break;
|
||||
case Demo2RuleOpcode.AddMultiplier:
|
||||
context.MultiplierMilli = SaturatingMath.Add(context.MultiplierMilli, instruction.Operand);
|
||||
break;
|
||||
case Demo2RuleOpcode.MultiplyMultiplier:
|
||||
context.MultiplierMilli = SaturatingMath.MultiplyScaled(context.MultiplierMilli, instruction.Operand);
|
||||
break;
|
||||
case Demo2RuleOpcode.ConvertEnergyToPayload:
|
||||
context.Payload = SaturatingMath.Add(context.Payload, SaturatingMath.Multiply(context.Energy, instruction.Operand));
|
||||
context.Energy = 0;
|
||||
break;
|
||||
case Demo2RuleOpcode.AddMoneyFromExcess:
|
||||
context.Money = SaturatingMath.Add(context.Money, context.ExcessFirepower / Math.Max(1, instruction.Operand));
|
||||
break;
|
||||
case Demo2RuleOpcode.DuplicateNextOutput:
|
||||
context.DuplicatedOutputs = SaturatingMath.Add(context.DuplicatedOutputs, (int)instruction.Operand) > int.MaxValue
|
||||
? int.MaxValue
|
||||
: context.DuplicatedOutputs + (int)instruction.Operand;
|
||||
break;
|
||||
case Demo2RuleOpcode.AddFaults:
|
||||
context.Faults = Math.Max(0, context.Faults + (int)instruction.Operand);
|
||||
break;
|
||||
case Demo2RuleOpcode.RepairFaults:
|
||||
context.Faults = Math.Max(0, context.Faults - (int)instruction.Operand);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 27fbfb173d4cab643831a132177109b1
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,34 +0,0 @@
|
||||
#nullable enable
|
||||
|
||||
namespace Demo2.Domain
|
||||
{
|
||||
public struct DeterministicRandom
|
||||
{
|
||||
private ulong _state;
|
||||
private ulong _increment;
|
||||
|
||||
public DeterministicRandom(ulong seed, ulong stream = 54)
|
||||
{
|
||||
_state = 0;
|
||||
_increment = (stream << 1) | 1;
|
||||
NextUInt();
|
||||
_state += seed;
|
||||
NextUInt();
|
||||
}
|
||||
|
||||
public uint NextUInt()
|
||||
{
|
||||
var oldState = _state;
|
||||
_state = unchecked(oldState * 6364136223846793005UL + _increment);
|
||||
var xorShifted = (uint)(((oldState >> 18) ^ oldState) >> 27);
|
||||
var rotation = (int)(oldState >> 59);
|
||||
return (xorShifted >> rotation) | (xorShifted << ((-rotation) & 31));
|
||||
}
|
||||
|
||||
public int NextInt(int minInclusive, int maxExclusive)
|
||||
{
|
||||
if (maxExclusive <= minInclusive) return minInclusive;
|
||||
return minInclusive + (int)(NextUInt() % (uint)(maxExclusive - minInclusive));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c4946a70f5600c044b85dcc82d4d33bd
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,50 +0,0 @@
|
||||
#nullable enable
|
||||
|
||||
using System;
|
||||
|
||||
namespace Demo2.Domain
|
||||
{
|
||||
public static class SaturatingMath
|
||||
{
|
||||
public const long Scale = 1000;
|
||||
|
||||
public static long Add(long left, long right)
|
||||
{
|
||||
if (right > 0 && left > long.MaxValue - right) return long.MaxValue;
|
||||
if (right < 0 && left < long.MinValue - right) return long.MinValue;
|
||||
return left + right;
|
||||
}
|
||||
|
||||
public static long Multiply(long left, long right)
|
||||
{
|
||||
if (left == 0 || right == 0) return 0;
|
||||
if (left == long.MinValue && right == -1) return long.MaxValue;
|
||||
if (right == long.MinValue && left == -1) return long.MaxValue;
|
||||
var negative = (left < 0) ^ (right < 0);
|
||||
var a = AbsUnsigned(left);
|
||||
var b = AbsUnsigned(right);
|
||||
if (a > (ulong)long.MaxValue / b) return negative ? long.MinValue : long.MaxValue;
|
||||
var value = (long)(a * b);
|
||||
return negative ? -value : value;
|
||||
}
|
||||
|
||||
public static long MultiplyScaled(long value, long multiplierMilli)
|
||||
{
|
||||
if (value == 0 || multiplierMilli == 0) return 0;
|
||||
var product = Multiply(value, multiplierMilli);
|
||||
if (product == long.MaxValue || product == long.MinValue) return product;
|
||||
return product / Scale;
|
||||
}
|
||||
|
||||
public static string Format(long value)
|
||||
{
|
||||
var abs = value == long.MinValue ? long.MaxValue : Math.Abs(value);
|
||||
if (abs < 1_000_000_000) return value.ToString("N0");
|
||||
var exponent = (int)Math.Floor(Math.Log10(abs));
|
||||
var mantissa = value / Math.Pow(10, exponent);
|
||||
return mantissa.ToString("0.##") + "e" + exponent;
|
||||
}
|
||||
|
||||
private static ulong AbsUnsigned(long value) => value < 0 ? (ulong)(-(value + 1)) + 1UL : (ulong)value;
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c00ba3036e8f4814f898673c9363d11c
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9d6332877c56d84449eaf2ee879a9448
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,19 +0,0 @@
|
||||
{
|
||||
"name": "Demo2.ECS",
|
||||
"rootNamespace": "Demo2.ECS",
|
||||
"references": [
|
||||
"Demo2.Domain",
|
||||
"Unity.Entities",
|
||||
"Unity.Collections",
|
||||
"Unity.Mathematics",
|
||||
"Unity.Burst"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": false
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e97a30deb43db644d974377bb7c70d46
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,127 +0,0 @@
|
||||
#nullable enable
|
||||
|
||||
using Demo2.Domain;
|
||||
using Unity.Collections;
|
||||
using Unity.Entities;
|
||||
|
||||
namespace Demo2.ECS
|
||||
{
|
||||
public struct Demo2SimulationState : IComponentData
|
||||
{
|
||||
public long Tick;
|
||||
public ulong Seed;
|
||||
public Demo2Phase Phase;
|
||||
public int Cycle;
|
||||
public int NextStableId;
|
||||
public int RuleAppliedCycle;
|
||||
public ulong StateHash;
|
||||
public int SpeedMultiplier;
|
||||
}
|
||||
|
||||
public struct Demo2EconomyState : IComponentData
|
||||
{
|
||||
public long Money;
|
||||
public long Payload;
|
||||
public long MultiplierMilli;
|
||||
public long Energy;
|
||||
public long ExcessFirepower;
|
||||
}
|
||||
|
||||
public struct Demo2StableId : IComponentData { public int Value; }
|
||||
public struct Demo2GridPosition : IComponentData { public short X; public short Y; }
|
||||
|
||||
public struct Demo2MachineState : IComponentData
|
||||
{
|
||||
public Demo2MachineKind Kind;
|
||||
public byte Rotation;
|
||||
public byte Enabled;
|
||||
public int RecipeId;
|
||||
public int ProgressTicks;
|
||||
public int ProcessTicks;
|
||||
public int StoredInput;
|
||||
public int Capacity;
|
||||
public int PendingOutputs;
|
||||
public int Faults;
|
||||
}
|
||||
|
||||
public struct Demo2RecipeState : IComponentData
|
||||
{
|
||||
public Demo2MaterialKind InputA;
|
||||
public Demo2MaterialKind InputB;
|
||||
public Demo2MaterialKind Output;
|
||||
public int InputCountA;
|
||||
public int InputCountB;
|
||||
public int OutputCount;
|
||||
}
|
||||
|
||||
public struct Demo2ConveyorState : IComponentData
|
||||
{
|
||||
public byte Direction;
|
||||
public int Occupancy;
|
||||
public int Capacity;
|
||||
}
|
||||
|
||||
public struct Demo2MaterialState : IComponentData
|
||||
{
|
||||
public Demo2MaterialKind Kind;
|
||||
public int Quantity;
|
||||
public int SubCellProgress;
|
||||
public byte Direction;
|
||||
}
|
||||
|
||||
public struct Demo2TurretAmmo : IComponentData { public long Value; }
|
||||
public struct Demo2CoreHealth : IComponentData { public int Value; }
|
||||
|
||||
public struct Demo2CycleStats : IComponentData
|
||||
{
|
||||
public long Extracted;
|
||||
public long Transported;
|
||||
public long Processed;
|
||||
public long AmmoProduced;
|
||||
public int CompletedSameRecipeStreak;
|
||||
public int LastRecipeId;
|
||||
public int Faults;
|
||||
public int BeltOccupancy;
|
||||
public int BeltCapacity;
|
||||
public byte IronFuelAdjacent;
|
||||
public byte FirstBatch;
|
||||
public int DuplicateNextOutputs;
|
||||
}
|
||||
|
||||
[InternalBufferCapacity(32)]
|
||||
public struct Demo2BuildCommandElement : IBufferElementData
|
||||
{
|
||||
public long Sequence;
|
||||
public FixedString64Bytes IdempotencyToken;
|
||||
public FixedString32Bytes PlayerId;
|
||||
public Demo2MachineKind Kind;
|
||||
public short X;
|
||||
public short Y;
|
||||
public byte Rotation;
|
||||
public int RecipeId;
|
||||
public byte Remove;
|
||||
}
|
||||
|
||||
[InternalBufferCapacity(64)]
|
||||
public struct Demo2ProcessedCommandToken : IBufferElementData { public FixedString64Bytes Value; }
|
||||
|
||||
[InternalBufferCapacity(32)]
|
||||
public struct Demo2RuleInstruction : IBufferElementData
|
||||
{
|
||||
public Demo2RuleOpcode Opcode;
|
||||
public Demo2RuleCondition Condition;
|
||||
public long Operand;
|
||||
public int Slot;
|
||||
}
|
||||
|
||||
public struct Demo2RuleInstructionBlob
|
||||
{
|
||||
public Demo2RuleOpcode Opcode;
|
||||
public Demo2RuleCondition Condition;
|
||||
public long Operand;
|
||||
public int Slot;
|
||||
}
|
||||
|
||||
public struct Demo2RuleProgramBlob { public BlobArray<Demo2RuleInstructionBlob> Instructions; }
|
||||
public struct Demo2RuleProgram : IComponentData { public BlobAssetReference<Demo2RuleProgramBlob> Value; }
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7e6df350c356cf046b48a756e864df3b
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,198 +0,0 @@
|
||||
#nullable enable
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Demo2.Domain;
|
||||
using Unity.Collections;
|
||||
using Unity.Entities;
|
||||
|
||||
namespace Demo2.ECS
|
||||
{
|
||||
public sealed class Demo2EcsWorld : IDisposable
|
||||
{
|
||||
private readonly World _world;
|
||||
private readonly Demo2SimulationSystemGroup _group;
|
||||
private BlobAssetReference<Demo2RuleProgramBlob> _ruleBlob;
|
||||
|
||||
public World World => _world;
|
||||
public EntityManager EntityManager => _world.EntityManager;
|
||||
public Entity Singleton { get; }
|
||||
|
||||
public Demo2EcsWorld(ulong seed, IReadOnlyList<Demo2RuleDefinition>? orderedRules = null)
|
||||
{
|
||||
_world = new World("Demo2 Rule Factory", WorldFlags.Game);
|
||||
_group = _world.CreateSystemManaged<Demo2SimulationSystemGroup>();
|
||||
Add<Demo2BuildCommandSystem>();
|
||||
Add<Demo2ExtractionSystem>();
|
||||
Add<Demo2ConveyorSystem>();
|
||||
Add<Demo2InputAllocationSystem>();
|
||||
Add<Demo2ProcessingSystem>();
|
||||
Add<Demo2OutputSystem>();
|
||||
Add<Demo2RuleTriggerSystem>();
|
||||
Add<Demo2TurretLoadingSystem>();
|
||||
Add<Demo2CycleStatisticsSystem>();
|
||||
Add<Demo2StateHashSystem>();
|
||||
_group.SortSystems();
|
||||
|
||||
Singleton = EntityManager.CreateEntity(
|
||||
typeof(Demo2SimulationState), typeof(Demo2EconomyState), typeof(Demo2CoreHealth),
|
||||
typeof(Demo2CycleStats), typeof(Demo2BuildCommandElement), typeof(Demo2ProcessedCommandToken),
|
||||
typeof(Demo2RuleInstruction), typeof(Demo2RuleProgram));
|
||||
EntityManager.SetName(Singleton, "Demo2 Simulation Singleton");
|
||||
EntityManager.SetComponentData(Singleton, new Demo2SimulationState
|
||||
{
|
||||
Seed = seed,
|
||||
Phase = Demo2Phase.Build,
|
||||
Cycle = 1,
|
||||
SpeedMultiplier = 1,
|
||||
RuleAppliedCycle = -1
|
||||
});
|
||||
EntityManager.SetComponentData(Singleton, new Demo2EconomyState { Money = 500, MultiplierMilli = SaturatingMath.Scale });
|
||||
EntityManager.SetComponentData(Singleton, new Demo2CoreHealth { Value = 3 });
|
||||
SetRules(orderedRules ?? Array.Empty<Demo2RuleDefinition>());
|
||||
CreateStarterLayout();
|
||||
Tick();
|
||||
}
|
||||
|
||||
public void Tick() => _group.Update();
|
||||
|
||||
public void QueueBuild(Demo2BuildCommand command)
|
||||
{
|
||||
EntityManager.GetBuffer<Demo2BuildCommandElement>(Singleton).Add(new Demo2BuildCommandElement
|
||||
{
|
||||
Sequence = command.Sequence,
|
||||
IdempotencyToken = command.IdempotencyToken,
|
||||
PlayerId = command.PlayerId,
|
||||
Kind = command.Kind,
|
||||
X = (short)command.X,
|
||||
Y = (short)command.Y,
|
||||
Rotation = command.Rotation,
|
||||
RecipeId = command.RecipeId,
|
||||
Remove = command.Remove ? (byte)1 : (byte)0
|
||||
});
|
||||
}
|
||||
|
||||
public void SetPhase(Demo2Phase phase)
|
||||
{
|
||||
var state = EntityManager.GetComponentData<Demo2SimulationState>(Singleton);
|
||||
state.Phase = phase;
|
||||
EntityManager.SetComponentData(Singleton, state);
|
||||
}
|
||||
|
||||
public void SetCycle(int cycle)
|
||||
{
|
||||
var state = EntityManager.GetComponentData<Demo2SimulationState>(Singleton);
|
||||
state.Cycle = cycle;
|
||||
EntityManager.SetComponentData(Singleton, state);
|
||||
}
|
||||
|
||||
public void SetRules(IReadOnlyList<Demo2RuleDefinition> orderedRules)
|
||||
{
|
||||
if (_ruleBlob.IsCreated) _ruleBlob.Dispose();
|
||||
var flattened = new List<Demo2RuleInstructionBlob>();
|
||||
var buffer = EntityManager.GetBuffer<Demo2RuleInstruction>(Singleton);
|
||||
buffer.Clear();
|
||||
for (var slot = 0; slot < orderedRules.Count; slot++)
|
||||
foreach (var instruction in orderedRules[slot].Instructions)
|
||||
{
|
||||
var value = new Demo2RuleInstructionBlob { Opcode = instruction.Opcode, Condition = instruction.Condition, Operand = instruction.Operand, Slot = slot };
|
||||
flattened.Add(value);
|
||||
buffer.Add(new Demo2RuleInstruction { Opcode = value.Opcode, Condition = value.Condition, Operand = value.Operand, Slot = value.Slot });
|
||||
}
|
||||
using var builder = new BlobBuilder(Allocator.Temp);
|
||||
ref var root = ref builder.ConstructRoot<Demo2RuleProgramBlob>();
|
||||
var blobArray = builder.Allocate(ref root.Instructions, flattened.Count);
|
||||
for (var i = 0; i < flattened.Count; i++) blobArray[i] = flattened[i];
|
||||
_ruleBlob = builder.CreateBlobAssetReference<Demo2RuleProgramBlob>(Allocator.Persistent);
|
||||
EntityManager.SetComponentData(Singleton, new Demo2RuleProgram { Value = _ruleBlob });
|
||||
}
|
||||
|
||||
public Demo2Snapshot CaptureSnapshot(IReadOnlyList<string>? ruleIds = null) => Demo2SnapshotCodec.Capture(EntityManager, Singleton, ruleIds);
|
||||
public void RestoreSnapshot(Demo2Snapshot snapshot) => Demo2SnapshotCodec.Restore(EntityManager, Singleton, snapshot);
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
if (_ruleBlob.IsCreated) _ruleBlob.Dispose();
|
||||
if (_world.IsCreated) _world.Dispose();
|
||||
}
|
||||
|
||||
private void Add<T>() where T : ComponentSystemBase, new() => _group.AddSystemToUpdateList(_world.CreateSystemManaged<T>());
|
||||
|
||||
private void CreateStarterLayout()
|
||||
{
|
||||
var state = EntityManager.GetComponentData<Demo2SimulationState>(Singleton);
|
||||
Demo2EcsFactory.CreateMachine(EntityManager, ++state.NextStableId, Demo2MachineKind.Miner, 3, 7, 0, 1);
|
||||
for (var x = 4; x <= 7; x++) Demo2EcsFactory.CreateMachine(EntityManager, ++state.NextStableId, Demo2MachineKind.Conveyor, x, 7, 0, 0);
|
||||
Demo2EcsFactory.CreateMachine(EntityManager, ++state.NextStableId, Demo2MachineKind.Smelter, 8, 7, 0, 3);
|
||||
for (var x = 9; x <= 11; x++) Demo2EcsFactory.CreateMachine(EntityManager, ++state.NextStableId, Demo2MachineKind.Conveyor, x, 7, 0, 0);
|
||||
Demo2EcsFactory.CreateMachine(EntityManager, ++state.NextStableId, Demo2MachineKind.Assembler, 12, 7, 0, 4);
|
||||
Demo2EcsFactory.CreateMachine(EntityManager, ++state.NextStableId, Demo2MachineKind.Loader, 15, 7, 0, 5);
|
||||
var turret = Demo2EcsFactory.CreateMachine(EntityManager, ++state.NextStableId, Demo2MachineKind.Turret, 20, 10, 0, 0);
|
||||
EntityManager.AddComponentData(turret, new Demo2TurretAmmo());
|
||||
EntityManager.SetComponentData(Singleton, state);
|
||||
}
|
||||
}
|
||||
|
||||
public static class Demo2EcsFactory
|
||||
{
|
||||
public static Entity CreateMachine(EntityManager manager, int stableId, Demo2MachineKind kind, int x, int y, byte rotation, int recipeId)
|
||||
{
|
||||
var entity = manager.CreateEntity(typeof(Demo2StableId), typeof(Demo2GridPosition), typeof(Demo2MachineState), typeof(Demo2RecipeState));
|
||||
manager.SetName(entity, $"Machine {stableId} {kind}");
|
||||
manager.SetComponentData(entity, new Demo2StableId { Value = stableId });
|
||||
manager.SetComponentData(entity, new Demo2GridPosition { X = (short)x, Y = (short)y });
|
||||
var recipe = ResolveRecipe(recipeId == 0 ? DefaultRecipe(kind) : recipeId);
|
||||
manager.SetComponentData(entity, new Demo2MachineState
|
||||
{
|
||||
Kind = kind, Rotation = rotation, Enabled = 1, RecipeId = recipeId == 0 ? DefaultRecipe(kind) : recipeId,
|
||||
ProcessTicks = recipe.processTicks, Capacity = Capacity(kind)
|
||||
});
|
||||
manager.SetComponentData(entity, recipe.state);
|
||||
if (kind is Demo2MachineKind.Conveyor or Demo2MachineKind.Splitter)
|
||||
manager.AddComponentData(entity, new Demo2ConveyorState { Direction = rotation, Capacity = Capacity(kind) });
|
||||
return entity;
|
||||
}
|
||||
|
||||
public static Entity CreateMaterial(EntityManager manager, int stableId, Demo2MaterialKind kind, int x, int y, byte direction, int quantity)
|
||||
{
|
||||
var entity = manager.CreateEntity(typeof(Demo2StableId), typeof(Demo2GridPosition), typeof(Demo2MaterialState));
|
||||
manager.SetName(entity, $"Material {stableId} {kind}");
|
||||
manager.SetComponentData(entity, new Demo2StableId { Value = stableId });
|
||||
manager.SetComponentData(entity, new Demo2GridPosition { X = (short)x, Y = (short)y });
|
||||
manager.SetComponentData(entity, new Demo2MaterialState { Kind = kind, Quantity = quantity, Direction = direction });
|
||||
return entity;
|
||||
}
|
||||
|
||||
private static int DefaultRecipe(Demo2MachineKind kind) => kind switch
|
||||
{
|
||||
Demo2MachineKind.Miner => 1,
|
||||
Demo2MachineKind.Generator => 2,
|
||||
Demo2MachineKind.Smelter => 3,
|
||||
Demo2MachineKind.Assembler => 4,
|
||||
Demo2MachineKind.Loader => 5,
|
||||
Demo2MachineKind.NightShiftSmelter => 100,
|
||||
_ => 0
|
||||
};
|
||||
|
||||
private static int Capacity(Demo2MachineKind kind) => kind switch
|
||||
{
|
||||
Demo2MachineKind.Conveyor => 4,
|
||||
Demo2MachineKind.Splitter => 8,
|
||||
Demo2MachineKind.Turret => 200,
|
||||
Demo2MachineKind.Loader => 24,
|
||||
Demo2MachineKind.NightShiftSmelter => 16,
|
||||
_ => 12
|
||||
};
|
||||
|
||||
private static (Demo2RecipeState state, int processTicks) ResolveRecipe(int id) => id switch
|
||||
{
|
||||
1 => (new Demo2RecipeState { Output = Demo2MaterialKind.IronOre, OutputCount = 1 }, 20),
|
||||
2 => (new Demo2RecipeState { Output = Demo2MaterialKind.Energy, OutputCount = 1 }, 30),
|
||||
3 => (new Demo2RecipeState { InputA = Demo2MaterialKind.IronOre, InputB = Demo2MaterialKind.Fuel, Output = Demo2MaterialKind.Ingot, InputCountA = 2, InputCountB = 1, OutputCount = 1 }, 40),
|
||||
4 => (new Demo2RecipeState { InputA = Demo2MaterialKind.Ingot, Output = Demo2MaterialKind.Gear, InputCountA = 2, OutputCount = 1 }, 50),
|
||||
5 => (new Demo2RecipeState { InputA = Demo2MaterialKind.Gear, InputB = Demo2MaterialKind.Energy, Output = Demo2MaterialKind.Ammo, InputCountA = 1, InputCountB = 1, OutputCount = 4 }, 35),
|
||||
100 => (new Demo2RecipeState { InputA = Demo2MaterialKind.IronOre, InputB = Demo2MaterialKind.Energy, Output = Demo2MaterialKind.Ingot, InputCountA = 2, InputCountB = 1, OutputCount = 2 }, 34),
|
||||
_ => (default, 1)
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dc27cb2d9904aa64fbdbbff14348aa1d
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,145 +0,0 @@
|
||||
#nullable enable
|
||||
|
||||
using System.Collections.Generic;
|
||||
using Demo2.Domain;
|
||||
using Unity.Collections;
|
||||
using Unity.Entities;
|
||||
|
||||
namespace Demo2.ECS
|
||||
{
|
||||
public static class Demo2SnapshotCodec
|
||||
{
|
||||
public static Demo2Snapshot Capture(EntityManager manager, Entity singleton, IReadOnlyList<string>? ruleIds = null)
|
||||
{
|
||||
var simulation = manager.GetComponentData<Demo2SimulationState>(singleton);
|
||||
var economy = manager.GetComponentData<Demo2EconomyState>(singleton);
|
||||
var core = manager.GetComponentData<Demo2CoreHealth>(singleton);
|
||||
var stats = manager.GetComponentData<Demo2CycleStats>(singleton);
|
||||
var snapshot = new Demo2Snapshot
|
||||
{
|
||||
Tick = simulation.Tick,
|
||||
Seed = simulation.Seed,
|
||||
Phase = simulation.Phase,
|
||||
Cycle = simulation.Cycle,
|
||||
CoreHealth = core.Value,
|
||||
Money = economy.Money,
|
||||
Payload = economy.Payload,
|
||||
MultiplierMilli = economy.MultiplierMilli,
|
||||
Energy = economy.Energy,
|
||||
ExcessFirepower = economy.ExcessFirepower,
|
||||
RuleAppliedCycle = simulation.RuleAppliedCycle,
|
||||
SpeedMultiplier = simulation.SpeedMultiplier,
|
||||
Extracted = stats.Extracted,
|
||||
Transported = stats.Transported,
|
||||
Processed = stats.Processed,
|
||||
AmmoProduced = stats.AmmoProduced,
|
||||
CompletedSameRecipeStreak = stats.CompletedSameRecipeStreak,
|
||||
LastRecipeId = stats.LastRecipeId,
|
||||
Faults = stats.Faults,
|
||||
BeltOccupancy = stats.BeltOccupancy,
|
||||
BeltCapacity = stats.BeltCapacity,
|
||||
IronFuelAdjacent = stats.IronFuelAdjacent,
|
||||
FirstBatch = stats.FirstBatch,
|
||||
DuplicateNextOutputs = stats.DuplicateNextOutputs,
|
||||
StateHash = simulation.StateHash,
|
||||
RuleIds = ruleIds == null ? new List<string>() : new List<string>(ruleIds)
|
||||
};
|
||||
|
||||
using var entities = manager.GetAllEntities(Allocator.Temp);
|
||||
for (var i = 0; i < entities.Length; i++)
|
||||
{
|
||||
var entity = entities[i];
|
||||
if (!manager.HasComponent<Demo2StableId>(entity) || !manager.HasComponent<Demo2GridPosition>(entity)) continue;
|
||||
var row = new Demo2SnapshotEntity { StableId = manager.GetComponentData<Demo2StableId>(entity).Value };
|
||||
var position = manager.GetComponentData<Demo2GridPosition>(entity);
|
||||
row.X = position.X;
|
||||
row.Y = position.Y;
|
||||
if (manager.HasComponent<Demo2MachineState>(entity))
|
||||
{
|
||||
var machine = manager.GetComponentData<Demo2MachineState>(entity);
|
||||
row.MachineKind = machine.Kind;
|
||||
row.Rotation = machine.Rotation;
|
||||
row.RecipeId = machine.RecipeId;
|
||||
row.Progress = machine.ProgressTicks;
|
||||
row.Quantity = machine.StoredInput;
|
||||
row.Faults = machine.Faults;
|
||||
row.PendingOutputs = machine.PendingOutputs;
|
||||
if (manager.HasComponent<Demo2TurretAmmo>(entity)) row.TurretAmmo = manager.GetComponentData<Demo2TurretAmmo>(entity).Value;
|
||||
}
|
||||
else if (manager.HasComponent<Demo2MaterialState>(entity))
|
||||
{
|
||||
var material = manager.GetComponentData<Demo2MaterialState>(entity);
|
||||
row.MaterialKind = material.Kind;
|
||||
row.Rotation = material.Direction;
|
||||
row.Progress = material.SubCellProgress;
|
||||
row.Quantity = material.Quantity;
|
||||
row.MachineKind = (Demo2MachineKind)255;
|
||||
}
|
||||
snapshot.Entities.Add(row);
|
||||
}
|
||||
snapshot.Entities.Sort((left, right) => left.StableId.CompareTo(right.StableId));
|
||||
return snapshot;
|
||||
}
|
||||
|
||||
public static void Restore(EntityManager manager, Entity singleton, Demo2Snapshot snapshot)
|
||||
{
|
||||
using (var all = manager.GetAllEntities(Allocator.Temp))
|
||||
for (var i = 0; i < all.Length; i++) if (all[i] != singleton) manager.DestroyEntity(all[i]);
|
||||
|
||||
var simulation = manager.GetComponentData<Demo2SimulationState>(singleton);
|
||||
simulation.Tick = snapshot.Tick;
|
||||
simulation.Seed = snapshot.Seed;
|
||||
simulation.Phase = snapshot.Phase;
|
||||
simulation.Cycle = snapshot.Cycle;
|
||||
simulation.StateHash = snapshot.StateHash;
|
||||
simulation.RuleAppliedCycle = snapshot.RuleAppliedCycle;
|
||||
simulation.SpeedMultiplier = snapshot.SpeedMultiplier;
|
||||
simulation.NextStableId = 0;
|
||||
manager.SetComponentData(singleton, simulation);
|
||||
manager.SetComponentData(singleton, new Demo2CoreHealth { Value = snapshot.CoreHealth });
|
||||
manager.SetComponentData(singleton, new Demo2EconomyState
|
||||
{
|
||||
Money = snapshot.Money, Payload = snapshot.Payload, MultiplierMilli = snapshot.MultiplierMilli,
|
||||
Energy = snapshot.Energy,
|
||||
ExcessFirepower = snapshot.ExcessFirepower
|
||||
});
|
||||
manager.SetComponentData(singleton, new Demo2CycleStats
|
||||
{
|
||||
Extracted = snapshot.Extracted,
|
||||
Transported = snapshot.Transported,
|
||||
Processed = snapshot.Processed,
|
||||
AmmoProduced = snapshot.AmmoProduced,
|
||||
CompletedSameRecipeStreak = snapshot.CompletedSameRecipeStreak,
|
||||
LastRecipeId = snapshot.LastRecipeId,
|
||||
Faults = snapshot.Faults,
|
||||
BeltOccupancy = snapshot.BeltOccupancy,
|
||||
BeltCapacity = snapshot.BeltCapacity,
|
||||
IronFuelAdjacent = snapshot.IronFuelAdjacent,
|
||||
FirstBatch = snapshot.FirstBatch,
|
||||
DuplicateNextOutputs = snapshot.DuplicateNextOutputs
|
||||
});
|
||||
|
||||
foreach (var row in snapshot.Entities)
|
||||
{
|
||||
if ((byte)row.MachineKind == 255)
|
||||
Demo2EcsFactory.CreateMaterial(manager, row.StableId, row.MaterialKind, row.X, row.Y, row.Rotation, row.Quantity);
|
||||
else
|
||||
{
|
||||
var entity = Demo2EcsFactory.CreateMachine(manager, row.StableId, row.MachineKind, row.X, row.Y, row.Rotation, row.RecipeId);
|
||||
var machine = manager.GetComponentData<Demo2MachineState>(entity);
|
||||
machine.ProgressTicks = row.Progress;
|
||||
machine.StoredInput = row.Quantity;
|
||||
machine.Faults = row.Faults;
|
||||
machine.PendingOutputs = row.PendingOutputs;
|
||||
manager.SetComponentData(entity, machine);
|
||||
if (row.MachineKind == Demo2MachineKind.Turret && !manager.HasComponent<Demo2TurretAmmo>(entity))
|
||||
manager.AddComponentData(entity, new Demo2TurretAmmo());
|
||||
if (manager.HasComponent<Demo2TurretAmmo>(entity))
|
||||
manager.SetComponentData(entity, new Demo2TurretAmmo { Value = row.TurretAmmo });
|
||||
}
|
||||
if (row.StableId > simulation.NextStableId) simulation.NextStableId = row.StableId;
|
||||
}
|
||||
manager.SetComponentData(singleton, simulation);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 46554d8358fcb914bbe6b75006e83b57
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,538 +0,0 @@
|
||||
#nullable enable
|
||||
|
||||
using System;
|
||||
using Demo2.Domain;
|
||||
using Unity.Collections;
|
||||
using Unity.Entities;
|
||||
|
||||
namespace Demo2.ECS
|
||||
{
|
||||
[DisableAutoCreation]
|
||||
public sealed partial class Demo2SimulationSystemGroup : ComponentSystemGroup { }
|
||||
|
||||
[DisableAutoCreation]
|
||||
public sealed partial class Demo2BuildCommandSystem : SystemBase
|
||||
{
|
||||
protected override void OnUpdate()
|
||||
{
|
||||
var singletonQuery = GetEntityQuery(typeof(Demo2SimulationState), typeof(Demo2EconomyState), typeof(Demo2BuildCommandElement), typeof(Demo2ProcessedCommandToken));
|
||||
if (singletonQuery.IsEmptyIgnoreFilter) return;
|
||||
var singleton = singletonQuery.GetSingletonEntity();
|
||||
var simulation = EntityManager.GetComponentData<Demo2SimulationState>(singleton);
|
||||
if (simulation.Phase != Demo2Phase.Build) return;
|
||||
|
||||
var economy = EntityManager.GetComponentData<Demo2EconomyState>(singleton);
|
||||
var commands = EntityManager.GetBuffer<Demo2BuildCommandElement>(singleton);
|
||||
var tokens = EntityManager.GetBuffer<Demo2ProcessedCommandToken>(singleton);
|
||||
var pending = commands.ToNativeArray(Allocator.Temp);
|
||||
var knownTokens = new NativeArray<FixedString64Bytes>(tokens.Length + pending.Length, Allocator.Temp);
|
||||
var knownCount = tokens.Length;
|
||||
for (var i = 0; i < tokens.Length; i++) knownTokens[i] = tokens[i].Value;
|
||||
commands.Clear();
|
||||
for (var index = 0; index < pending.Length; index++)
|
||||
{
|
||||
var command = pending[index];
|
||||
if (Contains(knownTokens, knownCount, command.IdempotencyToken)) continue;
|
||||
knownTokens[knownCount++] = command.IdempotencyToken;
|
||||
if (command.X < 0 || command.X >= Demo2Protocol.GridWidth || command.Y < 0 || command.Y >= Demo2Protocol.GridHeight) continue;
|
||||
|
||||
var existing = FindMachine(command.X, command.Y);
|
||||
if (command.Remove != 0)
|
||||
{
|
||||
if (existing != Entity.Null)
|
||||
{
|
||||
var machine = EntityManager.GetComponentData<Demo2MachineState>(existing);
|
||||
economy.Money = SaturatingMath.Add(economy.Money, Cost(machine.Kind));
|
||||
EntityManager.DestroyEntity(existing);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
var cost = Cost(command.Kind);
|
||||
if (existing != Entity.Null || economy.Money < cost) continue;
|
||||
economy.Money -= cost;
|
||||
simulation.NextStableId++;
|
||||
Demo2EcsFactory.CreateMachine(EntityManager, simulation.NextStableId, command.Kind, command.X, command.Y, command.Rotation, command.RecipeId);
|
||||
}
|
||||
tokens = EntityManager.GetBuffer<Demo2ProcessedCommandToken>(singleton);
|
||||
tokens.Clear();
|
||||
for (var i = Math.Max(0, knownCount - 256); i < knownCount; i++)
|
||||
tokens.Add(new Demo2ProcessedCommandToken { Value = knownTokens[i] });
|
||||
pending.Dispose();
|
||||
knownTokens.Dispose();
|
||||
EntityManager.SetComponentData(singleton, simulation);
|
||||
EntityManager.SetComponentData(singleton, economy);
|
||||
}
|
||||
|
||||
private Entity FindMachine(int x, int y)
|
||||
{
|
||||
var query = GetEntityQuery(typeof(Demo2GridPosition), typeof(Demo2MachineState));
|
||||
using var entities = query.ToEntityArray(Allocator.Temp);
|
||||
using var positions = query.ToComponentDataArray<Demo2GridPosition>(Allocator.Temp);
|
||||
for (var i = 0; i < entities.Length; i++)
|
||||
if (positions[i].X == x && positions[i].Y == y) return entities[i];
|
||||
return Entity.Null;
|
||||
}
|
||||
|
||||
private static bool Contains(NativeArray<FixedString64Bytes> tokens, int count, FixedString64Bytes token)
|
||||
{
|
||||
for (var i = 0; i < count; i++) if (tokens[i].Equals(token)) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
public static int Cost(Demo2MachineKind kind) => kind switch
|
||||
{
|
||||
Demo2MachineKind.Miner => 40,
|
||||
Demo2MachineKind.Conveyor => 5,
|
||||
Demo2MachineKind.Splitter => 15,
|
||||
Demo2MachineKind.Smelter => 80,
|
||||
Demo2MachineKind.Assembler => 110,
|
||||
Demo2MachineKind.Loader => 70,
|
||||
Demo2MachineKind.Turret => 150,
|
||||
Demo2MachineKind.Generator => 60,
|
||||
Demo2MachineKind.NightShiftSmelter => 95,
|
||||
_ => 0
|
||||
};
|
||||
}
|
||||
|
||||
[DisableAutoCreation]
|
||||
public sealed partial class Demo2ExtractionSystem : SystemBase
|
||||
{
|
||||
protected override void OnUpdate()
|
||||
{
|
||||
if (!Demo2SystemUtility.TryGetProductionState(EntityManager, out var singleton, out var simulation)) return;
|
||||
var stats = EntityManager.GetComponentData<Demo2CycleStats>(singleton);
|
||||
var query = GetEntityQuery(typeof(Demo2StableId), typeof(Demo2GridPosition), typeof(Demo2MachineState), typeof(Demo2RecipeState));
|
||||
using var entities = query.ToEntityArray(Allocator.Temp);
|
||||
using var positions = query.ToComponentDataArray<Demo2GridPosition>(Allocator.Temp);
|
||||
for (var i = 0; i < entities.Length; i++)
|
||||
{
|
||||
var machine = EntityManager.GetComponentData<Demo2MachineState>(entities[i]);
|
||||
if (machine.Enabled == 0 || (machine.Kind != Demo2MachineKind.Miner && machine.Kind != Demo2MachineKind.Generator)) continue;
|
||||
machine.ProgressTicks++;
|
||||
if (machine.ProgressTicks < Math.Max(1, machine.ProcessTicks))
|
||||
{
|
||||
EntityManager.SetComponentData(entities[i], machine);
|
||||
continue;
|
||||
}
|
||||
machine.ProgressTicks = 0;
|
||||
var recipe = EntityManager.GetComponentData<Demo2RecipeState>(entities[i]);
|
||||
simulation.NextStableId++;
|
||||
Demo2EcsFactory.CreateMaterial(EntityManager, simulation.NextStableId, recipe.Output, positions[i].X, positions[i].Y, machine.Rotation, Math.Max(1, recipe.OutputCount));
|
||||
stats.Extracted = SaturatingMath.Add(stats.Extracted, recipe.OutputCount);
|
||||
if (recipe.Output == Demo2MaterialKind.Energy)
|
||||
{
|
||||
var economy = EntityManager.GetComponentData<Demo2EconomyState>(singleton);
|
||||
economy.Energy = SaturatingMath.Add(economy.Energy, recipe.OutputCount);
|
||||
EntityManager.SetComponentData(singleton, economy);
|
||||
}
|
||||
EntityManager.SetComponentData(entities[i], machine);
|
||||
}
|
||||
EntityManager.SetComponentData(singleton, simulation);
|
||||
EntityManager.SetComponentData(singleton, stats);
|
||||
}
|
||||
}
|
||||
|
||||
[DisableAutoCreation]
|
||||
public sealed partial class Demo2ConveyorSystem : SystemBase
|
||||
{
|
||||
protected override void OnUpdate()
|
||||
{
|
||||
if (!Demo2SystemUtility.TryGetProductionState(EntityManager, out var singleton, out _)) return;
|
||||
var stats = EntityManager.GetComponentData<Demo2CycleStats>(singleton);
|
||||
stats.BeltOccupancy = 0;
|
||||
stats.BeltCapacity = 0;
|
||||
var beltQuery = GetEntityQuery(typeof(Demo2ConveyorState));
|
||||
using (var belts = beltQuery.ToComponentDataArray<Demo2ConveyorState>(Allocator.Temp))
|
||||
for (var i = 0; i < belts.Length; i++) stats.BeltCapacity += Math.Max(1, belts[i].Capacity);
|
||||
|
||||
var query = GetEntityQuery(typeof(Demo2GridPosition), typeof(Demo2MaterialState));
|
||||
using var entities = query.ToEntityArray(Allocator.Temp);
|
||||
for (var i = 0; i < entities.Length; i++)
|
||||
{
|
||||
var position = EntityManager.GetComponentData<Demo2GridPosition>(entities[i]);
|
||||
var material = EntityManager.GetComponentData<Demo2MaterialState>(entities[i]);
|
||||
material.SubCellProgress += 250;
|
||||
stats.BeltOccupancy += material.Quantity;
|
||||
if (material.SubCellProgress >= 1000)
|
||||
{
|
||||
material.SubCellProgress -= 1000;
|
||||
Demo2SystemUtility.Move(ref position, material.Direction);
|
||||
stats.Transported = SaturatingMath.Add(stats.Transported, material.Quantity);
|
||||
}
|
||||
EntityManager.SetComponentData(entities[i], position);
|
||||
EntityManager.SetComponentData(entities[i], material);
|
||||
}
|
||||
EntityManager.SetComponentData(singleton, stats);
|
||||
}
|
||||
}
|
||||
|
||||
[DisableAutoCreation]
|
||||
public sealed partial class Demo2InputAllocationSystem : SystemBase
|
||||
{
|
||||
protected override void OnUpdate()
|
||||
{
|
||||
if (!Demo2SystemUtility.TryGetProductionState(EntityManager, out var singleton, out _)) return;
|
||||
var stats = EntityManager.GetComponentData<Demo2CycleStats>(singleton);
|
||||
var materialQuery = GetEntityQuery(typeof(Demo2GridPosition), typeof(Demo2MaterialState));
|
||||
var machineQuery = GetEntityQuery(typeof(Demo2GridPosition), typeof(Demo2MachineState));
|
||||
using var materials = materialQuery.ToEntityArray(Allocator.Temp);
|
||||
using var materialPositions = materialQuery.ToComponentDataArray<Demo2GridPosition>(Allocator.Temp);
|
||||
using var materialStates = materialQuery.ToComponentDataArray<Demo2MaterialState>(Allocator.Temp);
|
||||
using var machines = machineQuery.ToEntityArray(Allocator.Temp);
|
||||
using var machinePositions = machineQuery.ToComponentDataArray<Demo2GridPosition>(Allocator.Temp);
|
||||
for (var m = 0; m < materials.Length; m++)
|
||||
{
|
||||
if (!EntityManager.Exists(materials[m])) continue;
|
||||
for (var i = 0; i < machines.Length; i++)
|
||||
{
|
||||
if (materialPositions[m].X != machinePositions[i].X || materialPositions[m].Y != machinePositions[i].Y) continue;
|
||||
var machine = EntityManager.GetComponentData<Demo2MachineState>(machines[i]);
|
||||
if (machine.Kind is Demo2MachineKind.Conveyor or Demo2MachineKind.Splitter or Demo2MachineKind.Miner or Demo2MachineKind.Generator or Demo2MachineKind.Turret) continue;
|
||||
if (machine.StoredInput + materialStates[m].Quantity > machine.Capacity) continue;
|
||||
machine.StoredInput += materialStates[m].Quantity;
|
||||
EntityManager.SetComponentData(machines[i], machine);
|
||||
EntityManager.DestroyEntity(materials[m]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
stats.IronFuelAdjacent = HasAdjacentMaterial(materialPositions, materialStates, Demo2MaterialKind.IronOre, Demo2MaterialKind.Fuel) ? (byte)1 : (byte)0;
|
||||
EntityManager.SetComponentData(singleton, stats);
|
||||
}
|
||||
|
||||
private static bool HasAdjacentMaterial(NativeArray<Demo2GridPosition> positions, NativeArray<Demo2MaterialState> materials, Demo2MaterialKind a, Demo2MaterialKind b)
|
||||
{
|
||||
for (var i = 0; i < positions.Length; i++)
|
||||
for (var j = i + 1; j < positions.Length; j++)
|
||||
if (((materials[i].Kind == a && materials[j].Kind == b) || (materials[i].Kind == b && materials[j].Kind == a)) &&
|
||||
Math.Abs(positions[i].X - positions[j].X) + Math.Abs(positions[i].Y - positions[j].Y) == 1) return true;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
[DisableAutoCreation]
|
||||
public sealed partial class Demo2ProcessingSystem : SystemBase
|
||||
{
|
||||
protected override void OnUpdate()
|
||||
{
|
||||
if (!Demo2SystemUtility.TryGetProductionState(EntityManager, out var singleton, out _)) return;
|
||||
var stats = EntityManager.GetComponentData<Demo2CycleStats>(singleton);
|
||||
stats.Faults = 0;
|
||||
var query = GetEntityQuery(typeof(Demo2MachineState), typeof(Demo2RecipeState));
|
||||
using var entities = query.ToEntityArray(Allocator.Temp);
|
||||
for (var i = 0; i < entities.Length; i++)
|
||||
{
|
||||
var machine = EntityManager.GetComponentData<Demo2MachineState>(entities[i]);
|
||||
if (machine.Kind is Demo2MachineKind.Miner or Demo2MachineKind.Generator or Demo2MachineKind.Conveyor or Demo2MachineKind.Splitter or Demo2MachineKind.Turret) continue;
|
||||
var recipe = EntityManager.GetComponentData<Demo2RecipeState>(entities[i]);
|
||||
var needed = Math.Max(1, recipe.InputCountA + recipe.InputCountB);
|
||||
if (machine.StoredInput < needed) continue;
|
||||
machine.ProgressTicks++;
|
||||
if (machine.ProgressTicks >= Math.Max(1, machine.ProcessTicks))
|
||||
{
|
||||
machine.ProgressTicks = 0;
|
||||
machine.StoredInput -= needed;
|
||||
machine.PendingOutputs += Math.Max(1, recipe.OutputCount);
|
||||
stats.Processed = SaturatingMath.Add(stats.Processed, 1);
|
||||
stats.FirstBatch = stats.Processed == 1 ? (byte)1 : stats.FirstBatch;
|
||||
if (stats.LastRecipeId == machine.RecipeId) stats.CompletedSameRecipeStreak++;
|
||||
else { stats.LastRecipeId = machine.RecipeId; stats.CompletedSameRecipeStreak = 1; }
|
||||
}
|
||||
stats.Faults += machine.Faults;
|
||||
EntityManager.SetComponentData(entities[i], machine);
|
||||
}
|
||||
EntityManager.SetComponentData(singleton, stats);
|
||||
}
|
||||
}
|
||||
|
||||
[DisableAutoCreation]
|
||||
public sealed partial class Demo2OutputSystem : SystemBase
|
||||
{
|
||||
protected override void OnUpdate()
|
||||
{
|
||||
if (!Demo2SystemUtility.TryGetProductionState(EntityManager, out var singleton, out var simulation)) return;
|
||||
var stats = EntityManager.GetComponentData<Demo2CycleStats>(singleton);
|
||||
var query = GetEntityQuery(typeof(Demo2GridPosition), typeof(Demo2MachineState), typeof(Demo2RecipeState));
|
||||
using var entities = query.ToEntityArray(Allocator.Temp);
|
||||
using var positions = query.ToComponentDataArray<Demo2GridPosition>(Allocator.Temp);
|
||||
for (var i = 0; i < entities.Length; i++)
|
||||
{
|
||||
var machine = EntityManager.GetComponentData<Demo2MachineState>(entities[i]);
|
||||
if (machine.PendingOutputs <= 0) continue;
|
||||
var recipe = EntityManager.GetComponentData<Demo2RecipeState>(entities[i]);
|
||||
var quantity = machine.PendingOutputs;
|
||||
if (stats.DuplicateNextOutputs > 0) { quantity *= 2; stats.DuplicateNextOutputs--; }
|
||||
simulation.NextStableId++;
|
||||
Demo2EcsFactory.CreateMaterial(EntityManager, simulation.NextStableId, recipe.Output, positions[i].X, positions[i].Y, machine.Rotation, quantity);
|
||||
if (recipe.Output == Demo2MaterialKind.Ammo) stats.AmmoProduced = SaturatingMath.Add(stats.AmmoProduced, quantity);
|
||||
machine.PendingOutputs = 0;
|
||||
EntityManager.SetComponentData(entities[i], machine);
|
||||
}
|
||||
EntityManager.SetComponentData(singleton, simulation);
|
||||
EntityManager.SetComponentData(singleton, stats);
|
||||
}
|
||||
}
|
||||
|
||||
[DisableAutoCreation]
|
||||
public sealed partial class Demo2RuleTriggerSystem : SystemBase
|
||||
{
|
||||
protected override void OnUpdate()
|
||||
{
|
||||
var query = GetEntityQuery(typeof(Demo2SimulationState), typeof(Demo2EconomyState), typeof(Demo2CycleStats), typeof(Demo2RuleInstruction));
|
||||
if (query.IsEmptyIgnoreFilter) return;
|
||||
var singleton = query.GetSingletonEntity();
|
||||
var simulation = EntityManager.GetComponentData<Demo2SimulationState>(singleton);
|
||||
if (simulation.Phase != Demo2Phase.Defense || simulation.RuleAppliedCycle == simulation.Cycle) return;
|
||||
var economy = EntityManager.GetComponentData<Demo2EconomyState>(singleton);
|
||||
var stats = EntityManager.GetComponentData<Demo2CycleStats>(singleton);
|
||||
var context = new Demo2RuleContext
|
||||
{
|
||||
Payload = economy.Payload,
|
||||
MultiplierMilli = economy.MultiplierMilli,
|
||||
Energy = economy.Energy,
|
||||
Money = economy.Money,
|
||||
ExcessFirepower = economy.ExcessFirepower,
|
||||
Faults = stats.Faults,
|
||||
ThreeSameRecipes = stats.CompletedSameRecipeStreak >= 3,
|
||||
IronFuelAdjacent = stats.IronFuelAdjacent != 0,
|
||||
BeltBelowEightyPercent = stats.BeltCapacity <= 0 || stats.BeltOccupancy * 100 < stats.BeltCapacity * 80,
|
||||
FirstBatch = stats.FirstBatch != 0,
|
||||
CoreAtRisk = EntityManager.GetComponentData<Demo2CoreHealth>(singleton).Value <= 1,
|
||||
DuplicatedOutputs = stats.DuplicateNextOutputs
|
||||
};
|
||||
var instructions = EntityManager.GetBuffer<Demo2RuleInstruction>(singleton);
|
||||
for (var i = 0; i < instructions.Length; i++)
|
||||
{
|
||||
var instruction = instructions[i];
|
||||
var data = new Demo2RuleInstructionData { Opcode = instruction.Opcode, Condition = instruction.Condition, Operand = instruction.Operand };
|
||||
if (Demo2RuleEngine.Matches(data.Condition, context)) Demo2RuleEngine.Apply(ref context, data);
|
||||
}
|
||||
economy.Payload = context.Payload;
|
||||
economy.MultiplierMilli = context.MultiplierMilli;
|
||||
economy.Energy = context.Energy;
|
||||
economy.Money = context.Money;
|
||||
stats.Faults = context.Faults;
|
||||
stats.DuplicateNextOutputs = context.DuplicatedOutputs;
|
||||
simulation.RuleAppliedCycle = simulation.Cycle;
|
||||
EntityManager.SetComponentData(singleton, simulation);
|
||||
EntityManager.SetComponentData(singleton, economy);
|
||||
EntityManager.SetComponentData(singleton, stats);
|
||||
}
|
||||
}
|
||||
|
||||
[DisableAutoCreation]
|
||||
public sealed partial class Demo2TurretLoadingSystem : SystemBase
|
||||
{
|
||||
protected override void OnUpdate()
|
||||
{
|
||||
if (!Demo2SystemUtility.TryGetProductionState(EntityManager, out _, out _)) return;
|
||||
var materialQuery = GetEntityQuery(typeof(Demo2MaterialState));
|
||||
var turretQuery = GetEntityQuery(typeof(Demo2TurretAmmo), typeof(Demo2StableId));
|
||||
if (turretQuery.IsEmptyIgnoreFilter) return;
|
||||
using var turretEntities = turretQuery.ToEntityArray(Allocator.Temp);
|
||||
using var turretIds = turretQuery.ToComponentDataArray<Demo2StableId>(Allocator.Temp);
|
||||
var turret = turretEntities[0];
|
||||
var lowestId = turretIds[0].Value;
|
||||
for (var i = 1; i < turretEntities.Length; i++)
|
||||
if (turretIds[i].Value < lowestId)
|
||||
{
|
||||
turret = turretEntities[i];
|
||||
lowestId = turretIds[i].Value;
|
||||
}
|
||||
var ammo = EntityManager.GetComponentData<Demo2TurretAmmo>(turret);
|
||||
using var entities = materialQuery.ToEntityArray(Allocator.Temp);
|
||||
using var materials = materialQuery.ToComponentDataArray<Demo2MaterialState>(Allocator.Temp);
|
||||
for (var i = 0; i < entities.Length; i++)
|
||||
{
|
||||
if (materials[i].Kind != Demo2MaterialKind.Ammo || !EntityManager.Exists(entities[i])) continue;
|
||||
ammo.Value = SaturatingMath.Add(ammo.Value, materials[i].Quantity);
|
||||
EntityManager.DestroyEntity(entities[i]);
|
||||
}
|
||||
EntityManager.SetComponentData(turret, ammo);
|
||||
}
|
||||
}
|
||||
|
||||
[DisableAutoCreation]
|
||||
public sealed partial class Demo2CycleStatisticsSystem : SystemBase
|
||||
{
|
||||
protected override void OnUpdate()
|
||||
{
|
||||
var query = GetEntityQuery(typeof(Demo2SimulationState), typeof(Demo2EconomyState), typeof(Demo2CycleStats));
|
||||
if (query.IsEmptyIgnoreFilter) return;
|
||||
var singleton = query.GetSingletonEntity();
|
||||
var simulation = EntityManager.GetComponentData<Demo2SimulationState>(singleton);
|
||||
if (simulation.Phase != Demo2Phase.Production) return;
|
||||
simulation.Tick++;
|
||||
var stats = EntityManager.GetComponentData<Demo2CycleStats>(singleton);
|
||||
var economy = EntityManager.GetComponentData<Demo2EconomyState>(singleton);
|
||||
economy.Payload = SaturatingMath.Add(economy.Payload, stats.AmmoProduced);
|
||||
stats.AmmoProduced = 0;
|
||||
EntityManager.SetComponentData(singleton, simulation);
|
||||
EntityManager.SetComponentData(singleton, stats);
|
||||
EntityManager.SetComponentData(singleton, economy);
|
||||
}
|
||||
}
|
||||
|
||||
[DisableAutoCreation]
|
||||
public sealed partial class Demo2StateHashSystem : SystemBase
|
||||
{
|
||||
protected override void OnUpdate()
|
||||
{
|
||||
var singletonQuery = GetEntityQuery(typeof(Demo2SimulationState), typeof(Demo2EconomyState), typeof(Demo2CoreHealth));
|
||||
if (singletonQuery.IsEmptyIgnoreFilter) return;
|
||||
var singleton = singletonQuery.GetSingletonEntity();
|
||||
var simulation = EntityManager.GetComponentData<Demo2SimulationState>(singleton);
|
||||
var economy = EntityManager.GetComponentData<Demo2EconomyState>(singleton);
|
||||
var core = EntityManager.GetComponentData<Demo2CoreHealth>(singleton);
|
||||
var stats = EntityManager.GetComponentData<Demo2CycleStats>(singleton);
|
||||
var hash = Demo2Hash.Offset;
|
||||
Demo2Hash.Add(ref hash, simulation.Tick);
|
||||
Demo2Hash.Add(ref hash, simulation.Seed);
|
||||
Demo2Hash.Add(ref hash, (int)simulation.Phase);
|
||||
Demo2Hash.Add(ref hash, simulation.Cycle);
|
||||
Demo2Hash.Add(ref hash, simulation.RuleAppliedCycle);
|
||||
Demo2Hash.Add(ref hash, simulation.SpeedMultiplier);
|
||||
Demo2Hash.Add(ref hash, economy.Money);
|
||||
Demo2Hash.Add(ref hash, economy.Payload);
|
||||
Demo2Hash.Add(ref hash, economy.MultiplierMilli);
|
||||
Demo2Hash.Add(ref hash, economy.Energy);
|
||||
Demo2Hash.Add(ref hash, economy.ExcessFirepower);
|
||||
Demo2Hash.Add(ref hash, core.Value);
|
||||
Demo2Hash.Add(ref hash, stats.Extracted);
|
||||
Demo2Hash.Add(ref hash, stats.Transported);
|
||||
Demo2Hash.Add(ref hash, stats.Processed);
|
||||
Demo2Hash.Add(ref hash, stats.AmmoProduced);
|
||||
Demo2Hash.Add(ref hash, stats.CompletedSameRecipeStreak);
|
||||
Demo2Hash.Add(ref hash, stats.LastRecipeId);
|
||||
Demo2Hash.Add(ref hash, stats.Faults);
|
||||
Demo2Hash.Add(ref hash, stats.BeltOccupancy);
|
||||
Demo2Hash.Add(ref hash, stats.BeltCapacity);
|
||||
Demo2Hash.Add(ref hash, stats.IronFuelAdjacent);
|
||||
Demo2Hash.Add(ref hash, stats.FirstBatch);
|
||||
Demo2Hash.Add(ref hash, stats.DuplicateNextOutputs);
|
||||
|
||||
var query = GetEntityQuery(typeof(Demo2StableId));
|
||||
using var entities = query.ToEntityArray(Allocator.Temp);
|
||||
using var ids = query.ToComponentDataArray<Demo2StableId>(Allocator.Temp);
|
||||
var rows = new NativeArray<Demo2HashRow>(entities.Length, Allocator.Temp);
|
||||
for (var i = 0; i < entities.Length; i++)
|
||||
{
|
||||
var row = new Demo2HashRow { StableId = ids[i].Value };
|
||||
if (EntityManager.HasComponent<Demo2GridPosition>(entities[i]))
|
||||
{
|
||||
var position = EntityManager.GetComponentData<Demo2GridPosition>(entities[i]);
|
||||
row.X = position.X;
|
||||
row.Y = position.Y;
|
||||
}
|
||||
if (EntityManager.HasComponent<Demo2MachineState>(entities[i]))
|
||||
{
|
||||
var machine = EntityManager.GetComponentData<Demo2MachineState>(entities[i]);
|
||||
row.Kind = (int)machine.Kind;
|
||||
row.Rotation = machine.Rotation;
|
||||
row.Enabled = machine.Enabled;
|
||||
row.RecipeId = machine.RecipeId;
|
||||
row.StoredInput = machine.StoredInput;
|
||||
row.ProgressTicks = machine.ProgressTicks;
|
||||
row.ProcessTicks = machine.ProcessTicks;
|
||||
row.Capacity = machine.Capacity;
|
||||
row.PendingOutputs = machine.PendingOutputs;
|
||||
row.Faults = machine.Faults;
|
||||
if (EntityManager.HasComponent<Demo2TurretAmmo>(entities[i]))
|
||||
row.TurretAmmo = EntityManager.GetComponentData<Demo2TurretAmmo>(entities[i]).Value;
|
||||
}
|
||||
if (EntityManager.HasComponent<Demo2MaterialState>(entities[i]))
|
||||
{
|
||||
var material = EntityManager.GetComponentData<Demo2MaterialState>(entities[i]);
|
||||
row.Kind = (int)material.Kind;
|
||||
row.Quantity = material.Quantity;
|
||||
row.SubCellProgress = material.SubCellProgress;
|
||||
row.Rotation = material.Direction;
|
||||
}
|
||||
rows[i] = row;
|
||||
}
|
||||
rows.Sort();
|
||||
for (var i = 0; i < rows.Length; i++)
|
||||
{
|
||||
var row = rows[i];
|
||||
Demo2Hash.Add(ref hash, row.StableId);
|
||||
Demo2Hash.Add(ref hash, row.X);
|
||||
Demo2Hash.Add(ref hash, row.Y);
|
||||
Demo2Hash.Add(ref hash, row.Kind);
|
||||
Demo2Hash.Add(ref hash, row.Rotation);
|
||||
Demo2Hash.Add(ref hash, row.Enabled);
|
||||
Demo2Hash.Add(ref hash, row.RecipeId);
|
||||
Demo2Hash.Add(ref hash, row.StoredInput);
|
||||
Demo2Hash.Add(ref hash, row.ProgressTicks);
|
||||
Demo2Hash.Add(ref hash, row.ProcessTicks);
|
||||
Demo2Hash.Add(ref hash, row.Capacity);
|
||||
Demo2Hash.Add(ref hash, row.PendingOutputs);
|
||||
Demo2Hash.Add(ref hash, row.Faults);
|
||||
Demo2Hash.Add(ref hash, row.Quantity);
|
||||
Demo2Hash.Add(ref hash, row.SubCellProgress);
|
||||
Demo2Hash.Add(ref hash, row.TurretAmmo);
|
||||
}
|
||||
rows.Dispose();
|
||||
simulation.StateHash = hash;
|
||||
EntityManager.SetComponentData(singleton, simulation);
|
||||
}
|
||||
|
||||
private struct Demo2HashRow : IComparable<Demo2HashRow>
|
||||
{
|
||||
public int StableId;
|
||||
public int X;
|
||||
public int Y;
|
||||
public int Kind;
|
||||
public int Rotation;
|
||||
public int Enabled;
|
||||
public int RecipeId;
|
||||
public int StoredInput;
|
||||
public int ProgressTicks;
|
||||
public int ProcessTicks;
|
||||
public int Capacity;
|
||||
public int PendingOutputs;
|
||||
public int Faults;
|
||||
public int Quantity;
|
||||
public int SubCellProgress;
|
||||
public long TurretAmmo;
|
||||
|
||||
public int CompareTo(Demo2HashRow other) => StableId.CompareTo(other.StableId);
|
||||
}
|
||||
}
|
||||
|
||||
internal static class Demo2SystemUtility
|
||||
{
|
||||
public static bool TryGetProductionState(EntityManager manager, out Entity singleton, out Demo2SimulationState simulation)
|
||||
{
|
||||
var query = manager.CreateEntityQuery(typeof(Demo2SimulationState));
|
||||
if (query.IsEmptyIgnoreFilter) { singleton = Entity.Null; simulation = default; return false; }
|
||||
singleton = query.GetSingletonEntity();
|
||||
simulation = manager.GetComponentData<Demo2SimulationState>(singleton);
|
||||
return simulation.Phase == Demo2Phase.Production;
|
||||
}
|
||||
|
||||
public static void Move(ref Demo2GridPosition position, byte direction)
|
||||
{
|
||||
switch (direction & 3)
|
||||
{
|
||||
case 0: position.X++; break;
|
||||
case 1: position.Y--; break;
|
||||
case 2: position.X--; break;
|
||||
case 3: position.Y++; break;
|
||||
}
|
||||
if (position.X < 0) position.X = 0;
|
||||
if (position.X >= Demo2Protocol.GridWidth) position.X = Demo2Protocol.GridWidth - 1;
|
||||
if (position.Y < 0) position.Y = 0;
|
||||
if (position.Y >= Demo2Protocol.GridHeight) position.Y = Demo2Protocol.GridHeight - 1;
|
||||
}
|
||||
}
|
||||
|
||||
internal static class Demo2Hash
|
||||
{
|
||||
public const ulong Offset = 14695981039346656037UL;
|
||||
private const ulong Prime = 1099511628211UL;
|
||||
public static void Add(ref ulong hash, long value) { unchecked { hash ^= (ulong)value; hash *= Prime; } }
|
||||
public static void Add(ref ulong hash, ulong value) { unchecked { hash ^= value; hash *= Prime; } }
|
||||
public static void Add(ref ulong hash, int value) => Add(ref hash, (long)value);
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e5d69845118ea8f458a29670df8f6bb6
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 608e0eb12b1ea184ea807553c660fb51
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,22 +0,0 @@
|
||||
{
|
||||
"name": "Demo2.Editor",
|
||||
"rootNamespace": "Demo2.Editor",
|
||||
"references": [
|
||||
"Demo2.Domain",
|
||||
"Demo2.ECS",
|
||||
"Demo2.Runtime",
|
||||
"ShrinkTutorial.Runtime",
|
||||
"Unity.Entities",
|
||||
"Unity.Collections",
|
||||
"UnityEngine.UI",
|
||||
"Unity.TextMeshPro"
|
||||
],
|
||||
"includePlatforms": ["Editor"],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": false
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 59701a5ff622be749ac040666dd6a7a0
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,323 +0,0 @@
|
||||
#nullable enable
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using Demo2.Runtime;
|
||||
using ShrinkTutorial;
|
||||
using TMPro;
|
||||
using UnityEditor;
|
||||
using UnityEditor.Build.Reporting;
|
||||
using UnityEditor.SceneManagement;
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
using UnityEngine.SceneManagement;
|
||||
using UnityEngine.UIElements;
|
||||
|
||||
namespace Demo2.Editor
|
||||
{
|
||||
public static class Demo2SceneBuilder
|
||||
{
|
||||
private const string Root = "Assets/Demos/Demo2";
|
||||
private const string Art = Root + "/Art";
|
||||
private const string Ui = Root + "/UI";
|
||||
private const string ResourceRoot = Root + "/Resources";
|
||||
private const string PrefabPath = Root + "/Prefabs/Demo2Root.prefab";
|
||||
private const string ScenePath = Root + "/Demo2.unity";
|
||||
private const string UxmlPath = Ui + "/Demo2.uxml";
|
||||
private const string UssPath = Ui + "/Demo2.uss";
|
||||
private const string PanelSettingsPath = Ui + "/Demo2PanelSettings.asset";
|
||||
private const string ThemePath = Ui + "/Demo2RuntimeTheme.tss";
|
||||
private const string FontPath = Art + "/NotoSansSC-Variable.ttf";
|
||||
private const string TutorialFontPath = Art + "/TutorialChinese SDF.asset";
|
||||
|
||||
private static readonly string[] MachineNames = { "miner", "conveyor", "splitter", "smelter", "assembler", "loader", "turret", "generator" };
|
||||
private static readonly string[] TutorialAnchorIds = { "demo2.miner", "demo2.conveyor", "demo2.grid", "demo2.smelter", "demo2.recipe", "demo2.turret", "demo2.ready", "demo2.reward" };
|
||||
|
||||
private static Sprite? _floor;
|
||||
private static Sprite[] _machineSprites = Array.Empty<Sprite>();
|
||||
private static Texture2D? _itemTexture;
|
||||
private static Font? _font;
|
||||
private static TMP_FontAsset? _tutorialFont;
|
||||
|
||||
[MenuItem("ShrinkSDK/Demo2/创建规则工厂 Demo")]
|
||||
public static void Build()
|
||||
{
|
||||
EnsureDirectories();
|
||||
ConfigureArt();
|
||||
LoadAssets();
|
||||
BuildTutorialAssets();
|
||||
var panelSettings = BuildPanelSettings();
|
||||
var root = BuildRoot(panelSettings);
|
||||
PrefabUtility.SaveAsPrefabAsset(root, PrefabPath);
|
||||
UnityEngine.Object.DestroyImmediate(root);
|
||||
|
||||
var scene = EditorSceneManager.NewScene(NewSceneSetup.EmptyScene, NewSceneMode.Single);
|
||||
var prefab = AssetDatabase.LoadAssetAtPath<GameObject>(PrefabPath) ?? throw new InvalidOperationException("Demo2 root prefab was not created.");
|
||||
PrefabUtility.InstantiatePrefab(prefab, scene);
|
||||
var eventSystem = new GameObject("EventSystem", typeof(EventSystem), typeof(StandaloneInputModule));
|
||||
Undo.RegisterCreatedObjectUndo(eventSystem, "Create Demo2 EventSystem");
|
||||
EditorSceneManager.MarkSceneDirty(scene);
|
||||
EditorSceneManager.SaveScene(scene, ScenePath);
|
||||
AddSceneToBuildSettings();
|
||||
AssetDatabase.SaveAssets();
|
||||
AssetDatabase.Refresh();
|
||||
Selection.activeObject = AssetDatabase.LoadAssetAtPath<SceneAsset>(ScenePath);
|
||||
Debug.Log($"[Demo2] Created UI Toolkit prefab {PrefabPath} and scene {ScenePath}");
|
||||
}
|
||||
|
||||
[MenuItem("ShrinkSDK/Demo2/构建 Headless Server")]
|
||||
public static void BuildHeadlessServer()
|
||||
{
|
||||
if (!File.Exists(Path.GetFullPath(ScenePath))) Build();
|
||||
var output = Path.GetFullPath("Builds/Demo2Headless/Demo2Server.exe");
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(output)!);
|
||||
var options = new BuildPlayerOptions
|
||||
{
|
||||
scenes = new[] { ScenePath },
|
||||
locationPathName = output,
|
||||
target = BuildTarget.StandaloneWindows64,
|
||||
subtarget = (int)StandaloneBuildSubtarget.Server,
|
||||
options = BuildOptions.CleanBuildCache
|
||||
};
|
||||
var report = BuildPipeline.BuildPlayer(options);
|
||||
if (report.summary.result != BuildResult.Succeeded)
|
||||
throw new InvalidOperationException("Demo2 headless build failed: " + report.summary.result);
|
||||
Debug.Log($"[Demo2] Headless server built: {output} ({report.summary.totalSize} bytes)");
|
||||
}
|
||||
|
||||
private static GameObject BuildRoot(PanelSettings panelSettings)
|
||||
{
|
||||
var root = new GameObject("Demo2Root", typeof(Demo2DemoController), typeof(Demo2HeadlessBootstrap));
|
||||
var cameraObject = new GameObject("WorldCamera", typeof(Camera), typeof(AudioListener));
|
||||
cameraObject.tag = "MainCamera";
|
||||
cameraObject.transform.SetParent(root.transform, false);
|
||||
cameraObject.transform.position = new Vector3(16, 10, -20);
|
||||
var camera = cameraObject.GetComponent<Camera>();
|
||||
camera.orthographic = true;
|
||||
camera.orthographicSize = 11.6f;
|
||||
camera.clearFlags = CameraClearFlags.SolidColor;
|
||||
camera.backgroundColor = Hex("101419");
|
||||
|
||||
var factoryWorld = new GameObject("FactoryWorld");
|
||||
factoryWorld.transform.SetParent(root.transform, false);
|
||||
var floorObject = new GameObject("FactoryFloor", typeof(SpriteRenderer));
|
||||
floorObject.transform.SetParent(factoryWorld.transform, false);
|
||||
floorObject.transform.position = new Vector3(16, 10, 1);
|
||||
var floorRenderer = floorObject.GetComponent<SpriteRenderer>();
|
||||
floorRenderer.sprite = _floor;
|
||||
floorRenderer.sortingOrder = -10;
|
||||
if (_floor != null)
|
||||
{
|
||||
var size = _floor.bounds.size;
|
||||
floorObject.transform.localScale = new Vector3(32f / size.x, 20f / size.y, 1);
|
||||
}
|
||||
|
||||
var proxyObject = new GameObject("MachineProxyPool", typeof(Demo2MachineProxyPool));
|
||||
proxyObject.transform.SetParent(factoryWorld.transform, false);
|
||||
var proxyPool = proxyObject.GetComponent<Demo2MachineProxyPool>();
|
||||
proxyPool.SetSprites(_machineSprites);
|
||||
var itemObject = new GameObject("ItemBatchRenderer", typeof(Demo2ItemBatchRenderer));
|
||||
itemObject.transform.SetParent(factoryWorld.transform, false);
|
||||
var itemRenderer = itemObject.GetComponent<Demo2ItemBatchRenderer>();
|
||||
SetObject(itemRenderer, "itemTexture", _itemTexture);
|
||||
|
||||
var uiObject = new GameObject("UI", typeof(UIDocument));
|
||||
uiObject.transform.SetParent(root.transform, false);
|
||||
var document = uiObject.GetComponent<UIDocument>();
|
||||
document.panelSettings = panelSettings;
|
||||
document.visualTreeAsset = AssetDatabase.LoadAssetAtPath<VisualTreeAsset>(UxmlPath) ?? throw new InvalidOperationException("Demo2 UXML is missing.");
|
||||
document.sortingOrder = 0;
|
||||
|
||||
var tutorialAnchorRoot = CreateTutorialAnchors(root.transform);
|
||||
var controller = root.GetComponent<Demo2DemoController>();
|
||||
SetObject(controller, "worldCamera", camera);
|
||||
SetObject(controller, "proxyPool", proxyPool);
|
||||
SetObject(controller, "itemBatchRenderer", itemRenderer);
|
||||
SetObject(controller, "uiDocument", document);
|
||||
SetObject(controller, "uiStyleSheet", AssetDatabase.LoadAssetAtPath<StyleSheet>(UssPath));
|
||||
SetObject(controller, "titleBackground", _floor);
|
||||
SetObject(controller, "uiFont", _font);
|
||||
SetObject(controller, "tutorialFont", _tutorialFont);
|
||||
SetObject(controller, "tutorialAnchorRoot", tutorialAnchorRoot);
|
||||
SetObjectArray(controller, "machineIcons", _machineSprites);
|
||||
return root;
|
||||
}
|
||||
|
||||
private static RectTransform CreateTutorialAnchors(Transform parent)
|
||||
{
|
||||
var root = new GameObject("TutorialAnchors", typeof(RectTransform)).GetComponent<RectTransform>();
|
||||
root.SetParent(parent, false);
|
||||
root.anchorMin = Vector2.zero;
|
||||
root.anchorMax = Vector2.zero;
|
||||
root.pivot = Vector2.zero;
|
||||
root.anchoredPosition = Vector2.zero;
|
||||
root.sizeDelta = new Vector2(1920, 1080);
|
||||
foreach (var id in TutorialAnchorIds)
|
||||
{
|
||||
var child = new GameObject(id, typeof(RectTransform), typeof(ShrinkTutorialAnchor)).GetComponent<RectTransform>();
|
||||
child.SetParent(root, false);
|
||||
child.anchorMin = Vector2.zero;
|
||||
child.anchorMax = Vector2.zero;
|
||||
child.pivot = Vector2.zero;
|
||||
child.sizeDelta = new Vector2(64, 64);
|
||||
child.GetComponent<ShrinkTutorialAnchor>().SetAnchorId(id);
|
||||
child.gameObject.SetActive(false);
|
||||
}
|
||||
return root;
|
||||
}
|
||||
|
||||
private static PanelSettings BuildPanelSettings()
|
||||
{
|
||||
DeleteAssetIfExists(PanelSettingsPath);
|
||||
var settings = ScriptableObject.CreateInstance<PanelSettings>();
|
||||
settings.name = "Demo2PanelSettings";
|
||||
settings.themeStyleSheet = AssetDatabase.LoadAssetAtPath<ThemeStyleSheet>(ThemePath) ?? throw new InvalidOperationException("Demo2 runtime theme is missing.");
|
||||
settings.scaleMode = PanelScaleMode.ScaleWithScreenSize;
|
||||
settings.referenceResolution = new Vector2Int(1920, 1080);
|
||||
settings.screenMatchMode = PanelScreenMatchMode.MatchWidthOrHeight;
|
||||
settings.match = 0.5f;
|
||||
settings.sortingOrder = 0;
|
||||
settings.clearColor = false;
|
||||
AssetDatabase.CreateAsset(settings, PanelSettingsPath);
|
||||
if (AssetDatabase.IsValidFolder("Assets/UI Toolkit")) AssetDatabase.DeleteAsset("Assets/UI Toolkit");
|
||||
return settings;
|
||||
}
|
||||
|
||||
private static void ConfigureArt()
|
||||
{
|
||||
AssetDatabase.Refresh();
|
||||
foreach (var path in AssetDatabase.FindAssets("t:Texture2D", new[] { Art }).Select(AssetDatabase.GUIDToAssetPath).Where(path => path.EndsWith(".png", StringComparison.OrdinalIgnoreCase)))
|
||||
{
|
||||
if (AssetImporter.GetAtPath(path) is not TextureImporter importer) continue;
|
||||
importer.textureType = TextureImporterType.Sprite;
|
||||
importer.spriteImportMode = SpriteImportMode.Single;
|
||||
importer.spritePixelsPerUnit = path.EndsWith("factory-floor.png", StringComparison.OrdinalIgnoreCase) ? 64 : 1024;
|
||||
importer.mipmapEnabled = false;
|
||||
importer.alphaIsTransparency = true;
|
||||
importer.textureCompression = TextureImporterCompression.CompressedHQ;
|
||||
importer.maxTextureSize = path.EndsWith("factory-floor.png", StringComparison.OrdinalIgnoreCase) ? 2048 : 1024;
|
||||
importer.SaveAndReimport();
|
||||
}
|
||||
if (AssetDatabase.LoadAssetAtPath<Font>(FontPath) == null)
|
||||
{
|
||||
const string source = "Assets/Demos/ReplacedPerson/Art/NotoSansSC-Variable.ttf";
|
||||
if (!AssetDatabase.CopyAsset(source, FontPath)) throw new InvalidOperationException("Could not copy the Chinese UI Toolkit font.");
|
||||
}
|
||||
if (AssetDatabase.LoadAssetAtPath<TMP_FontAsset>(TutorialFontPath) == null)
|
||||
{
|
||||
const string source = "Assets/Demos/ReplacedPerson/Art/NotoSansSC SDF.asset";
|
||||
if (!AssetDatabase.CopyAsset(source, TutorialFontPath)) throw new InvalidOperationException("Could not copy the Chinese tutorial TMP font.");
|
||||
}
|
||||
}
|
||||
|
||||
private static void LoadAssets()
|
||||
{
|
||||
_font = AssetDatabase.LoadAssetAtPath<Font>(FontPath) ?? throw new InvalidOperationException("Demo2 UI Toolkit font is missing.");
|
||||
_tutorialFont = AssetDatabase.LoadAssetAtPath<TMP_FontAsset>(TutorialFontPath) ?? throw new InvalidOperationException("Demo2 tutorial font is missing.");
|
||||
_floor = AssetDatabase.LoadAssetAtPath<Sprite>(Art + "/factory-floor.png");
|
||||
_itemTexture = AssetDatabase.LoadAssetAtPath<Texture2D>(Art + "/material-crate.png");
|
||||
_machineSprites = MachineNames.Select(name => AssetDatabase.LoadAssetAtPath<Sprite>($"{Art}/machine-{name}.png")).ToArray()!;
|
||||
if (_floor == null || _itemTexture == null || _machineSprites.Any(sprite => sprite == null)) throw new InvalidOperationException("Demo2 art import is incomplete.");
|
||||
}
|
||||
|
||||
private static void EnsureDirectories()
|
||||
{
|
||||
foreach (var path in new[] { Root, Art, Ui, Root + "/Prefabs", ResourceRoot })
|
||||
if (!AssetDatabase.IsValidFolder(path))
|
||||
{
|
||||
var slash = path.LastIndexOf('/');
|
||||
AssetDatabase.CreateFolder(path[..slash], path[(slash + 1)..]);
|
||||
}
|
||||
}
|
||||
|
||||
private static void BuildTutorialAssets()
|
||||
{
|
||||
DeleteAssetIfExists(ResourceRoot + "/Demo2FirstCycleTutorial.asset");
|
||||
DeleteAssetIfExists(ResourceRoot + "/Demo2TutorialDatabase.asset");
|
||||
DeleteAssetIfExists(ResourceRoot + "/Demo2TutorialSettings.asset");
|
||||
var tutorial = ScriptableObject.CreateInstance<ShrinkTutorialData>();
|
||||
tutorial.tutorialId = "demo2.first-cycle";
|
||||
tutorial.steps = new List<ShrinkTutorialStep>
|
||||
{
|
||||
TutorialStep("demo2.miner", "demo2.miner-selected", "选择采集器,准备建立新的铁矿入口。", ShrinkTutorialDialogAnchor.Right),
|
||||
TutorialStep("demo2.grid", "demo2.miner-placed", "在空网格放置采集器。", ShrinkTutorialDialogAnchor.Top),
|
||||
TutorialStep("demo2.conveyor", "demo2.conveyor-selected", "选择传送带,准备连接生产线。", ShrinkTutorialDialogAnchor.Right),
|
||||
TutorialStep("demo2.grid", "demo2.conveyor-placed", "在网格放置传送带,把产物送向加工区。", ShrinkTutorialDialogAnchor.Top),
|
||||
TutorialStep("demo2.smelter", "demo2.smelter-selected", "选择熔炼机,准备把矿石加工为铁锭。", ShrinkTutorialDialogAnchor.Right),
|
||||
TutorialStep("demo2.recipe", "demo2.recipe-selected", "确认当前机器配方。配方决定输入、产出与加工周期。", ShrinkTutorialDialogAnchor.Top),
|
||||
TutorialStep("demo2.turret", "demo2.turret-selected", "选择自动炮塔,准备连接防线。", ShrinkTutorialDialogAnchor.Right),
|
||||
TutorialStep("demo2.grid", "demo2.turret-placed", "在网格放置炮塔。生产的弹药会在结算阶段自动消耗。", ShrinkTutorialDialogAnchor.Top),
|
||||
TutorialStep("demo2.ready", "demo2.production-started", "准备后进入自动生产。周期火力等于载荷乘以倍率。", ShrinkTutorialDialogAnchor.Bottom),
|
||||
TutorialStep("demo2.reward", "demo2.rule-chosen", "防守后选择第一张规则牌。规则槽严格从左到右结算。", ShrinkTutorialDialogAnchor.Bottom)
|
||||
};
|
||||
AssetDatabase.CreateAsset(tutorial, ResourceRoot + "/Demo2FirstCycleTutorial.asset");
|
||||
var database = ScriptableObject.CreateInstance<ShrinkTutorialDatabase>();
|
||||
var serialized = new SerializedObject(database);
|
||||
var tutorials = serialized.FindProperty("tutorials");
|
||||
tutorials.arraySize = 1;
|
||||
tutorials.GetArrayElementAtIndex(0).objectReferenceValue = tutorial;
|
||||
serialized.ApplyModifiedPropertiesWithoutUndo();
|
||||
AssetDatabase.CreateAsset(database, ResourceRoot + "/Demo2TutorialDatabase.asset");
|
||||
var settings = ScriptableObject.CreateInstance<ShrinkTutorialSettings>();
|
||||
settings.name = "Demo2TutorialSettings";
|
||||
settings.database = database;
|
||||
settings.playerPrefsStorageKey = "Demo2.RuleFactory.Tutorial";
|
||||
settings.showSkipButton = true;
|
||||
settings.canvasSortingOrder = 5000;
|
||||
AssetDatabase.CreateAsset(settings, ResourceRoot + "/Demo2TutorialSettings.asset");
|
||||
}
|
||||
|
||||
private static ShrinkTutorialStep TutorialStep(string anchor, string signal, string text, ShrinkTutorialDialogAnchor dialogAnchor) => new()
|
||||
{
|
||||
targetMode = ShrinkTutorialTargetMode.AnchorId,
|
||||
anchorId = anchor,
|
||||
completeCondition = ShrinkTutorialCompleteCondition.CustomEvent,
|
||||
customEventName = signal,
|
||||
fallbackText = text,
|
||||
dialogAnchor = dialogAnchor,
|
||||
maskShape = ShrinkTutorialMaskShape.Rect,
|
||||
maskPadding = 10,
|
||||
waitForTarget = true,
|
||||
waitTimeout = 300
|
||||
};
|
||||
|
||||
private static void AddSceneToBuildSettings()
|
||||
{
|
||||
var scenes = EditorBuildSettings.scenes.ToList();
|
||||
if (scenes.All(value => value.path != ScenePath)) scenes.Add(new EditorBuildSettingsScene(ScenePath, true));
|
||||
else
|
||||
for (var i = 0; i < scenes.Count; i++) if (scenes[i].path == ScenePath) scenes[i] = new EditorBuildSettingsScene(ScenePath, true);
|
||||
EditorBuildSettings.scenes = scenes.ToArray();
|
||||
}
|
||||
|
||||
private static void SetObject(UnityEngine.Object target, string propertyName, UnityEngine.Object? value)
|
||||
{
|
||||
var serialized = new SerializedObject(target);
|
||||
var property = serialized.FindProperty(propertyName) ?? throw new InvalidOperationException($"Missing serialized property {target.GetType().Name}.{propertyName}");
|
||||
property.objectReferenceValue = value;
|
||||
serialized.ApplyModifiedPropertiesWithoutUndo();
|
||||
}
|
||||
|
||||
private static void SetObjectArray(UnityEngine.Object target, string propertyName, IReadOnlyList<UnityEngine.Object> values)
|
||||
{
|
||||
var serialized = new SerializedObject(target);
|
||||
var property = serialized.FindProperty(propertyName) ?? throw new InvalidOperationException($"Missing serialized property {target.GetType().Name}.{propertyName}");
|
||||
property.arraySize = values.Count;
|
||||
for (var i = 0; i < values.Count; i++) property.GetArrayElementAtIndex(i).objectReferenceValue = values[i];
|
||||
serialized.ApplyModifiedPropertiesWithoutUndo();
|
||||
}
|
||||
|
||||
private static void DeleteAssetIfExists(string path)
|
||||
{
|
||||
if (AssetDatabase.LoadAssetAtPath<UnityEngine.Object>(path) != null) AssetDatabase.DeleteAsset(path);
|
||||
}
|
||||
|
||||
private static Color Hex(string hex)
|
||||
{
|
||||
if (!ColorUtility.TryParseHtmlString("#" + hex, out var color)) throw new ArgumentException("Invalid color: " + hex);
|
||||
return color;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c656e593f1dff014a8e2922b16889326
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 524d9cc5e7df21544856854bb9cbc198
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,14 +0,0 @@
|
||||
param(
|
||||
[int]$Port = 27320,
|
||||
[ValidateSet("TCP", "KCP")]
|
||||
[string]$Transport = "TCP"
|
||||
)
|
||||
|
||||
$projectRoot = Resolve-Path (Join-Path $PSScriptRoot "..\..\..\..")
|
||||
$server = Join-Path $projectRoot "Builds\Demo2Headless\Demo2Server.exe"
|
||||
$log = Join-Path $projectRoot "Builds\Demo2Headless\server.log"
|
||||
if (-not (Test-Path -LiteralPath $server)) {
|
||||
throw "Headless player not found. Run ShrinkSDK > Demo2 > 构建 Headless Server in Unity first: $server"
|
||||
}
|
||||
|
||||
& $server -batchmode -nographics -demo2-port $Port -demo2-transport $Transport -logFile $log
|
||||
@@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 55730fa235abcdd4d9001688064d55b7
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e50679a9782e15d4ea3f8e4b4af6940e
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b74819ee8b058cb45baed6d68616ae01
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a55b59e0ab15b874cb1d93c0056f5ab1
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,52 +0,0 @@
|
||||
#nullable enable
|
||||
|
||||
using Demo2.Domain;
|
||||
|
||||
namespace NightShiftProtocol
|
||||
{
|
||||
public sealed class NightShiftContent : IDemo2Mod
|
||||
{
|
||||
public string Id => "example.night-shift-protocol";
|
||||
public string Version => "1.0.0";
|
||||
|
||||
public void Register(Demo2ContentRegistry registry)
|
||||
{
|
||||
registry.AddRecipe(new Demo2RecipeDefinition
|
||||
{
|
||||
Id = 100,
|
||||
Name = "循环冷却",
|
||||
InputA = Demo2MaterialKind.IronOre,
|
||||
InputB = Demo2MaterialKind.Energy,
|
||||
Output = Demo2MaterialKind.Ingot,
|
||||
InputCountA = 2,
|
||||
InputCountB = 1,
|
||||
OutputCount = 2,
|
||||
ProcessTicks = 34
|
||||
});
|
||||
registry.AddMachine(new Demo2MachineDefinition
|
||||
{
|
||||
Kind = Demo2MachineKind.NightShiftSmelter,
|
||||
Name = "夜班熔炉",
|
||||
Cost = 95,
|
||||
RecipeId = 100,
|
||||
Capacity = 16
|
||||
});
|
||||
registry.AddRule(new Demo2RuleDefinition
|
||||
{
|
||||
Id = "night-shift.continuous-production",
|
||||
Name = "连续夜班",
|
||||
Description = "连续完成三次相同配方且无故障时,结算倍率提高 40%。",
|
||||
Category = Demo2RuleCategory.MachineState,
|
||||
Instructions =
|
||||
{
|
||||
new Demo2RuleInstructionData
|
||||
{
|
||||
Opcode = Demo2RuleOpcode.MultiplyMultiplier,
|
||||
Condition = Demo2RuleCondition.ThreeSameRecipes | Demo2RuleCondition.NoFaults,
|
||||
Operand = 1400
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e0d4428fa7f5541498beb4e6f3c37022
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,13 +0,0 @@
|
||||
{
|
||||
"name": "NightShiftProtocol.Rules",
|
||||
"rootNamespace": "NightShiftProtocol",
|
||||
"references": ["Demo2.Domain"],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": true
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c6cc7202b24d10d48ba0ede46ea9de10
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d848e706b74b0224291fa7d73d0d3a58
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,19 +0,0 @@
|
||||
{
|
||||
"name": "NightShiftProtocol.Unity",
|
||||
"rootNamespace": "NightShiftProtocol",
|
||||
"references": [
|
||||
"NightShiftProtocol.Rules",
|
||||
"Demo2.Domain",
|
||||
"Demo2.Runtime",
|
||||
"ShrinkModFramework.Runtime",
|
||||
"ShrinkCommand.Runtime"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": false
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a727c069198ce2a468b98ee588f5a733
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,30 +0,0 @@
|
||||
#nullable enable
|
||||
|
||||
using Demo2.Runtime;
|
||||
using ShrinkCommand;
|
||||
using ShrinkModFramework;
|
||||
|
||||
namespace NightShiftProtocol
|
||||
{
|
||||
[ShrinkMod("example.night-shift-protocol", "夜班协议", "1.0.0", AutoApplyHarmonyPatches = false)]
|
||||
public sealed class NightShiftUnityMod : ShrinkModBase
|
||||
{
|
||||
public override void OnRegisterContent(ShrinkModContext context)
|
||||
{
|
||||
context.GetRegistry<Demo2.Domain.IDemo2Mod>(Demo2ModBridge.RegistryName)
|
||||
.Register(context.ModInfo.ModId, context.ModInfo.ModId, new NightShiftContent());
|
||||
}
|
||||
|
||||
public override void OnReady(ShrinkModContext context)
|
||||
{
|
||||
context.Log("Night-shift content registered without per-item callbacks or Harmony ECS patches.");
|
||||
}
|
||||
}
|
||||
|
||||
[ShrinkCommandSubscriber]
|
||||
public static class NightShiftServerCommands
|
||||
{
|
||||
[ShrinkCommand("demo2 night-shift status", Description = "显示夜班协议加载状态", Permission = "demo2.mods.inspect")]
|
||||
private static string Status() => "night-shift-protocol=registered; appliesTo=next-cycle-or-next-game";
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a79e815068bd88c44a9e0715e3baaef1
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"machines": ["night-shift-smelter"],
|
||||
"recipes": ["cyclic-cooling"],
|
||||
"rules": ["night-shift.continuous-production"],
|
||||
"commands": ["demo2 night-shift status"]
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2bf17c59e9bea3e4eb568ce8169191e1
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"id": "example.night-shift-protocol",
|
||||
"version": "1.0.0",
|
||||
"rulesAssembly": "NightShiftProtocol.Rules.dll",
|
||||
"unityAssembly": "NightShiftProtocol.Unity.dll",
|
||||
"content": "content.json",
|
||||
"networkCompatible": true,
|
||||
"files": []
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7085a468410b9cd4790f4bc565a6ac2a
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: abaf2f2a6aa9bf2489261ac81684b122
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,872 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &52799420826634535
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 6156002828130320704}
|
||||
- component: {fileID: 1388174829510841369}
|
||||
m_Layer: 0
|
||||
m_Name: demo2.smelter
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
--- !u!224 &6156002828130320704
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 52799420826634535}
|
||||
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: 5061677504351853062}
|
||||
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: 64, y: 64}
|
||||
m_Pivot: {x: 0, y: 0}
|
||||
--- !u!114 &1388174829510841369
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 52799420826634535}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d553777c8c60c3342a2b6c6d47f9a36d, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
anchorId: demo2.smelter
|
||||
--- !u!1 &177189132045423795
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4772225771659207448}
|
||||
- component: {fileID: 4425148257534039799}
|
||||
m_Layer: 0
|
||||
m_Name: demo2.conveyor
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
--- !u!224 &4772225771659207448
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 177189132045423795}
|
||||
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: 5061677504351853062}
|
||||
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: 64, y: 64}
|
||||
m_Pivot: {x: 0, y: 0}
|
||||
--- !u!114 &4425148257534039799
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 177189132045423795}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d553777c8c60c3342a2b6c6d47f9a36d, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
anchorId: demo2.conveyor
|
||||
--- !u!1 &968663342343634472
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 3965172402680360929}
|
||||
- component: {fileID: 3465400173438816204}
|
||||
- component: {fileID: 7572627973902173473}
|
||||
m_Layer: 0
|
||||
m_Name: WorldCamera
|
||||
m_TagString: MainCamera
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &3965172402680360929
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 968663342343634472}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 16, y: 10, z: -20}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 8672822441849276680}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!20 &3465400173438816204
|
||||
Camera:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 968663342343634472}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_ClearFlags: 2
|
||||
m_BackGroundColor: {r: 0.0627451, g: 0.078431375, b: 0.09803922, a: 1}
|
||||
m_projectionMatrixMode: 1
|
||||
m_GateFitMode: 2
|
||||
m_FOVAxisMode: 0
|
||||
m_Iso: 200
|
||||
m_ShutterSpeed: 0.005
|
||||
m_Aperture: 16
|
||||
m_FocusDistance: 10
|
||||
m_FocalLength: 50
|
||||
m_BladeCount: 5
|
||||
m_Curvature: {x: 2, y: 11}
|
||||
m_BarrelClipping: 0.25
|
||||
m_Anamorphism: 0
|
||||
m_SensorSize: {x: 36, y: 24}
|
||||
m_LensShift: {x: 0, y: 0}
|
||||
m_NormalizedViewPortRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1
|
||||
height: 1
|
||||
near clip plane: 0.3
|
||||
far clip plane: 1000
|
||||
field of view: 60
|
||||
orthographic: 1
|
||||
orthographic size: 11.6
|
||||
m_Depth: 0
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_RenderingPath: -1
|
||||
m_TargetTexture: {fileID: 0}
|
||||
m_TargetDisplay: 0
|
||||
m_TargetEye: 3
|
||||
m_HDR: 1
|
||||
m_AllowMSAA: 1
|
||||
m_AllowDynamicResolution: 0
|
||||
m_ForceIntoRT: 0
|
||||
m_OcclusionCulling: 1
|
||||
m_StereoConvergence: 10
|
||||
m_StereoSeparation: 0.022
|
||||
--- !u!81 &7572627973902173473
|
||||
AudioListener:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 968663342343634472}
|
||||
m_Enabled: 1
|
||||
--- !u!1 &1314924043378747584
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1860017706496136909}
|
||||
- component: {fileID: 2418933683263981636}
|
||||
m_Layer: 0
|
||||
m_Name: ItemBatchRenderer
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &1860017706496136909
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1314924043378747584}
|
||||
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: 5097274658364110000}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &2418933683263981636
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1314924043378747584}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: b94f9163cf29cdb40a14098f3a3dd6f4, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
itemTexture: {fileID: 2800000, guid: ed97685bc5914fa4b977fb9f20f8767e, type: 3}
|
||||
--- !u!1 &1520847290516777253
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4227405798296486044}
|
||||
- component: {fileID: 5485601257853438695}
|
||||
m_Layer: 0
|
||||
m_Name: demo2.ready
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
--- !u!224 &4227405798296486044
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1520847290516777253}
|
||||
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: 5061677504351853062}
|
||||
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: 64, y: 64}
|
||||
m_Pivot: {x: 0, y: 0}
|
||||
--- !u!114 &5485601257853438695
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1520847290516777253}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d553777c8c60c3342a2b6c6d47f9a36d, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
anchorId: demo2.ready
|
||||
--- !u!1 &3382633411488684981
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 8981702439038478422}
|
||||
- component: {fileID: 6903991907495525232}
|
||||
m_Layer: 0
|
||||
m_Name: demo2.recipe
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
--- !u!224 &8981702439038478422
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3382633411488684981}
|
||||
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: 5061677504351853062}
|
||||
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: 64, y: 64}
|
||||
m_Pivot: {x: 0, y: 0}
|
||||
--- !u!114 &6903991907495525232
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3382633411488684981}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d553777c8c60c3342a2b6c6d47f9a36d, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
anchorId: demo2.recipe
|
||||
--- !u!1 &4437984913425311211
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 334182515544443982}
|
||||
- component: {fileID: 4300437726072221360}
|
||||
m_Layer: 0
|
||||
m_Name: UI
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &334182515544443982
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4437984913425311211}
|
||||
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: 8672822441849276680}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &4300437726072221360
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4437984913425311211}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 19102, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_PanelSettings: {fileID: 11400000, guid: 427e96e2d5105df47aaf1a47a309de98, type: 2}
|
||||
m_ParentUI: {fileID: 0}
|
||||
sourceAsset: {fileID: 9197481963319205126, guid: da37b8ce2c9574342be5cfd5198d1f3c, type: 3}
|
||||
m_SortingOrder: 0
|
||||
--- !u!1 &5572511484155576079
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4598091021752378718}
|
||||
- component: {fileID: 5588801842915946451}
|
||||
m_Layer: 0
|
||||
m_Name: demo2.turret
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
--- !u!224 &4598091021752378718
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5572511484155576079}
|
||||
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: 5061677504351853062}
|
||||
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: 64, y: 64}
|
||||
m_Pivot: {x: 0, y: 0}
|
||||
--- !u!114 &5588801842915946451
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5572511484155576079}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d553777c8c60c3342a2b6c6d47f9a36d, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
anchorId: demo2.turret
|
||||
--- !u!1 &6097518898219652879
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 7804034773331961930}
|
||||
- component: {fileID: 9145017788126459012}
|
||||
m_Layer: 0
|
||||
m_Name: FactoryFloor
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &7804034773331961930
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6097518898219652879}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 16, y: 10, z: 1}
|
||||
m_LocalScale: {x: 1, y: 1.1111112, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 5097274658364110000}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!212 &9145017788126459012
|
||||
SpriteRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6097518898219652879}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 0
|
||||
m_ReceiveShadows: 0
|
||||
m_DynamicOccludee: 1
|
||||
m_StaticShadowCaster: 0
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RayTracingMode: 0
|
||||
m_RayTraceProcedural: 0
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
- {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, type: 2}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_LightProbeVolumeOverride: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_ReceiveGI: 1
|
||||
m_PreserveUVs: 0
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_StitchLightmapSeams: 1
|
||||
m_SelectedEditorRenderState: 0
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: -10
|
||||
m_Sprite: {fileID: 21300000, guid: c41720ca61016d241adc77b0acb21b22, type: 3}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_FlipX: 0
|
||||
m_FlipY: 0
|
||||
m_DrawMode: 0
|
||||
m_Size: {x: 32, y: 18}
|
||||
m_AdaptiveModeThreshold: 0.5
|
||||
m_SpriteTileMode: 0
|
||||
m_WasSpriteAssigned: 1
|
||||
m_MaskInteraction: 0
|
||||
m_SpriteSortPoint: 0
|
||||
--- !u!1 &6136182838840612368
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4801612902459727482}
|
||||
- component: {fileID: 4465473639810206948}
|
||||
m_Layer: 0
|
||||
m_Name: MachineProxyPool
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &4801612902459727482
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6136182838840612368}
|
||||
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: 5097274658364110000}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &4465473639810206948
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6136182838840612368}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 59a0126495f75f7468aa474eb5e377c0, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
machineSprites:
|
||||
- {fileID: 21300000, guid: efbb53bf6ddaf2b4e8ee1dbd2a5d5e2d, type: 3}
|
||||
- {fileID: 21300000, guid: 9affed53665a34948898c0753948c7e1, type: 3}
|
||||
- {fileID: 21300000, guid: 101a5a4eef59995469862b5ec9d190bc, type: 3}
|
||||
- {fileID: 21300000, guid: 5b16a2336e567ff47a010effae5289a2, type: 3}
|
||||
- {fileID: 21300000, guid: 33348165749c3f642abdbd128a6d4d36, type: 3}
|
||||
- {fileID: 21300000, guid: 9bb2b13fa139f6747ae34363c441b952, type: 3}
|
||||
- {fileID: 21300000, guid: 23a085599a885574d946089e38659930, type: 3}
|
||||
- {fileID: 21300000, guid: 4db1742d8176163488ffd1b097ad51f7, type: 3}
|
||||
--- !u!1 &6675411611155463305
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 5097274658364110000}
|
||||
m_Layer: 0
|
||||
m_Name: FactoryWorld
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &5097274658364110000
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6675411611155463305}
|
||||
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:
|
||||
- {fileID: 7804034773331961930}
|
||||
- {fileID: 4801612902459727482}
|
||||
- {fileID: 1860017706496136909}
|
||||
m_Father: {fileID: 8672822441849276680}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &6707342368039688198
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 805642414433818993}
|
||||
- component: {fileID: 2238420574626489003}
|
||||
m_Layer: 0
|
||||
m_Name: demo2.reward
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
--- !u!224 &805642414433818993
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6707342368039688198}
|
||||
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: 5061677504351853062}
|
||||
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: 64, y: 64}
|
||||
m_Pivot: {x: 0, y: 0}
|
||||
--- !u!114 &2238420574626489003
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6707342368039688198}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d553777c8c60c3342a2b6c6d47f9a36d, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
anchorId: demo2.reward
|
||||
--- !u!1 &6849145159851996335
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 5061677504351853062}
|
||||
m_Layer: 0
|
||||
m_Name: TutorialAnchors
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &5061677504351853062
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6849145159851996335}
|
||||
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: 4978873200091744772}
|
||||
- {fileID: 4772225771659207448}
|
||||
- {fileID: 5675282339592964349}
|
||||
- {fileID: 6156002828130320704}
|
||||
- {fileID: 8981702439038478422}
|
||||
- {fileID: 4598091021752378718}
|
||||
- {fileID: 4227405798296486044}
|
||||
- {fileID: 805642414433818993}
|
||||
m_Father: {fileID: 8672822441849276680}
|
||||
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: 1920, y: 1080}
|
||||
m_Pivot: {x: 0, y: 0}
|
||||
--- !u!1 &7772918736744570989
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 5675282339592964349}
|
||||
- component: {fileID: 1665558143216511688}
|
||||
m_Layer: 0
|
||||
m_Name: demo2.grid
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
--- !u!224 &5675282339592964349
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7772918736744570989}
|
||||
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: 5061677504351853062}
|
||||
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: 64, y: 64}
|
||||
m_Pivot: {x: 0, y: 0}
|
||||
--- !u!114 &1665558143216511688
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7772918736744570989}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d553777c8c60c3342a2b6c6d47f9a36d, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
anchorId: demo2.grid
|
||||
--- !u!1 &8242645858535981536
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 8672822441849276680}
|
||||
- component: {fileID: 210561253447020324}
|
||||
- component: {fileID: 3683927147547574618}
|
||||
m_Layer: 0
|
||||
m_Name: Demo2Root
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &8672822441849276680
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8242645858535981536}
|
||||
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:
|
||||
- {fileID: 3965172402680360929}
|
||||
- {fileID: 5097274658364110000}
|
||||
- {fileID: 334182515544443982}
|
||||
- {fileID: 5061677504351853062}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &210561253447020324
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8242645858535981536}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 126e2a7bc933f11489df489559327921, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
worldCamera: {fileID: 3465400173438816204}
|
||||
proxyPool: {fileID: 4465473639810206948}
|
||||
itemBatchRenderer: {fileID: 2418933683263981636}
|
||||
uiDocument: {fileID: 4300437726072221360}
|
||||
uiStyleSheet: {fileID: 7433441132597879392, guid: e5c25f68b6ac49148bedf0d85866a7b2, type: 3}
|
||||
titleBackground: {fileID: 21300000, guid: c41720ca61016d241adc77b0acb21b22, type: 3}
|
||||
machineIcons:
|
||||
- {fileID: 21300000, guid: efbb53bf6ddaf2b4e8ee1dbd2a5d5e2d, type: 3}
|
||||
- {fileID: 21300000, guid: 9affed53665a34948898c0753948c7e1, type: 3}
|
||||
- {fileID: 21300000, guid: 101a5a4eef59995469862b5ec9d190bc, type: 3}
|
||||
- {fileID: 21300000, guid: 5b16a2336e567ff47a010effae5289a2, type: 3}
|
||||
- {fileID: 21300000, guid: 33348165749c3f642abdbd128a6d4d36, type: 3}
|
||||
- {fileID: 21300000, guid: 9bb2b13fa139f6747ae34363c441b952, type: 3}
|
||||
- {fileID: 21300000, guid: 23a085599a885574d946089e38659930, type: 3}
|
||||
- {fileID: 21300000, guid: 4db1742d8176163488ffd1b097ad51f7, type: 3}
|
||||
uiFont: {fileID: 12800000, guid: 15d3c44401c8efa4998c665132bb7030, type: 3}
|
||||
tutorialFont: {fileID: 11400000, guid: 1e4ad6d03211ddd48823cec6fb7d0731, type: 2}
|
||||
tutorialAnchorRoot: {fileID: 5061677504351853062}
|
||||
--- !u!114 &3683927147547574618
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8242645858535981536}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 7efbce1f7d62b584db574530a79f47ba, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1 &8730749153376955550
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4978873200091744772}
|
||||
- component: {fileID: 7989581604563076349}
|
||||
m_Layer: 0
|
||||
m_Name: demo2.miner
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
--- !u!224 &4978873200091744772
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8730749153376955550}
|
||||
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: 5061677504351853062}
|
||||
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: 64, y: 64}
|
||||
m_Pivot: {x: 0, y: 0}
|
||||
--- !u!114 &7989581604563076349
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8730749153376955550}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d553777c8c60c3342a2b6c6d47f9a36d, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
anchorId: demo2.miner
|
||||
@@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 352b8b71da8ab714593f02e051f3ead4
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,28 +0,0 @@
|
||||
# Demo2《规则工厂》
|
||||
|
||||
独立于 Demo1 的 Unity Entities 生产、防御与有序规则构筑 Demo。入口场景为 `Assets/Demos/Demo2/Demo2.unity`,Prefab 为 `Assets/Demos/Demo2/Prefabs/Demo2Root.prefab`。
|
||||
|
||||
## 一局流程
|
||||
|
||||
一局固定 5 个周期,每周期依次经过 60 秒建造、90 秒生产、约 20 秒自动防御和三选一规则奖励。核心初始 3 点耐久。火力按 `载荷 × 倍率` 结算;规则槽最多 5 个,并严格从左到右执行。
|
||||
|
||||
基础生产链为:采集器 → 传送带/分流器 → 熔炼机 → 组装机 → 弹药装填器 → 自动炮塔。成功防守会把超额火力转为建造资金,并提供规则牌和机器升级。
|
||||
|
||||
## 运行
|
||||
|
||||
1. 在 Unity 2022.3.62f3 打开工程。
|
||||
2. 打开 `Assets/Demos/Demo2/Demo2.unity`。
|
||||
3. 进入 Play Mode,选择单人、创建 LAN 房间或直接 IP 加入。
|
||||
|
||||
首次单人对局会启动 ShrinkTutorial 教程。标题、大厅、工厂、奖励、胜利/失败均由同一入口场景中 Prefab 挂载的 UI Toolkit `UIDocument` 提供。
|
||||
|
||||
## 模块
|
||||
|
||||
- `Domain`:纯 C# 定义、规则、指令、整数饱和计算、网络与存档 DTO。
|
||||
- `ECS`:隔离的 Entities World、固定系统顺序、快照与状态哈希。
|
||||
- `Runtime`:玩法流程、UI Toolkit、批量绘制、LAN、SDK 服务、命令和教程信号。
|
||||
- `Editor`:场景/Prefab/教程资源生成器与 Unity Headless Server 构建入口。
|
||||
- `Mods/NightShiftProtocol`:可运行的示例 Mod。
|
||||
- `Tests`:EditMode 确定性、压力、规则、快照测试与 PlayMode 完整流程测试。
|
||||
|
||||
详细契约见 `Docs/ARCHITECTURE.md`、`Docs/RULES.md`、`Docs/NETWORKING.md`、`Docs/MODDING.md` 和 `Docs/HEADLESS.md`。
|
||||
@@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 16c8cf218db66ac4c8575933e77b5dc4
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 064daeeab08144349bcb0b01346b842c
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,198 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 356e79bb4dd3ef04099347bbe1dbca2b, type: 3}
|
||||
m_Name: Demo2FirstCycleTutorial
|
||||
m_EditorClassIdentifier:
|
||||
tutorialId: demo2.first-cycle
|
||||
priority: 0
|
||||
prerequisiteIds: []
|
||||
steps:
|
||||
- targetMode: 2
|
||||
targetPath:
|
||||
anchorId: demo2.miner
|
||||
waitForTarget: 1
|
||||
waitTimeout: 300
|
||||
completeCondition: 2
|
||||
customEventName: demo2.miner-selected
|
||||
autoDelay: 0.5
|
||||
dragTargetAnchorId:
|
||||
localizedTextKey:
|
||||
fallbackText: "\u9009\u62E9\u91C7\u96C6\u5668\uFF0C\u51C6\u5907\u5EFA\u7ACB\u65B0\u7684\u94C1\u77FF\u5165\u53E3\u3002"
|
||||
dialogAnchor: 4
|
||||
dialogOffset: {x: 0, y: 0}
|
||||
maskShape: 1
|
||||
maskPadding: 10
|
||||
showArrow: 1
|
||||
enterSignal:
|
||||
exitSignal:
|
||||
- targetMode: 2
|
||||
targetPath:
|
||||
anchorId: demo2.grid
|
||||
waitForTarget: 1
|
||||
waitTimeout: 300
|
||||
completeCondition: 2
|
||||
customEventName: demo2.miner-placed
|
||||
autoDelay: 0.5
|
||||
dragTargetAnchorId:
|
||||
localizedTextKey:
|
||||
fallbackText: "\u5728\u7A7A\u7F51\u683C\u653E\u7F6E\u91C7\u96C6\u5668\u3002"
|
||||
dialogAnchor: 1
|
||||
dialogOffset: {x: 0, y: 0}
|
||||
maskShape: 1
|
||||
maskPadding: 10
|
||||
showArrow: 1
|
||||
enterSignal:
|
||||
exitSignal:
|
||||
- targetMode: 2
|
||||
targetPath:
|
||||
anchorId: demo2.conveyor
|
||||
waitForTarget: 1
|
||||
waitTimeout: 300
|
||||
completeCondition: 2
|
||||
customEventName: demo2.conveyor-selected
|
||||
autoDelay: 0.5
|
||||
dragTargetAnchorId:
|
||||
localizedTextKey:
|
||||
fallbackText: "\u9009\u62E9\u4F20\u9001\u5E26\uFF0C\u51C6\u5907\u8FDE\u63A5\u751F\u4EA7\u7EBF\u3002"
|
||||
dialogAnchor: 4
|
||||
dialogOffset: {x: 0, y: 0}
|
||||
maskShape: 1
|
||||
maskPadding: 10
|
||||
showArrow: 1
|
||||
enterSignal:
|
||||
exitSignal:
|
||||
- targetMode: 2
|
||||
targetPath:
|
||||
anchorId: demo2.grid
|
||||
waitForTarget: 1
|
||||
waitTimeout: 300
|
||||
completeCondition: 2
|
||||
customEventName: demo2.conveyor-placed
|
||||
autoDelay: 0.5
|
||||
dragTargetAnchorId:
|
||||
localizedTextKey:
|
||||
fallbackText: "\u5728\u7F51\u683C\u653E\u7F6E\u4F20\u9001\u5E26\uFF0C\u628A\u4EA7\u7269\u9001\u5411\u52A0\u5DE5\u533A\u3002"
|
||||
dialogAnchor: 1
|
||||
dialogOffset: {x: 0, y: 0}
|
||||
maskShape: 1
|
||||
maskPadding: 10
|
||||
showArrow: 1
|
||||
enterSignal:
|
||||
exitSignal:
|
||||
- targetMode: 2
|
||||
targetPath:
|
||||
anchorId: demo2.smelter
|
||||
waitForTarget: 1
|
||||
waitTimeout: 300
|
||||
completeCondition: 2
|
||||
customEventName: demo2.smelter-selected
|
||||
autoDelay: 0.5
|
||||
dragTargetAnchorId:
|
||||
localizedTextKey:
|
||||
fallbackText: "\u9009\u62E9\u7194\u70BC\u673A\uFF0C\u51C6\u5907\u628A\u77FF\u77F3\u52A0\u5DE5\u4E3A\u94C1\u952D\u3002"
|
||||
dialogAnchor: 4
|
||||
dialogOffset: {x: 0, y: 0}
|
||||
maskShape: 1
|
||||
maskPadding: 10
|
||||
showArrow: 1
|
||||
enterSignal:
|
||||
exitSignal:
|
||||
- targetMode: 2
|
||||
targetPath:
|
||||
anchorId: demo2.recipe
|
||||
waitForTarget: 1
|
||||
waitTimeout: 300
|
||||
completeCondition: 2
|
||||
customEventName: demo2.recipe-selected
|
||||
autoDelay: 0.5
|
||||
dragTargetAnchorId:
|
||||
localizedTextKey:
|
||||
fallbackText: "\u786E\u8BA4\u5F53\u524D\u673A\u5668\u914D\u65B9\u3002\u914D\u65B9\u51B3\u5B9A\u8F93\u5165\u3001\u4EA7\u51FA\u4E0E\u52A0\u5DE5\u5468\u671F\u3002"
|
||||
dialogAnchor: 1
|
||||
dialogOffset: {x: 0, y: 0}
|
||||
maskShape: 1
|
||||
maskPadding: 10
|
||||
showArrow: 1
|
||||
enterSignal:
|
||||
exitSignal:
|
||||
- targetMode: 2
|
||||
targetPath:
|
||||
anchorId: demo2.turret
|
||||
waitForTarget: 1
|
||||
waitTimeout: 300
|
||||
completeCondition: 2
|
||||
customEventName: demo2.turret-selected
|
||||
autoDelay: 0.5
|
||||
dragTargetAnchorId:
|
||||
localizedTextKey:
|
||||
fallbackText: "\u9009\u62E9\u81EA\u52A8\u70AE\u5854\uFF0C\u51C6\u5907\u8FDE\u63A5\u9632\u7EBF\u3002"
|
||||
dialogAnchor: 4
|
||||
dialogOffset: {x: 0, y: 0}
|
||||
maskShape: 1
|
||||
maskPadding: 10
|
||||
showArrow: 1
|
||||
enterSignal:
|
||||
exitSignal:
|
||||
- targetMode: 2
|
||||
targetPath:
|
||||
anchorId: demo2.grid
|
||||
waitForTarget: 1
|
||||
waitTimeout: 300
|
||||
completeCondition: 2
|
||||
customEventName: demo2.turret-placed
|
||||
autoDelay: 0.5
|
||||
dragTargetAnchorId:
|
||||
localizedTextKey:
|
||||
fallbackText: "\u5728\u7F51\u683C\u653E\u7F6E\u70AE\u5854\u3002\u751F\u4EA7\u7684\u5F39\u836F\u4F1A\u5728\u7ED3\u7B97\u9636\u6BB5\u81EA\u52A8\u6D88\u8017\u3002"
|
||||
dialogAnchor: 1
|
||||
dialogOffset: {x: 0, y: 0}
|
||||
maskShape: 1
|
||||
maskPadding: 10
|
||||
showArrow: 1
|
||||
enterSignal:
|
||||
exitSignal:
|
||||
- targetMode: 2
|
||||
targetPath:
|
||||
anchorId: demo2.ready
|
||||
waitForTarget: 1
|
||||
waitTimeout: 300
|
||||
completeCondition: 2
|
||||
customEventName: demo2.production-started
|
||||
autoDelay: 0.5
|
||||
dragTargetAnchorId:
|
||||
localizedTextKey:
|
||||
fallbackText: "\u51C6\u5907\u540E\u8FDB\u5165\u81EA\u52A8\u751F\u4EA7\u3002\u5468\u671F\u706B\u529B\u7B49\u4E8E\u8F7D\u8377\u4E58\u4EE5\u500D\u7387\u3002"
|
||||
dialogAnchor: 2
|
||||
dialogOffset: {x: 0, y: 0}
|
||||
maskShape: 1
|
||||
maskPadding: 10
|
||||
showArrow: 1
|
||||
enterSignal:
|
||||
exitSignal:
|
||||
- targetMode: 2
|
||||
targetPath:
|
||||
anchorId: demo2.reward
|
||||
waitForTarget: 1
|
||||
waitTimeout: 300
|
||||
completeCondition: 2
|
||||
customEventName: demo2.rule-chosen
|
||||
autoDelay: 0.5
|
||||
dragTargetAnchorId:
|
||||
localizedTextKey:
|
||||
fallbackText: "\u9632\u5B88\u540E\u9009\u62E9\u7B2C\u4E00\u5F20\u89C4\u5219\u724C\u3002\u89C4\u5219\u69FD\u4E25\u683C\u4ECE\u5DE6\u5230\u53F3\u7ED3\u7B97\u3002"
|
||||
dialogAnchor: 2
|
||||
dialogOffset: {x: 0, y: 0}
|
||||
maskShape: 1
|
||||
maskPadding: 10
|
||||
showArrow: 1
|
||||
enterSignal:
|
||||
exitSignal:
|
||||