summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--SurvivalTest/Assets/Resources/Art/sprites/weapons/light_saber.pngbin0 -> 2581 bytes
-rw-r--r--SurvivalTest/Assets/Resources/Art/sprites/weapons/light_saber.png.meta108
-rw-r--r--SurvivalTest/Assets/Resources/Art/ui/decoration/horn.pngbin0 -> 10667 bytes
-rw-r--r--SurvivalTest/Assets/Resources/Art/ui/decoration/horn.png.meta96
-rw-r--r--SurvivalTest/Assets/Resources/Prefabs/ui/PanelBossHpBar.prefab251
-rw-r--r--SurvivalTest/Assets/Resources/Prefabs/ui/PanelBossHpBar.prefab.meta7
-rw-r--r--SurvivalTest/Assets/Resources/Prefabs/ui/PanelTopSuffBar.prefab4
-rw-r--r--SurvivalTest/Assets/Resources/Prefabs/weapon/light_saber.prefab97
-rw-r--r--SurvivalTest/Assets/Resources/Prefabs/weapon/light_saber.prefab.meta7
-rw-r--r--SurvivalTest/Assets/Resources/Prefabs/weapon/space_beam.prefab10
-rw-r--r--SurvivalTest/Assets/Resources/Scenes/Demo.unity61
-rw-r--r--SurvivalTest/Assets/Scenes/UIEditScene.unity127
-rw-r--r--SurvivalTest/Assets/Scripts/Decorations/Decoration_Horn.cs2
-rw-r--r--SurvivalTest/Assets/Scripts/Equips/EquipBase.cs28
-rw-r--r--SurvivalTest/Assets/Scripts/Equips/Equip_Boomerang.cs2
-rw-r--r--SurvivalTest/Assets/Scripts/Equips/Equip_LightSaber.cs18
-rw-r--r--SurvivalTest/Assets/Scripts/Equips/LightSaber.meta8
-rw-r--r--SurvivalTest/Assets/Scripts/Equips/LightSaber/Equip_LightSaber.cs63
-rw-r--r--SurvivalTest/Assets/Scripts/Equips/LightSaber/Equip_LightSaber.cs.meta (renamed from SurvivalTest/Assets/Scripts/Equips/Equip_LightSaber.cs.meta)0
-rw-r--r--SurvivalTest/Assets/Scripts/Equips/LightSaber/LightSaber.cs18
-rw-r--r--SurvivalTest/Assets/Scripts/Equips/LightSaber/LightSaber.cs.meta11
-rw-r--r--SurvivalTest/Assets/Scripts/Managers/BattleManager.cs1
-rw-r--r--SurvivalTest/Assets/Scripts/Managers/PlayerManager.cs1
-rw-r--r--SurvivalTest/Assets/Scripts/Managers/PlayerManager_Decorations.cs1
-rw-r--r--SurvivalTest/Assets/Scripts/Managers/PlayerManager_Equips.cs12
-rw-r--r--SurvivalTest/Assets/Scripts/Test/TestPeaceMaker.cs5
-rw-r--r--SurvivalTest/Assets/Scripts/UI/Panel/PanelBossHpBar.meta8
-rw-r--r--SurvivalTest/Assets/Scripts/UI/Panel/PanelBossHpBar/PanelBossHpBar.cs10
-rw-r--r--SurvivalTest/Assets/Scripts/UI/Panel/PanelBossHpBar/PanelBossHpBar.cs.meta11
-rw-r--r--SurvivalTest/Assets/Scripts/UI/Panel/PanelTopStuffBar/UIItemBar.cs2
-rw-r--r--SurvivalTest/Assets/Scripts/UI/UIManager_Panels.cs2
31 files changed, 932 insertions, 39 deletions
diff --git a/SurvivalTest/Assets/Resources/Art/sprites/weapons/light_saber.png b/SurvivalTest/Assets/Resources/Art/sprites/weapons/light_saber.png
new file mode 100644
index 0000000..bce13c7
--- /dev/null
+++ b/SurvivalTest/Assets/Resources/Art/sprites/weapons/light_saber.png
Binary files differ
diff --git a/SurvivalTest/Assets/Resources/Art/sprites/weapons/light_saber.png.meta b/SurvivalTest/Assets/Resources/Art/sprites/weapons/light_saber.png.meta
new file mode 100644
index 0000000..1838c52
--- /dev/null
+++ b/SurvivalTest/Assets/Resources/Art/sprites/weapons/light_saber.png.meta
@@ -0,0 +1,108 @@
+fileFormatVersion: 2
+guid: a7eb3a45db8221b45af08a5a65bd8b93
+TextureImporter:
+ internalIDToNameTable: []
+ externalObjects: {}
+ serializedVersion: 11
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ sRGBTexture: 1
+ linearTexture: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapsPreserveCoverage: 0
+ alphaTestReferenceValue: 0.5
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: 0.25
+ normalMapFilter: 0
+ isReadable: 0
+ streamingMipmaps: 0
+ streamingMipmapsPriority: 0
+ vTOnly: 0
+ grayScaleToAlpha: 0
+ generateCubemap: 6
+ cubemapConvolution: 0
+ seamlessCubemap: 0
+ textureFormat: 1
+ maxTextureSize: 2048
+ textureSettings:
+ serializedVersion: 2
+ filterMode: 0
+ aniso: 1
+ mipBias: 0
+ wrapU: 1
+ wrapV: 1
+ wrapW: 1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ spriteMode: 1
+ spriteExtrude: 1
+ spriteMeshType: 1
+ alignment: 9
+ spritePivot: {x: 0.037636675, y: 0.48657092}
+ spritePixelsToUnits: 32
+ 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
+ platformSettings:
+ - serializedVersion: 3
+ buildTarget: DefaultTexturePlatform
+ maxTextureSize: 2048
+ resizeAlgorithm: 0
+ textureFormat: -1
+ textureCompression: 1
+ compressionQuality: 50
+ crunchedCompression: 0
+ allowsAlphaSplitting: 0
+ overridden: 0
+ androidETC2FallbackOverride: 0
+ forceMaximumCompressionQuality_BC6H_BC7: 0
+ - serializedVersion: 3
+ buildTarget: Standalone
+ maxTextureSize: 2048
+ resizeAlgorithm: 0
+ textureFormat: -1
+ textureCompression: 1
+ compressionQuality: 50
+ crunchedCompression: 0
+ allowsAlphaSplitting: 0
+ overridden: 0
+ androidETC2FallbackOverride: 0
+ forceMaximumCompressionQuality_BC6H_BC7: 0
+ spriteSheet:
+ serializedVersion: 2
+ sprites: []
+ outline: []
+ physicsShape: []
+ bones: []
+ spriteID: 5e97eb03825dee720800000000000000
+ internalID: 0
+ vertices: []
+ indices:
+ edges: []
+ weights: []
+ secondaryTextures: []
+ spritePackingTag:
+ pSDRemoveMatte: 0
+ pSDShowRemoveMatteOption: 0
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/SurvivalTest/Assets/Resources/Art/ui/decoration/horn.png b/SurvivalTest/Assets/Resources/Art/ui/decoration/horn.png
new file mode 100644
index 0000000..8a55166
--- /dev/null
+++ b/SurvivalTest/Assets/Resources/Art/ui/decoration/horn.png
Binary files differ
diff --git a/SurvivalTest/Assets/Resources/Art/ui/decoration/horn.png.meta b/SurvivalTest/Assets/Resources/Art/ui/decoration/horn.png.meta
new file mode 100644
index 0000000..7ba6c2c
--- /dev/null
+++ b/SurvivalTest/Assets/Resources/Art/ui/decoration/horn.png.meta
@@ -0,0 +1,96 @@
+fileFormatVersion: 2
+guid: 1e28763487b968747a2e9d21bc623d52
+TextureImporter:
+ internalIDToNameTable: []
+ externalObjects: {}
+ serializedVersion: 11
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ sRGBTexture: 1
+ linearTexture: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapsPreserveCoverage: 0
+ alphaTestReferenceValue: 0.5
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: 0.25
+ normalMapFilter: 0
+ isReadable: 0
+ streamingMipmaps: 0
+ streamingMipmapsPriority: 0
+ vTOnly: 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: 100
+ 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
+ platformSettings:
+ - serializedVersion: 3
+ buildTarget: DefaultTexturePlatform
+ maxTextureSize: 2048
+ resizeAlgorithm: 0
+ textureFormat: -1
+ textureCompression: 1
+ compressionQuality: 50
+ crunchedCompression: 0
+ allowsAlphaSplitting: 0
+ overridden: 0
+ androidETC2FallbackOverride: 0
+ forceMaximumCompressionQuality_BC6H_BC7: 0
+ spriteSheet:
+ serializedVersion: 2
+ sprites: []
+ outline: []
+ physicsShape: []
+ bones: []
+ spriteID: 5e97eb03825dee720800000000000000
+ internalID: 0
+ vertices: []
+ indices:
+ edges: []
+ weights: []
+ secondaryTextures: []
+ spritePackingTag:
+ pSDRemoveMatte: 0
+ pSDShowRemoveMatteOption: 0
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/SurvivalTest/Assets/Resources/Prefabs/ui/PanelBossHpBar.prefab b/SurvivalTest/Assets/Resources/Prefabs/ui/PanelBossHpBar.prefab
new file mode 100644
index 0000000..e787469
--- /dev/null
+++ b/SurvivalTest/Assets/Resources/Prefabs/ui/PanelBossHpBar.prefab
@@ -0,0 +1,251 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!1 &1765710737091365654
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 1765710737091365530}
+ - component: {fileID: 1765710737091365582}
+ - component: {fileID: 641776116722095413}
+ m_Layer: 5
+ m_Name: PanelBossHpBar
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!224 &1765710737091365530
+RectTransform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1765710737091365654}
+ m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+ m_LocalPosition: {x: 0, y: 0, z: 0}
+ m_LocalScale: {x: 1, y: 1, z: 1}
+ m_Children:
+ - {fileID: 6288909076716388209}
+ m_Father: {fileID: 0}
+ m_RootOrder: 0
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+ m_AnchorMin: {x: 0, y: 0}
+ m_AnchorMax: {x: 1, y: 1}
+ m_AnchoredPosition: {x: 0, y: 0}
+ m_SizeDelta: {x: 0, y: 0}
+ m_Pivot: {x: 0.5, y: 0.5}
+--- !u!222 &1765710737091365582
+CanvasRenderer:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1765710737091365654}
+ m_CullTransparentMesh: 1
+--- !u!114 &641776116722095413
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1765710737091365654}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: f0cc24522a8627e45968194d9e4f1db6, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+--- !u!1 &4631917538198768750
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 6288909076716388209}
+ m_Layer: 5
+ m_Name: Root_Hp
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!224 &6288909076716388209
+RectTransform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 4631917538198768750}
+ m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+ m_LocalPosition: {x: 0, y: 0, z: 0}
+ m_LocalScale: {x: 1, y: 1, z: 1}
+ m_Children:
+ - {fileID: 2898173145786123943}
+ m_Father: {fileID: 1765710737091365530}
+ m_RootOrder: 0
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+ m_AnchorMin: {x: 0.5, y: 1}
+ m_AnchorMax: {x: 0.5, y: 1}
+ m_AnchoredPosition: {x: 1, y: -65}
+ m_SizeDelta: {x: 568.35, y: 62.149994}
+ m_Pivot: {x: 0.5, y: 0.5}
+--- !u!1 &8517425074030724344
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 7735176934942333539}
+ - component: {fileID: 7175808640407942142}
+ - component: {fileID: 6212515190947502657}
+ m_Layer: 5
+ m_Name: Text
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!224 &7735176934942333539
+RectTransform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 8517425074030724344}
+ m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
+ m_LocalPosition: {x: 0, y: 0, z: 0}
+ m_LocalScale: {x: 1, y: 1, z: 1}
+ m_Children: []
+ m_Father: {fileID: 2898173145786123943}
+ m_RootOrder: 0
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+ m_AnchorMin: {x: 1, y: 0.5}
+ m_AnchorMax: {x: 1, y: 0.5}
+ m_AnchoredPosition: {x: -9.070023, y: -0.000014067}
+ m_SizeDelta: {x: 160, y: 18.19}
+ m_Pivot: {x: 1, y: 0.5}
+--- !u!222 &7175808640407942142
+CanvasRenderer:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 8517425074030724344}
+ m_CullTransparentMesh: 1
+--- !u!114 &6212515190947502657
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 8517425074030724344}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ m_Material: {fileID: 0}
+ m_Color: {r: 1, g: 1, b: 1, a: 1}
+ m_RaycastTarget: 1
+ m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
+ m_Maskable: 1
+ m_OnCullStateChanged:
+ m_PersistentCalls:
+ m_Calls: []
+ m_FontData:
+ m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
+ m_FontSize: 15
+ m_FontStyle: 3
+ m_BestFit: 0
+ m_MinSize: 1
+ m_MaxSize: 40
+ m_Alignment: 2
+ m_AlignByGeometry: 0
+ m_RichText: 1
+ m_HorizontalOverflow: 0
+ m_VerticalOverflow: 0
+ m_LineSpacing: 1
+ m_Text: x999
+--- !u!1 &8692292041700116703
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 2898173145786123943}
+ - component: {fileID: 411161157941262332}
+ - component: {fileID: 7484234791843330049}
+ m_Layer: 5
+ m_Name: Image
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!224 &2898173145786123943
+RectTransform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 8692292041700116703}
+ m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+ m_LocalPosition: {x: 0, y: 0, z: 0}
+ m_LocalScale: {x: 1, y: 1, z: 1}
+ m_Children:
+ - {fileID: 7735176934942333539}
+ m_Father: {fileID: 6288909076716388209}
+ m_RootOrder: 0
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+ m_AnchorMin: {x: 0.5, y: 0.5}
+ m_AnchorMax: {x: 0.5, y: 0.5}
+ m_AnchoredPosition: {x: 0.7, y: -2.61}
+ m_SizeDelta: {x: 325.99, y: 18.19}
+ m_Pivot: {x: 0.5, y: 0.5}
+--- !u!222 &411161157941262332
+CanvasRenderer:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 8692292041700116703}
+ m_CullTransparentMesh: 1
+--- !u!114 &7484234791843330049
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 8692292041700116703}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ m_Material: {fileID: 0}
+ m_Color: {r: 1, g: 0, b: 0, a: 0.6862745}
+ m_RaycastTarget: 1
+ m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
+ m_Maskable: 1
+ m_OnCullStateChanged:
+ m_PersistentCalls:
+ m_Calls: []
+ m_Sprite: {fileID: 0}
+ m_Type: 0
+ m_PreserveAspect: 0
+ m_FillCenter: 1
+ m_FillMethod: 4
+ m_FillAmount: 1
+ m_FillClockwise: 1
+ m_FillOrigin: 0
+ m_UseSpriteMesh: 0
+ m_PixelsPerUnitMultiplier: 1
diff --git a/SurvivalTest/Assets/Resources/Prefabs/ui/PanelBossHpBar.prefab.meta b/SurvivalTest/Assets/Resources/Prefabs/ui/PanelBossHpBar.prefab.meta
new file mode 100644
index 0000000..46eaa91
--- /dev/null
+++ b/SurvivalTest/Assets/Resources/Prefabs/ui/PanelBossHpBar.prefab.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: f7e86ba455ca20d4a940269f96b2a62b
+PrefabImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/SurvivalTest/Assets/Resources/Prefabs/ui/PanelTopSuffBar.prefab b/SurvivalTest/Assets/Resources/Prefabs/ui/PanelTopSuffBar.prefab
index aebbd82..1a7ff02 100644
--- a/SurvivalTest/Assets/Resources/Prefabs/ui/PanelTopSuffBar.prefab
+++ b/SurvivalTest/Assets/Resources/Prefabs/ui/PanelTopSuffBar.prefab
@@ -136,7 +136,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
- m_IsActive: 0
+ m_IsActive: 1
--- !u!224 &184174568
RectTransform:
m_ObjectHideFlags: 0
@@ -1342,7 +1342,7 @@ GameObject:
- component: {fileID: 2787721831540739890}
- component: {fileID: 3489816292168880914}
m_Layer: 5
- m_Name: EquipTemplate
+ m_Name: DecorationTemplate
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
diff --git a/SurvivalTest/Assets/Resources/Prefabs/weapon/light_saber.prefab b/SurvivalTest/Assets/Resources/Prefabs/weapon/light_saber.prefab
new file mode 100644
index 0000000..82b2eea
--- /dev/null
+++ b/SurvivalTest/Assets/Resources/Prefabs/weapon/light_saber.prefab
@@ -0,0 +1,97 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!1 &1854691599017403814
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 1854691599017403811}
+ - component: {fileID: 1854691599017403812}
+ - component: {fileID: 1854691599017403813}
+ m_Layer: 0
+ m_Name: light_saber
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!4 &1854691599017403811
+Transform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1854691599017403814}
+ m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+ m_LocalPosition: {x: 3.0907204, y: 3.7854872, z: 0}
+ m_LocalScale: {x: 1, y: 1, z: 1}
+ m_Children: []
+ m_Father: {fileID: 0}
+ m_RootOrder: 0
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+--- !u!212 &1854691599017403812
+SpriteRenderer:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1854691599017403814}
+ m_Enabled: 1
+ m_CastShadows: 0
+ m_ReceiveShadows: 0
+ m_DynamicOccludee: 1
+ m_MotionVectors: 1
+ m_LightProbeUsage: 1
+ m_ReflectionProbeUsage: 1
+ m_RayTracingMode: 0
+ m_RayTraceProcedural: 0
+ m_RenderingLayerMask: 1
+ m_RendererPriority: 0
+ m_Materials:
+ - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
+ 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: 0
+ m_Sprite: {fileID: 21300000, guid: a7eb3a45db8221b45af08a5a65bd8b93, type: 3}
+ m_Color: {r: 1, g: 1, b: 1, a: 1}
+ m_FlipX: 0
+ m_FlipY: 0
+ m_DrawMode: 0
+ m_Size: {x: 0.96875, y: 3.125}
+ m_AdaptiveModeThreshold: 0.5
+ m_SpriteTileMode: 0
+ m_WasSpriteAssigned: 1
+ m_MaskInteraction: 0
+ m_SpriteSortPoint: 0
+--- !u!114 &1854691599017403813
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1854691599017403814}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 72f3d28485a45ba4b8906603b170f9fa, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
diff --git a/SurvivalTest/Assets/Resources/Prefabs/weapon/light_saber.prefab.meta b/SurvivalTest/Assets/Resources/Prefabs/weapon/light_saber.prefab.meta
new file mode 100644
index 0000000..5f7cb8b
--- /dev/null
+++ b/SurvivalTest/Assets/Resources/Prefabs/weapon/light_saber.prefab.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 623411d00337fe742bd232b547dfaf01
+PrefabImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/SurvivalTest/Assets/Resources/Prefabs/weapon/space_beam.prefab b/SurvivalTest/Assets/Resources/Prefabs/weapon/space_beam.prefab
index 94b269f..b3822cb 100644
--- a/SurvivalTest/Assets/Resources/Prefabs/weapon/space_beam.prefab
+++ b/SurvivalTest/Assets/Resources/Prefabs/weapon/space_beam.prefab
@@ -11,8 +11,8 @@ GameObject:
- component: {fileID: 8544638475443893113}
- component: {fileID: 856522015641562580}
- component: {fileID: 7449380312019425346}
- - component: {fileID: 6595285140424657013}
- - component: {fileID: 3972855973997788431}
+ - component: {fileID: 6483078521067408911}
+ - component: {fileID: 6789161084421625031}
m_Layer: 0
m_Name: beam
m_TagString: Untagged
@@ -29,7 +29,7 @@ Transform:
m_GameObject: {fileID: 833378180519843410}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 3.0223687}
- m_LocalScale: {x: 0.8, y: 1.5, z: 1}
+ m_LocalScale: {x: 0.8, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 2384770310529106985}
m_RootOrder: 0
@@ -104,7 +104,7 @@ Animator:
m_HasTransformHierarchy: 1
m_AllowConstantClipSamplingOptimization: 1
m_KeepAnimatorControllerStateOnDisable: 0
---- !u!114 &6595285140424657013
+--- !u!114 &6483078521067408911
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
@@ -117,7 +117,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_LocalPosition: {x: 0, y: 0, z: 0}
---- !u!114 &3972855973997788431
+--- !u!114 &6789161084421625031
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
diff --git a/SurvivalTest/Assets/Resources/Scenes/Demo.unity b/SurvivalTest/Assets/Resources/Scenes/Demo.unity
index c8d9f0c..e6aa2e3 100644
--- a/SurvivalTest/Assets/Resources/Scenes/Demo.unity
+++ b/SurvivalTest/Assets/Resources/Scenes/Demo.unity
@@ -2760,6 +2760,67 @@ MonoBehaviour:
m_Shadow: {fileID: 0}
m_Coord: {x: 0, y: 0, z: 0}
m_Height: 0
+--- !u!1001 &1646258316
+PrefabInstance:
+ m_ObjectHideFlags: 0
+ serializedVersion: 2
+ m_Modification:
+ m_TransformParent: {fileID: 0}
+ m_Modifications:
+ - target: {fileID: 1854691599017403811, guid: 623411d00337fe742bd232b547dfaf01, type: 3}
+ propertyPath: m_RootOrder
+ value: 21
+ objectReference: {fileID: 0}
+ - target: {fileID: 1854691599017403811, guid: 623411d00337fe742bd232b547dfaf01, type: 3}
+ propertyPath: m_LocalPosition.x
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: 1854691599017403811, guid: 623411d00337fe742bd232b547dfaf01, type: 3}
+ propertyPath: m_LocalPosition.y
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: 1854691599017403811, guid: 623411d00337fe742bd232b547dfaf01, type: 3}
+ propertyPath: m_LocalPosition.z
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: 1854691599017403811, guid: 623411d00337fe742bd232b547dfaf01, type: 3}
+ propertyPath: m_LocalRotation.w
+ value: 1
+ objectReference: {fileID: 0}
+ - target: {fileID: 1854691599017403811, guid: 623411d00337fe742bd232b547dfaf01, type: 3}
+ propertyPath: m_LocalRotation.x
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: 1854691599017403811, guid: 623411d00337fe742bd232b547dfaf01, type: 3}
+ propertyPath: m_LocalRotation.y
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: 1854691599017403811, guid: 623411d00337fe742bd232b547dfaf01, type: 3}
+ propertyPath: m_LocalRotation.z
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: 1854691599017403811, guid: 623411d00337fe742bd232b547dfaf01, type: 3}
+ propertyPath: m_LocalEulerAnglesHint.x
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: 1854691599017403811, guid: 623411d00337fe742bd232b547dfaf01, type: 3}
+ propertyPath: m_LocalEulerAnglesHint.y
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: 1854691599017403811, guid: 623411d00337fe742bd232b547dfaf01, type: 3}
+ propertyPath: m_LocalEulerAnglesHint.z
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: 1854691599017403814, guid: 623411d00337fe742bd232b547dfaf01, type: 3}
+ propertyPath: m_Name
+ value: light_saber
+ objectReference: {fileID: 0}
+ - target: {fileID: 1854691599017403814, guid: 623411d00337fe742bd232b547dfaf01, type: 3}
+ propertyPath: m_IsActive
+ value: 0
+ objectReference: {fileID: 0}
+ m_RemovedComponents: []
+ m_SourcePrefab: {fileID: 100100000, guid: 623411d00337fe742bd232b547dfaf01, type: 3}
--- !u!1 &1655800953
GameObject:
m_ObjectHideFlags: 0
diff --git a/SurvivalTest/Assets/Scenes/UIEditScene.unity b/SurvivalTest/Assets/Scenes/UIEditScene.unity
index fbd7b22..1ca54d7 100644
--- a/SurvivalTest/Assets/Scenes/UIEditScene.unity
+++ b/SurvivalTest/Assets/Scenes/UIEditScene.unity
@@ -219,6 +219,7 @@ RectTransform:
- {fileID: 377736797}
- {fileID: 1305071187953809465}
- {fileID: 8956013319459067295}
+ - {fileID: 642081543}
m_Father: {fileID: 0}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@@ -526,6 +527,11 @@ RectTransform:
m_CorrespondingSourceObject: {fileID: 8798891066935212560, guid: 302ad0181ac604e46b0a10a9abe687cb, type: 3}
m_PrefabInstance: {fileID: 602242365}
m_PrefabAsset: {fileID: 0}
+--- !u!224 &642081543 stripped
+RectTransform:
+ m_CorrespondingSourceObject: {fileID: 1765710737091365530, guid: f7e86ba455ca20d4a940269f96b2a62b, type: 3}
+ m_PrefabInstance: {fileID: 1765710736516573597}
+ m_PrefabAsset: {fileID: 0}
--- !u!1001 &1483248237
PrefabInstance:
m_ObjectHideFlags: 0
@@ -705,10 +711,6 @@ PrefabInstance:
m_Modification:
m_TransformParent: {fileID: 302779389}
m_Modifications:
- - target: {fileID: 4914265009318610032, guid: d0e4118f0d89f4248aad6b7077899e64, type: 3}
- propertyPath: m_AnchoredPosition.y
- value: -68
- objectReference: {fileID: 0}
- target: {fileID: 8494652252006705340, guid: d0e4118f0d89f4248aad6b7077899e64, type: 3}
propertyPath: m_Pivot.x
value: 0.5
@@ -797,6 +799,10 @@ PrefabInstance:
propertyPath: m_Name
value: PanelTopSuffBar
objectReference: {fileID: 0}
+ - target: {fileID: 8494652252006705341, guid: d0e4118f0d89f4248aad6b7077899e64, type: 3}
+ propertyPath: m_IsActive
+ value: 0
+ objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: d0e4118f0d89f4248aad6b7077899e64, type: 3}
--- !u!1001 &870056664923787661
@@ -909,6 +915,119 @@ RectTransform:
m_CorrespondingSourceObject: {fileID: 2166095880114612660, guid: 385d08ea764f1cf4a951094951320e98, type: 3}
m_PrefabInstance: {fileID: 870056664923787661}
m_PrefabAsset: {fileID: 0}
+--- !u!1001 &1765710736516573597
+PrefabInstance:
+ m_ObjectHideFlags: 0
+ serializedVersion: 2
+ m_Modification:
+ m_TransformParent: {fileID: 302779389}
+ m_Modifications:
+ - target: {fileID: 1765710737091365530, guid: f7e86ba455ca20d4a940269f96b2a62b, type: 3}
+ propertyPath: m_Pivot.x
+ value: 0.5
+ objectReference: {fileID: 0}
+ - target: {fileID: 1765710737091365530, guid: f7e86ba455ca20d4a940269f96b2a62b, type: 3}
+ propertyPath: m_Pivot.y
+ value: 0.5
+ objectReference: {fileID: 0}
+ - target: {fileID: 1765710737091365530, guid: f7e86ba455ca20d4a940269f96b2a62b, type: 3}
+ propertyPath: m_RootOrder
+ value: 5
+ objectReference: {fileID: 0}
+ - target: {fileID: 1765710737091365530, guid: f7e86ba455ca20d4a940269f96b2a62b, type: 3}
+ propertyPath: m_AnchorMax.x
+ value: 1
+ objectReference: {fileID: 0}
+ - target: {fileID: 1765710737091365530, guid: f7e86ba455ca20d4a940269f96b2a62b, type: 3}
+ propertyPath: m_AnchorMax.y
+ value: 1
+ objectReference: {fileID: 0}
+ - target: {fileID: 1765710737091365530, guid: f7e86ba455ca20d4a940269f96b2a62b, type: 3}
+ propertyPath: m_AnchorMin.x
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: 1765710737091365530, guid: f7e86ba455ca20d4a940269f96b2a62b, type: 3}
+ propertyPath: m_AnchorMin.y
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: 1765710737091365530, guid: f7e86ba455ca20d4a940269f96b2a62b, type: 3}
+ propertyPath: m_SizeDelta.x
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: 1765710737091365530, guid: f7e86ba455ca20d4a940269f96b2a62b, type: 3}
+ propertyPath: m_SizeDelta.y
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: 1765710737091365530, guid: f7e86ba455ca20d4a940269f96b2a62b, type: 3}
+ propertyPath: m_LocalPosition.x
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: 1765710737091365530, guid: f7e86ba455ca20d4a940269f96b2a62b, type: 3}
+ propertyPath: m_LocalPosition.y
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: 1765710737091365530, guid: f7e86ba455ca20d4a940269f96b2a62b, type: 3}
+ propertyPath: m_LocalPosition.z
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: 1765710737091365530, guid: f7e86ba455ca20d4a940269f96b2a62b, type: 3}
+ propertyPath: m_LocalRotation.w
+ value: 1
+ objectReference: {fileID: 0}
+ - target: {fileID: 1765710737091365530, guid: f7e86ba455ca20d4a940269f96b2a62b, type: 3}
+ propertyPath: m_LocalRotation.x
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: 1765710737091365530, guid: f7e86ba455ca20d4a940269f96b2a62b, type: 3}
+ propertyPath: m_LocalRotation.y
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: 1765710737091365530, guid: f7e86ba455ca20d4a940269f96b2a62b, type: 3}
+ propertyPath: m_LocalRotation.z
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: 1765710737091365530, guid: f7e86ba455ca20d4a940269f96b2a62b, type: 3}
+ propertyPath: m_AnchoredPosition.x
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: 1765710737091365530, guid: f7e86ba455ca20d4a940269f96b2a62b, type: 3}
+ propertyPath: m_AnchoredPosition.y
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: 1765710737091365530, guid: f7e86ba455ca20d4a940269f96b2a62b, type: 3}
+ propertyPath: m_LocalEulerAnglesHint.x
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: 1765710737091365530, guid: f7e86ba455ca20d4a940269f96b2a62b, type: 3}
+ propertyPath: m_LocalEulerAnglesHint.y
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: 1765710737091365530, guid: f7e86ba455ca20d4a940269f96b2a62b, type: 3}
+ propertyPath: m_LocalEulerAnglesHint.z
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: 1765710737091365654, guid: f7e86ba455ca20d4a940269f96b2a62b, type: 3}
+ propertyPath: m_Name
+ value: PanelBossHpBar
+ objectReference: {fileID: 0}
+ - target: {fileID: 6288909076716388209, guid: f7e86ba455ca20d4a940269f96b2a62b, type: 3}
+ propertyPath: m_AnchorMax.y
+ value: 1
+ objectReference: {fileID: 0}
+ - target: {fileID: 6288909076716388209, guid: f7e86ba455ca20d4a940269f96b2a62b, type: 3}
+ propertyPath: m_AnchorMin.y
+ value: 1
+ objectReference: {fileID: 0}
+ - target: {fileID: 6288909076716388209, guid: f7e86ba455ca20d4a940269f96b2a62b, type: 3}
+ propertyPath: m_SizeDelta.y
+ value: 62.149994
+ objectReference: {fileID: 0}
+ - target: {fileID: 6288909076716388209, guid: f7e86ba455ca20d4a940269f96b2a62b, type: 3}
+ propertyPath: m_AnchoredPosition.y
+ value: -65
+ objectReference: {fileID: 0}
+ m_RemovedComponents: []
+ m_SourcePrefab: {fileID: 100100000, guid: f7e86ba455ca20d4a940269f96b2a62b, type: 3}
--- !u!224 &8956013319459067295 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 8494652252006705340, guid: d0e4118f0d89f4248aad6b7077899e64, type: 3}
diff --git a/SurvivalTest/Assets/Scripts/Decorations/Decoration_Horn.cs b/SurvivalTest/Assets/Scripts/Decorations/Decoration_Horn.cs
index 63cd979..78192e2 100644
--- a/SurvivalTest/Assets/Scripts/Decorations/Decoration_Horn.cs
+++ b/SurvivalTest/Assets/Scripts/Decorations/Decoration_Horn.cs
@@ -9,6 +9,6 @@ public class Decoration_Horn : DecorationBase
{
public override string name => "角";
- public override string iconPath => "art/ui/decoration/mestry_mask";
+ public override string iconPath => "art/ui/decoration/horn";
}
diff --git a/SurvivalTest/Assets/Scripts/Equips/EquipBase.cs b/SurvivalTest/Assets/Scripts/Equips/EquipBase.cs
index 334609d..ff8a198 100644
--- a/SurvivalTest/Assets/Scripts/Equips/EquipBase.cs
+++ b/SurvivalTest/Assets/Scripts/Equips/EquipBase.cs
@@ -16,6 +16,7 @@ public abstract class EquipBase
{
Interval, // 按时连发,需要设置Interval
Condition, // 按条件触发,需要重写CheckCondition
+ Always, // 常驻
}
public abstract AutoMode autoMode { get; }
@@ -26,6 +27,21 @@ public abstract class EquipBase
public virtual float interval { get; }
/// <summary>
+ /// 初始化
+ /// </summary>
+ public virtual void OnInitialize(GameObject owner)
+ {
+ }
+
+ /// <summary>
+ /// 销毁
+ /// </summary>
+ /// <param name="owner"></param>
+ public virtual void OnDestroy(GameObject owner)
+ {
+ }
+
+ /// <summary>
/// 使用装备
/// </summary>
public abstract void OnTrigger(GameObject owner);
@@ -33,9 +49,17 @@ public abstract class EquipBase
public virtual bool CheckCondition(GameObject owner)
{
return false;
- }
+ }
+
+ /// <summary>
+ /// 停止开火
+ /// </summary>
+ /// <param name="owner"></param>
+ public virtual void OnStop(GameObject owner)
+ {
+ }
- public virtual void Update()
+ public virtual void Update(GameObject owner)
{
}
diff --git a/SurvivalTest/Assets/Scripts/Equips/Equip_Boomerang.cs b/SurvivalTest/Assets/Scripts/Equips/Equip_Boomerang.cs
index 7ee6a3b..8e3d917 100644
--- a/SurvivalTest/Assets/Scripts/Equips/Equip_Boomerang.cs
+++ b/SurvivalTest/Assets/Scripts/Equips/Equip_Boomerang.cs
@@ -27,7 +27,7 @@ public class Equip_Boomerang : EquipBase
{
}
- public override void Update()
+ public override void Update(GameObject owner)
{
}
diff --git a/SurvivalTest/Assets/Scripts/Equips/Equip_LightSaber.cs b/SurvivalTest/Assets/Scripts/Equips/Equip_LightSaber.cs
deleted file mode 100644
index a82ddc7..0000000
--- a/SurvivalTest/Assets/Scripts/Equips/Equip_LightSaber.cs
+++ /dev/null
@@ -1,18 +0,0 @@
-using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-
-public class Equip_LightSaber : EquipBase
-{
- public override string name => "光剑";
-
- public override string iconPath => "art/ui/equipicon/light_saber";
-
- public override AutoMode autoMode => AutoMode.Interval;
-
- public override float interval => 5f;
-
- public override void OnTrigger(GameObject owner)
- {
- }
-} \ No newline at end of file
diff --git a/SurvivalTest/Assets/Scripts/Equips/LightSaber.meta b/SurvivalTest/Assets/Scripts/Equips/LightSaber.meta
new file mode 100644
index 0000000..1920297
--- /dev/null
+++ b/SurvivalTest/Assets/Scripts/Equips/LightSaber.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 253a4032920545c4488fd1eeedac07e3
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/SurvivalTest/Assets/Scripts/Equips/LightSaber/Equip_LightSaber.cs b/SurvivalTest/Assets/Scripts/Equips/LightSaber/Equip_LightSaber.cs
new file mode 100644
index 0000000..9066884
--- /dev/null
+++ b/SurvivalTest/Assets/Scripts/Equips/LightSaber/Equip_LightSaber.cs
@@ -0,0 +1,63 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+
+public class Equip_LightSaber : EquipBase
+{
+ public override string name => "光剑";
+
+ public override string iconPath => "art/ui/equipicon/light_saber";
+
+ public override AutoMode autoMode => AutoMode.Condition;
+
+ private string lightSaberPrefabPath = "prefabs/weapon/light_saber";
+
+ private bool isWielding = false;
+
+ private LightSaber m_LightSaber;
+
+ private TopDownTransform m_TopDownTransform;
+
+ private float m_Dist = 0.2f;
+
+ public override void OnInitialize(GameObject owner)
+ {
+ m_LightSaber = UnityEngine.Object.Instantiate<LightSaber>(ResourceManager.Instance.Load<LightSaber>(lightSaberPrefabPath));
+ m_TopDownTransform = m_LightSaber.gameObject.GetComponent<TopDownTransform>();
+ SetLightSaberPositionAndRotation(owner.GetComponent<CrewScript>());
+ m_LightSaber.gameObject.SetActive(false);
+ }
+
+ public override bool CheckCondition(GameObject owner)
+ {
+ return true;
+ }
+
+ public override void OnTrigger(GameObject owner)
+ {
+ if (isWielding)
+ return;
+ isWielding = true;
+
+ m_LightSaber.gameObject.SetActive(true);
+ }
+
+ public override void OnStop(GameObject owner)
+ {
+ isWielding = false;
+ m_LightSaber.gameObject.SetActive(false);
+ }
+
+ public override void Update(GameObject owner)
+ {
+ CrewScript crew = owner.GetComponent<CrewScript>();
+ SetLightSaberPositionAndRotation(crew);
+ }
+
+ void SetLightSaberPositionAndRotation(CrewScript crew)
+ {
+ m_LightSaber.transform.position = crew.arrow.position + new Vector3(crew.aimDirection.x, crew.aimDirection.y, 0) * m_Dist;
+ m_LightSaber.transform.rotation = Quaternion.Euler(0, 0, Mathf.Atan2(crew.aimDirection.y, crew.aimDirection.x) * Mathf.Rad2Deg);
+ }
+
+} \ No newline at end of file
diff --git a/SurvivalTest/Assets/Scripts/Equips/Equip_LightSaber.cs.meta b/SurvivalTest/Assets/Scripts/Equips/LightSaber/Equip_LightSaber.cs.meta
index dcc1028..dcc1028 100644
--- a/SurvivalTest/Assets/Scripts/Equips/Equip_LightSaber.cs.meta
+++ b/SurvivalTest/Assets/Scripts/Equips/LightSaber/Equip_LightSaber.cs.meta
diff --git a/SurvivalTest/Assets/Scripts/Equips/LightSaber/LightSaber.cs b/SurvivalTest/Assets/Scripts/Equips/LightSaber/LightSaber.cs
new file mode 100644
index 0000000..4db08ee
--- /dev/null
+++ b/SurvivalTest/Assets/Scripts/Equips/LightSaber/LightSaber.cs
@@ -0,0 +1,18 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+
+public class LightSaber : MonoBehaviour
+{
+ // Start is called before the first frame update
+ void Start()
+ {
+
+ }
+
+ // Update is called once per frame
+ void Update()
+ {
+
+ }
+}
diff --git a/SurvivalTest/Assets/Scripts/Equips/LightSaber/LightSaber.cs.meta b/SurvivalTest/Assets/Scripts/Equips/LightSaber/LightSaber.cs.meta
new file mode 100644
index 0000000..e8200d8
--- /dev/null
+++ b/SurvivalTest/Assets/Scripts/Equips/LightSaber/LightSaber.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 72f3d28485a45ba4b8906603b170f9fa
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/SurvivalTest/Assets/Scripts/Managers/BattleManager.cs b/SurvivalTest/Assets/Scripts/Managers/BattleManager.cs
index ee52548..681e87b 100644
--- a/SurvivalTest/Assets/Scripts/Managers/BattleManager.cs
+++ b/SurvivalTest/Assets/Scripts/Managers/BattleManager.cs
@@ -8,6 +8,7 @@ public class BattleManager : Singleton<BattleManager>
public void Init()
{
UIManager.Instance.OpenPanel(PanelType.PanelTopSuffBar, null);
+ UIManager.Instance.OpenPanel(PanelType.PanelBossHpBar, null);
//UIManager.Instance.OpenPanel(PanelType.PanelItemBar, null);
//UIManager.Instance.OpenPanel(PanelType.PanelEquipBar, null);
}
diff --git a/SurvivalTest/Assets/Scripts/Managers/PlayerManager.cs b/SurvivalTest/Assets/Scripts/Managers/PlayerManager.cs
index 95ad08e..bb97ce3 100644
--- a/SurvivalTest/Assets/Scripts/Managers/PlayerManager.cs
+++ b/SurvivalTest/Assets/Scripts/Managers/PlayerManager.cs
@@ -27,6 +27,7 @@ public partial class PlayerManager : Singleton<PlayerManager>
public void SetCrew(CrewScript crew)
{
m_Crew = crew;
+ m_Equips.ForEach(e => e.OnInitialize(crew.gameObject));
}
} \ No newline at end of file
diff --git a/SurvivalTest/Assets/Scripts/Managers/PlayerManager_Decorations.cs b/SurvivalTest/Assets/Scripts/Managers/PlayerManager_Decorations.cs
index 3f1669a..5076dea 100644
--- a/SurvivalTest/Assets/Scripts/Managers/PlayerManager_Decorations.cs
+++ b/SurvivalTest/Assets/Scripts/Managers/PlayerManager_Decorations.cs
@@ -14,6 +14,7 @@ public partial class PlayerManager : Singleton<PlayerManager>
{
m_Decorations.Add(new Decoration_MystreyMask());
m_Decorations.Add(new Decoration_PowerRing());
+ m_Decorations.Add(new Decoration_Horn());
}
void UpdateDecorations()
diff --git a/SurvivalTest/Assets/Scripts/Managers/PlayerManager_Equips.cs b/SurvivalTest/Assets/Scripts/Managers/PlayerManager_Equips.cs
index 44197c7..d921545 100644
--- a/SurvivalTest/Assets/Scripts/Managers/PlayerManager_Equips.cs
+++ b/SurvivalTest/Assets/Scripts/Managers/PlayerManager_Equips.cs
@@ -38,7 +38,7 @@ public partial class PlayerManager : Singleton<PlayerManager>
{
for(int i = 0; i < m_Equips.Count; ++i)
{
- m_Equips[i].Update();
+ m_Equips[i].Update(m_Crew.gameObject);
}
}
@@ -93,13 +93,14 @@ public partial class PlayerManager : Singleton<PlayerManager>
if (m_CoFire != null)
{
GameApp.Instance.StopCoroutine(m_CoFire);
+ m_Equips.ForEach(e => e.OnStop(m_Crew.gameObject));
m_CoFire = null;
}
}
}
/// <summary>
- /// 开火
+ /// 自由开火
/// </summary>
/// <returns></returns>
IEnumerator coFire()
@@ -124,6 +125,13 @@ public partial class PlayerManager : Singleton<PlayerManager>
{
}
}
+ else if(equip.autoMode == EquipBase.AutoMode.Condition)
+ {
+ if(equip.CheckCondition(m_Crew.gameObject))
+ {
+ equip.OnTrigger(m_Crew.gameObject);
+ }
+ }
}
yield return null;
}
diff --git a/SurvivalTest/Assets/Scripts/Test/TestPeaceMaker.cs b/SurvivalTest/Assets/Scripts/Test/TestPeaceMaker.cs
index 86b781b..775b913 100644
--- a/SurvivalTest/Assets/Scripts/Test/TestPeaceMaker.cs
+++ b/SurvivalTest/Assets/Scripts/Test/TestPeaceMaker.cs
@@ -74,13 +74,10 @@ public class TestPeaceMaker : CrewScript
}
private ControlMode m_ControlMode;
- private void Awake()
+ void Start()
{
PlayerManager.Instance.SetCrew(this);
- }
- void Start()
- {
m_SpriteRenderer = GetComponent<SpriteRenderer>();
m_Coord = GetComponent<TopDownTransform>();
diff --git a/SurvivalTest/Assets/Scripts/UI/Panel/PanelBossHpBar.meta b/SurvivalTest/Assets/Scripts/UI/Panel/PanelBossHpBar.meta
new file mode 100644
index 0000000..45721d1
--- /dev/null
+++ b/SurvivalTest/Assets/Scripts/UI/Panel/PanelBossHpBar.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: c5e2eef1c0b745b468cd7e02b389e9fd
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/SurvivalTest/Assets/Scripts/UI/Panel/PanelBossHpBar/PanelBossHpBar.cs b/SurvivalTest/Assets/Scripts/UI/Panel/PanelBossHpBar/PanelBossHpBar.cs
new file mode 100644
index 0000000..860143a
--- /dev/null
+++ b/SurvivalTest/Assets/Scripts/UI/Panel/PanelBossHpBar/PanelBossHpBar.cs
@@ -0,0 +1,10 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+
+public class PanelBossHpBar : PanelBase
+{
+ public override void Set(object param)
+ {
+ }
+} \ No newline at end of file
diff --git a/SurvivalTest/Assets/Scripts/UI/Panel/PanelBossHpBar/PanelBossHpBar.cs.meta b/SurvivalTest/Assets/Scripts/UI/Panel/PanelBossHpBar/PanelBossHpBar.cs.meta
new file mode 100644
index 0000000..c10ee49
--- /dev/null
+++ b/SurvivalTest/Assets/Scripts/UI/Panel/PanelBossHpBar/PanelBossHpBar.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: f0cc24522a8627e45968194d9e4f1db6
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/SurvivalTest/Assets/Scripts/UI/Panel/PanelTopStuffBar/UIItemBar.cs b/SurvivalTest/Assets/Scripts/UI/Panel/PanelTopStuffBar/UIItemBar.cs
index ecb6ea1..9025984 100644
--- a/SurvivalTest/Assets/Scripts/UI/Panel/PanelTopStuffBar/UIItemBar.cs
+++ b/SurvivalTest/Assets/Scripts/UI/Panel/PanelTopStuffBar/UIItemBar.cs
@@ -17,6 +17,8 @@ public class UIItemBar : MonoBehaviour
public void Set()
{
+ m_ItemTempalte.gameObject.SetActive(false);
+
for (int i = 0; i < PlayerManager.Instance.items.Count; ++i)
{
ItemWidget widget = MakeItemWidget(PlayerManager.Instance.items[i]);
diff --git a/SurvivalTest/Assets/Scripts/UI/UIManager_Panels.cs b/SurvivalTest/Assets/Scripts/UI/UIManager_Panels.cs
index d53a4e6..02b3a06 100644
--- a/SurvivalTest/Assets/Scripts/UI/UIManager_Panels.cs
+++ b/SurvivalTest/Assets/Scripts/UI/UIManager_Panels.cs
@@ -11,6 +11,7 @@ public enum PanelType
PanelItemBar,
PanelEquipBar,
PanelTopSuffBar,
+ PanelBossHpBar,
}
public partial class UIManager : Singleton<UIManager>
@@ -31,6 +32,7 @@ public partial class UIManager : Singleton<UIManager>
AddPanel(PanelType.PanelItemBar, "PanelItemBar");
AddPanel(PanelType.PanelEquipBar, "PanelEquipBar");
AddPanel(PanelType.PanelTopSuffBar, "PanelTopSuffBar");
+ AddPanel(PanelType.PanelBossHpBar, "PanelBossHpBar");
}
void AddPanel(PanelType type, string path)