Merge branch 'master' of http://172.16.1.52:8090/r/GemBattle
18 files added
10 files modified
New file |
| | |
| | | %YAML 1.1 |
| | | %TAG !u! tag:unity3d.com,2011: |
| | | --- !u!21 &2100000 |
| | | Material: |
| | | serializedVersion: 6 |
| | | m_ObjectHideFlags: 0 |
| | | m_CorrespondingSourceObject: {fileID: 0} |
| | | m_PrefabInstance: {fileID: 0} |
| | | m_PrefabAsset: {fileID: 0} |
| | | m_Name: b453fa5a-7b85-48d1-90cc-3ab80f0111e6 |
| | | m_Shader: {fileID: 203, guid: 0000000000000000f000000000000000, type: 0} |
| | | m_ShaderKeywords: |
| | | m_LightmapFlags: 4 |
| | | m_EnableInstancingVariants: 0 |
| | | m_DoubleSidedGI: 0 |
| | | m_CustomRenderQueue: -1 |
| | | stringTagMap: {} |
| | | disabledShaderPasses: [] |
| | | m_SavedProperties: |
| | | serializedVersion: 3 |
| | | m_TexEnvs: |
| | | - _MainTex: |
| | | m_Texture: {fileID: 2800000, guid: 687ab14e7e6e37e4d93ba4abdc18e5a3, type: 3} |
| | | m_Scale: {x: 1, y: 1} |
| | | m_Offset: {x: 0, y: 0} |
| | | m_Floats: |
| | | - _InvFade: 1 |
| | | m_Colors: |
| | | - _TintColor: {r: 1, g: 1, b: 1, a: 1} |
| | | m_BuildTextureStacks: [] |
New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 5cfea5ccce7205c499c5fc1cddf6006e |
| | | NativeFormatImporter: |
| | | externalObjects: {} |
| | | mainObjectFileID: 0 |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 255c8602c92ef0b478297741562cea06 |
| | | PrefabImporter: |
| | | externalObjects: {} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 5206e95e25b0fc344a3099e1f6136e53 |
| | | PrefabImporter: |
| | | externalObjects: {} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 5613c4e3ae0138144aaec48202d43f05 |
| | | PrefabImporter: |
| | | externalObjects: {} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 687ab14e7e6e37e4d93ba4abdc18e5a3 |
| | | TextureImporter: |
| | | internalIDToNameTable: [] |
| | | externalObjects: {} |
| | | serializedVersion: 11 |
| | | mipmaps: |
| | | mipMapMode: 0 |
| | | enableMipMap: 1 |
| | | 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: -100 |
| | | wrapU: -1 |
| | | wrapV: -1 |
| | | wrapW: -1 |
| | | nPOTScale: 1 |
| | | lightmap: 0 |
| | | compressionQuality: 50 |
| | | spriteMode: 0 |
| | | 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: 0 |
| | | textureShape: 1 |
| | | singleChannelComponent: 0 |
| | | 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: |
| | | internalID: 0 |
| | | vertices: [] |
| | | indices: |
| | | edges: [] |
| | | weights: [] |
| | | secondaryTextures: [] |
| | | spritePackingTag: |
| | | pSDRemoveMatte: 0 |
| | | pSDShowRemoveMatteOption: 0 |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | | m_Scale: {x: 1, y: 1} |
| | | m_Offset: {x: 0, y: 0} |
| | | - _MainTex: |
| | | m_Texture: {fileID: 2800000, guid: ea2ffef66c52dd14fbd46187be79f107, type: 3} |
| | | m_Texture: {fileID: 2800000, guid: 93f40a01d57fbff418fc0b54b6ab7d9f, type: 3} |
| | | m_Scale: {x: 1, y: 1} |
| | | m_Offset: {x: 0, y: 0} |
| | | - _MetallicGlossMap: |
New file |
| | |
| | | %YAML 1.1 |
| | | %TAG !u! tag:unity3d.com,2011: |
| | | --- !u!1 &3257525538472116254 |
| | | GameObject: |
| | | m_ObjectHideFlags: 0 |
| | | m_CorrespondingSourceObject: {fileID: 0} |
| | | m_PrefabInstance: {fileID: 0} |
| | | m_PrefabAsset: {fileID: 0} |
| | | serializedVersion: 6 |
| | | m_Component: |
| | | - component: {fileID: 3059469595041567074} |
| | | - component: {fileID: 598523906858100597} |
| | | - component: {fileID: 8715720225615642531} |
| | | - component: {fileID: 8223785166565473932} |
| | | m_Layer: 5 |
| | | m_Name: CritWord |
| | | m_TagString: Untagged |
| | | m_Icon: {fileID: 0} |
| | | m_NavMeshLayer: 0 |
| | | m_StaticEditorFlags: 0 |
| | | m_IsActive: 1 |
| | | --- !u!224 &3059469595041567074 |
| | | RectTransform: |
| | | m_ObjectHideFlags: 0 |
| | | m_CorrespondingSourceObject: {fileID: 0} |
| | | m_PrefabInstance: {fileID: 0} |
| | | m_PrefabAsset: {fileID: 0} |
| | | m_GameObject: {fileID: 3257525538472116254} |
| | | 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: 0} |
| | | m_RootOrder: 0 |
| | | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} |
| | | m_AnchorMin: {x: 0.5, y: 0.5} |
| | | m_AnchorMax: {x: 0.5, y: 0.5} |
| | | m_AnchoredPosition: {x: 0, y: 0} |
| | | m_SizeDelta: {x: 102, y: 44} |
| | | m_Pivot: {x: 0.5, y: 0.5} |
| | | --- !u!222 &598523906858100597 |
| | | CanvasRenderer: |
| | | m_ObjectHideFlags: 0 |
| | | m_CorrespondingSourceObject: {fileID: 0} |
| | | m_PrefabInstance: {fileID: 0} |
| | | m_PrefabAsset: {fileID: 0} |
| | | m_GameObject: {fileID: 3257525538472116254} |
| | | m_CullTransparentMesh: 0 |
| | | --- !u!114 &8715720225615642531 |
| | | MonoBehaviour: |
| | | m_ObjectHideFlags: 0 |
| | | m_CorrespondingSourceObject: {fileID: 0} |
| | | m_PrefabInstance: {fileID: 0} |
| | | m_PrefabAsset: {fileID: 0} |
| | | m_GameObject: {fileID: 3257525538472116254} |
| | | m_Enabled: 1 |
| | | m_EditorHideFlags: 0 |
| | | m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} |
| | | m_Name: |
| | | m_EditorClassIdentifier: |
| | | m_Material: {fileID: 0} |
| | | m_Color: {r: 1, g: 1, b: 1, a: 1} |
| | | m_RaycastTarget: 1 |
| | | m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} |
| | | m_Maskable: 1 |
| | | m_OnCullStateChanged: |
| | | m_PersistentCalls: |
| | | m_Calls: [] |
| | | m_Sprite: {fileID: 21300000, guid: f307fd11ce23aad448205847b52bb224, type: 3} |
| | | m_Type: 0 |
| | | m_PreserveAspect: 0 |
| | | m_FillCenter: 1 |
| | | m_FillMethod: 4 |
| | | m_FillAmount: 1 |
| | | m_FillClockwise: 1 |
| | | m_FillOrigin: 0 |
| | | m_UseSpriteMesh: 0 |
| | | m_PixelsPerUnitMultiplier: 1 |
| | | --- !u!114 &8223785166565473932 |
| | | MonoBehaviour: |
| | | m_ObjectHideFlags: 0 |
| | | m_CorrespondingSourceObject: {fileID: 0} |
| | | m_PrefabInstance: {fileID: 0} |
| | | m_PrefabAsset: {fileID: 0} |
| | | m_GameObject: {fileID: 3257525538472116254} |
| | | m_Enabled: 1 |
| | | m_EditorHideFlags: 0 |
| | | m_Script: {fileID: 11500000, guid: f34b2e8d82a07c541958be6bda6fd604, type: 3} |
| | | m_Name: |
| | | m_EditorClassIdentifier: |
| | | bloodText: {fileID: 0} |
| | | SlowDownWord: {fileID: 0} |
| | | CritWord: {fileID: 8715720225615642531} |
New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: d50687f6a62a08745981a9e471357e9c |
| | | PrefabImporter: |
| | | externalObjects: {} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
New file |
| | |
| | | %YAML 1.1 |
| | | %TAG !u! tag:unity3d.com,2011: |
| | | --- !u!1 &2191058698392289649 |
| | | GameObject: |
| | | m_ObjectHideFlags: 0 |
| | | m_CorrespondingSourceObject: {fileID: 0} |
| | | m_PrefabInstance: {fileID: 0} |
| | | m_PrefabAsset: {fileID: 0} |
| | | serializedVersion: 6 |
| | | m_Component: |
| | | - component: {fileID: 3966657881004838339} |
| | | - component: {fileID: 5321523380136452434} |
| | | - component: {fileID: 293573869288443060} |
| | | - component: {fileID: 3853166056183932101} |
| | | m_Layer: 5 |
| | | m_Name: SlowDownWord |
| | | m_TagString: Untagged |
| | | m_Icon: {fileID: 0} |
| | | m_NavMeshLayer: 0 |
| | | m_StaticEditorFlags: 0 |
| | | m_IsActive: 1 |
| | | --- !u!224 &3966657881004838339 |
| | | RectTransform: |
| | | m_ObjectHideFlags: 0 |
| | | m_CorrespondingSourceObject: {fileID: 0} |
| | | m_PrefabInstance: {fileID: 0} |
| | | m_PrefabAsset: {fileID: 0} |
| | | m_GameObject: {fileID: 2191058698392289649} |
| | | 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: 0} |
| | | m_RootOrder: 0 |
| | | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} |
| | | m_AnchorMin: {x: 0.5, y: 0.5} |
| | | m_AnchorMax: {x: 0.5, y: 0.5} |
| | | m_AnchoredPosition: {x: 0, y: 0} |
| | | m_SizeDelta: {x: 79, y: 35} |
| | | m_Pivot: {x: 0.5, y: 0.5} |
| | | --- !u!222 &5321523380136452434 |
| | | CanvasRenderer: |
| | | m_ObjectHideFlags: 0 |
| | | m_CorrespondingSourceObject: {fileID: 0} |
| | | m_PrefabInstance: {fileID: 0} |
| | | m_PrefabAsset: {fileID: 0} |
| | | m_GameObject: {fileID: 2191058698392289649} |
| | | m_CullTransparentMesh: 0 |
| | | --- !u!114 &293573869288443060 |
| | | MonoBehaviour: |
| | | m_ObjectHideFlags: 0 |
| | | m_CorrespondingSourceObject: {fileID: 0} |
| | | m_PrefabInstance: {fileID: 0} |
| | | m_PrefabAsset: {fileID: 0} |
| | | m_GameObject: {fileID: 2191058698392289649} |
| | | m_Enabled: 1 |
| | | m_EditorHideFlags: 0 |
| | | m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} |
| | | m_Name: |
| | | m_EditorClassIdentifier: |
| | | m_Material: {fileID: 0} |
| | | m_Color: {r: 1, g: 1, b: 1, a: 1} |
| | | m_RaycastTarget: 1 |
| | | m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} |
| | | m_Maskable: 1 |
| | | m_OnCullStateChanged: |
| | | m_PersistentCalls: |
| | | m_Calls: [] |
| | | m_Sprite: {fileID: 21300000, guid: caf683e4f8ed0be47ad00f33ac3edb3a, type: 3} |
| | | m_Type: 0 |
| | | m_PreserveAspect: 0 |
| | | m_FillCenter: 1 |
| | | m_FillMethod: 4 |
| | | m_FillAmount: 1 |
| | | m_FillClockwise: 1 |
| | | m_FillOrigin: 0 |
| | | m_UseSpriteMesh: 0 |
| | | m_PixelsPerUnitMultiplier: 1 |
| | | --- !u!114 &3853166056183932101 |
| | | MonoBehaviour: |
| | | m_ObjectHideFlags: 0 |
| | | m_CorrespondingSourceObject: {fileID: 0} |
| | | m_PrefabInstance: {fileID: 0} |
| | | m_PrefabAsset: {fileID: 0} |
| | | m_GameObject: {fileID: 2191058698392289649} |
| | | m_Enabled: 1 |
| | | m_EditorHideFlags: 0 |
| | | m_Script: {fileID: 11500000, guid: f34b2e8d82a07c541958be6bda6fd604, type: 3} |
| | | m_Name: |
| | | m_EditorClassIdentifier: |
| | | bloodText: {fileID: 0} |
| | | SlowDownWord: {fileID: 293573869288443060} |
| | | CritWord: {fileID: 0} |
New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: a6b04b37cf6c9174eac22f4f691d8c4c |
| | | PrefabImporter: |
| | | externalObjects: {} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | | m_Name: |
| | | m_EditorClassIdentifier: |
| | | bloodText: {fileID: 6612050379255928648} |
| | | SlowDownWord: {fileID: 0} |
| | | CritWord: {fileID: 0} |
| | | --- !u!114 &8440900062448590822 |
| | | MonoBehaviour: |
| | | m_ObjectHideFlags: 0 |
| | |
| | | m_Script: {fileID: 11500000, guid: 59d007c1fe5e41c1888e4af3392f8676, type: 3} |
| | | m_Name: |
| | | m_EditorClassIdentifier: |
| | | initialPoolCapacity: 100 |
| | | initialPoolCapacity: 0 |
| | | --- !u!114 &6612050379255928648 |
| | | MonoBehaviour: |
| | | m_ObjectHideFlags: 0 |
| | |
| | | m_Name: |
| | | m_EditorClassIdentifier: |
| | | bloodText: {fileID: 6612050379255928648} |
| | | SlowDownWord: {fileID: 0} |
| | | CritWord: {fileID: 0} |
| | | --- !u!114 &8440900062448590822 |
| | | MonoBehaviour: |
| | | m_ObjectHideFlags: 0 |
| | |
| | | m_Script: {fileID: 11500000, guid: 59d007c1fe5e41c1888e4af3392f8676, type: 3} |
| | | m_Name: |
| | | m_EditorClassIdentifier: |
| | | initialPoolCapacity: 100 |
| | | initialPoolCapacity: 0 |
| | | --- !u!114 &6612050379255928648 |
| | | MonoBehaviour: |
| | | m_ObjectHideFlags: 0 |
| | |
| | | type: 3} |
| | | bloodCrit: {fileID: 8440900062448590821, guid: cab622f1453af2648981d24b37b76ee9, |
| | | type: 3} |
| | | SlowDownWord: {fileID: 293573869288443060, guid: a6b04b37cf6c9174eac22f4f691d8c4c, |
| | | type: 3} |
| | | CritWord: {fileID: 8715720225615642531, guid: d50687f6a62a08745981a9e471357e9c, |
| | | type: 3} |
| | | TowerUpgradeEffectPrefab: {fileID: 6847503030253729540, guid: f8ec855cfd7e13a4ebb2f2cbb8bbc480, |
| | | type: 3} |
| | | TowerAppearEffectPrefab: {fileID: 1600692593755992933, guid: 3ac90252c12eda44094c4979e1677cbf, |
| | |
| | | { |
| | | Vector3 backPos = this.transform.position; |
| | | this.TakeDamage(poisonHurt, this.transform.position, null, poisonAttid); |
| | | if ((poisonHurt > 0) && (!opponentAgent)) |
| | | { |
| | | if (GameUI.instanceExists) |
| | | GameUI.instance.generateBloodText(backPos, poisonHurt, false, true); |
| | | else if (EndlessGameUI.instanceExists) |
| | | EndlessGameUI.instance.generateBloodText(backPos, poisonHurt, false, true); |
| | | } |
| | | // if ((poisonHurt > 0) && (!opponentAgent)) |
| | | // { |
| | | // if (GameUI.instanceExists) |
| | | // GameUI.instance.generateBloodText(backPos, poisonHurt, false, true); |
| | | // else if (EndlessGameUI.instanceExists) |
| | | // EndlessGameUI.instance.generateBloodText(backPos, poisonHurt, false, true); |
| | | // } |
| | | |
| | | if (poisonHurt > 0) |
| | | timeToPoisonHurt = 1.0f; |
| | |
| | | eag.TakeDamage(damage, fpos, null); |
| | | if (!eag.opponentAgent) |
| | | { |
| | | if (GameUI.instanceExists) |
| | | GameUI.instance.generateBloodText(fpos, damage); |
| | | else if (EndlessGameUI.instanceExists) |
| | | EndlessGameUI.instance.generateBloodText(fpos, damage); |
| | | // if (GameUI.instanceExists) |
| | | // GameUI.instance.generateBloodText(fpos, damage); |
| | | // else if (EndlessGameUI.instanceExists) |
| | | // EndlessGameUI.instance.generateBloodText(fpos, damage); |
| | | } |
| | | |
| | | if (!isDeath && eag.isDead) |
| | |
| | | eag.TakeDamage(damage, fpos, null); |
| | | if (!eag.opponentAgent) |
| | | { |
| | | if (GameUI.instanceExists) |
| | | GameUI.instance.generateBloodText(fpos, damage); |
| | | else if (EndlessGameUI.instanceExists) |
| | | EndlessGameUI.instance.generateBloodText(fpos, damage); |
| | | // if (GameUI.instanceExists) |
| | | // GameUI.instance.generateBloodText(fpos, damage); |
| | | // else if (EndlessGameUI.instanceExists) |
| | | // EndlessGameUI.instance.generateBloodText(fpos, damage); |
| | | } |
| | | |
| | | eag.PlayFireSkillHit(); |
| | |
| | | eag.TakeDamage(damage, fpos, null); |
| | | if (!eag.opponentAgent) |
| | | { |
| | | if (GameUI.instanceExists) |
| | | GameUI.instance.generateBloodText(fpos, damage); |
| | | else if (EndlessGameUI.instanceExists) |
| | | EndlessGameUI.instance.generateBloodText(fpos, damage); |
| | | // if (GameUI.instanceExists) |
| | | // GameUI.instance.generateBloodText(fpos, damage); |
| | | // else if (EndlessGameUI.instanceExists) |
| | | // EndlessGameUI.instance.generateBloodText(fpos, damage); |
| | | } |
| | | |
| | | eag.PlayFireSkillHit(); |
| | |
| | | eag.TakeDamage(damage, fpos, null); |
| | | if (!eag.opponentAgent) |
| | | { |
| | | if (GameUI.instanceExists) |
| | | GameUI.instance.generateBloodText(fpos, damage); |
| | | else if (EndlessGameUI.instanceExists) |
| | | EndlessGameUI.instance.generateBloodText(fpos, damage); |
| | | // if (GameUI.instanceExists) |
| | | // GameUI.instance.generateBloodText(fpos, damage); |
| | | // else if (EndlessGameUI.instanceExists) |
| | | // EndlessGameUI.instance.generateBloodText(fpos, damage); |
| | | } |
| | | if (eag.isDead) |
| | | ++deathCount; |
| | |
| | | Damager damager = ag.GetComponent<Damager>(); |
| | | ag.TakeDamage(chainAttackHurt, ag.position, alignment); |
| | | // 处理飘字效果: |
| | | if ((ag.liveID == tid) && (!ag.opponentAgent)) |
| | | { |
| | | if (GameUI.instanceExists) |
| | | GameUI.instance.generateBloodText(ag.position, chainAttackHurt); |
| | | else if (EndlessGameUI.instanceExists) |
| | | EndlessGameUI.instance.generateBloodText(ag.position, chainAttackHurt); |
| | | } |
| | | // if ((ag.liveID == tid) && (!ag.opponentAgent)) |
| | | // { |
| | | // if (GameUI.instanceExists) |
| | | // GameUI.instance.generateBloodText(ag.position, chainAttackHurt); |
| | | // else if (EndlessGameUI.instanceExists) |
| | | // EndlessGameUI.instance.generateBloodText(ag.position, chainAttackHurt); |
| | | // } |
| | | } |
| | | listBlood.Clear(); |
| | | |
| | |
| | | |
| | | // 这里也可以把碰撞点传进来 |
| | | enemy.TakeDamage(basicDamage, enemy.position, damager.alignmentProvider); |
| | | EndlessGameUI.instance.generateBloodText(backPos, basicDamage); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | { |
| | | if (GameUI.instanceExists) |
| | | GameUI.instance.generateBloodText(backPos, basicDamage, crit); |
| | | else if (EndlessGameUI.instanceExists) |
| | | EndlessGameUI.instance.generateBloodText(backPos, basicDamage, crit); |
| | | else if (EndlessGameUI.instanceExists && crit) |
| | | EndlessGameUI.instance.FloatCritWord(backPos); |
| | | } |
| | | |
| | | // 播放受击动画: |
| | |
| | | { |
| | | agent.addSpeedSlowRate(0.15f); |
| | | agent.PlayOnHitImmediately(); |
| | | EndlessGameUI.instance.generateBloodText(agent.position, damage); |
| | | EndlessGameUI.instance.FloatSlowDownWord(agent.position); |
| | | agent.TakeDamage(damage, agent.position, alignmentProvider); |
| | | |
| | | if (agent.isDead) |
| | |
| | | public TextMoveDoTween bloodCrit; |
| | | |
| | | /// <summary> |
| | | /// 减速飘字 |
| | | /// </summary> |
| | | public Image SlowDownWord; |
| | | |
| | | /// <summary> |
| | | /// 暴击飘字 |
| | | /// </summary> |
| | | public Image CritWord; |
| | | |
| | | /// <summary> |
| | | /// 购买塔防按钮上的Text. |
| | | /// </summary> |
| | | protected TextMeshProUGUI towerPriceText; |
| | | |
| | | //protected TextMeshProUGUI towerPriceText1; |
| | | |
| | | protected bool tdBuyDisable = false; |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 减速飘字 |
| | | /// </summary> |
| | | public void FloatSlowDownWord(Vector3 worldPos) |
| | | { |
| | | Vector3 screenPos = m_Camera.WorldToScreenPoint(worldPos); |
| | | GameObject obj = Instantiate(SlowDownWord.gameObject); |
| | | obj.GetComponent<Transform>().SetParent(GameObject.Find("MainUI/TextPanel").GetComponent<Transform>(), false); |
| | | obj.GetComponent<TextMoveDoTween>().FloatSlowDownWord(screenPos.x, screenPos.y); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 暴击飘字 |
| | | /// </summary> |
| | | public void FloatCritWord(Vector3 worldPos) |
| | | { |
| | | Vector3 screenPos = m_Camera.WorldToScreenPoint(worldPos); |
| | | GameObject obj = Instantiate(CritWord.gameObject); |
| | | obj.GetComponent<Transform>().SetParent(GameObject.Find("MainUI/TextPanel").GetComponent<Transform>(), false); |
| | | obj.GetComponent<TextMoveDoTween>().FloatCritWord(screenPos.x, screenPos.y); |
| | | } |
| | | |
| | | private void Start() |
| | | { |
| | | // 获取相应的放置区域。 |
| | |
| | | using Core.Utilities; |
| | | using DG.Tweening; |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using TMPro; |
| | | using TowerDefense.UI.HUD; |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | |
| | | public class TextMoveDoTween : MonoBehaviour |
| | | { |
| | | public TextMeshProUGUI bloodText; |
| | | |
| | | public Image SlowDownWord; |
| | | |
| | | public Image CritWord; |
| | | |
| | | // Start is called before the first frame update |
| | | void Start() |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 减速飘字 |
| | | /// </summary> |
| | | /// <param name="x"></param> |
| | | /// <param name="y"></param> |
| | | public void FloatSlowDownWord(float x, float y) |
| | | { |
| | | // 先设置Text的位置到一个标准位置 |
| | | Vector3 pos = SlowDownWord.transform.position; |
| | | pos.x = x; |
| | | pos.y = y; |
| | | pos.z = 0; |
| | | SlowDownWord.transform.position = pos; |
| | | |
| | | Vector3 sval = SlowDownWord.transform.localScale; |
| | | sval.x = 1.0f; |
| | | sval.y = 1.0f; |
| | | sval.z = 1.0f; |
| | | SlowDownWord.transform.localScale = sval * scaleOffect; |
| | | |
| | | WordMove(SlowDownWord); |
| | | } |
| | | |
| | | public void FloatCritWord(float x, float y) |
| | | { |
| | | // 先设置Text的位置到一个标准位置 |
| | | Vector3 pos = CritWord.transform.position; |
| | | pos.x = x; |
| | | pos.y = y; |
| | | pos.z = 0; |
| | | CritWord.transform.position = pos; |
| | | |
| | | Vector3 sval = CritWord.transform.localScale; |
| | | sval.x = 1.0f; |
| | | sval.y = 1.0f; |
| | | sval.z = 1.0f; |
| | | CritWord.transform.localScale = sval * scaleOffect; |
| | | |
| | | WordMove(CritWord, true); |
| | | } |
| | | |
| | | private void WordMove(Graphic graphic, bool crit = false) |
| | | { |
| | | //获得Text的rectTransform,和颜色,并设置颜色微透明 |
| | | RectTransform rect = graphic.rectTransform; |
| | | |
| | | Color color = graphic.color; |
| | | |
| | | graphic.color = new Color(color.r, color.g, color.b, 0); |
| | | |
| | | //设置一个DOTween队列 |
| | | Sequence textMoveSequence = DOTween.Sequence(); |
| | | |
| | | System.Random rd = new System.Random(); |
| | | |
| | | |
| | | //设置Text移动和透明度的变化值\ |
| | | float baseTime = 0.3f; |
| | | if (crit) |
| | | baseTime = 0.2f; |
| | | float scaleUp = 1.8f * scaleOffect; |
| | | if (crit) |
| | | scaleUp = 2.2f * scaleOffect; |
| | | float scaleVec = Screen.height / 2400f; |
| | | int basey = rd.Next((int)(100 * scaleVec), (int)(180 * scaleVec)); |
| | | if (crit) |
| | | basey = rd.Next((int)(150 * scaleVec), (int)(210 * scaleVec)); |
| | | |
| | | int basex; |
| | | if (crit) |
| | | basex = rd.Next(-30, 30); |
| | | else |
| | | basex = rd.Next(35, 55); |
| | | |
| | | Tweener textMove01 = rect.DOMoveY(rect.position.y + basey, baseTime); |
| | | Tweener textMovex = rect.DOMoveX(rect.position.x + basex, baseTime); |
| | | Tweener textMove02 = rect.DOMoveY(rect.position.y + basey + (int)(60 * scaleVec), baseTime); |
| | | Tweener textColor01 = graphic.DOColor(new Color(color.r, color.g, color.b, 1), baseTime); |
| | | Tweener textColor02 = graphic.DOColor(new Color(color.r, color.g, color.b, 0), baseTime); |
| | | Tweener textScale = rect.DOScale(scaleUp, 0.25f); |
| | | |
| | | //Append 追加一个队列,Join 添加一个队列 |
| | | //中间间隔一秒 |
| | | //Append 再追加一个队列,再Join 添加一个队列 |
| | | textMoveSequence.Append(textMove01); |
| | | textMoveSequence.Join(textMovex); |
| | | textMoveSequence.Join(textColor01); |
| | | // 中断一下. |
| | | textMoveSequence.AppendInterval(0.3f + (float)rd.NextDouble() * 0.3f); |
| | | // 向上变大淡出 |
| | | textMoveSequence.Append(textMove02); |
| | | textMoveSequence.Join(textColor02); |
| | | textMoveSequence.Join(textScale); |
| | | textMoveSequence.AppendCallback(DestroyWord); |
| | | } |
| | | |
| | | protected void DestroyWord() |
| | | { |
| | | Destroy(gameObject); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 清空当前的DoTweenMove数据并把数据放到Pool中. |
| | | /// </summary> |
| | | protected void Remove() |
New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: f307fd11ce23aad448205847b52bb224 |
| | | 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: -100 |
| | | wrapU: 1 |
| | | wrapV: 1 |
| | | wrapW: -1 |
| | | nPOTScale: 0 |
| | | lightmap: 0 |
| | | compressionQuality: 50 |
| | | spriteMode: 1 |
| | | spriteExtrude: 1 |
| | | spriteMeshType: 1 |
| | | alignment: 0 |
| | | spritePivot: {x: 0.5, y: 0.5} |
| | | spritePixelsToUnits: 100 |
| | | spriteBorder: {x: 0, y: 0, z: 0, w: 0} |
| | | spriteGenerateFallbackPhysicsShape: 1 |
| | | alphaUsage: 1 |
| | | alphaIsTransparency: 1 |
| | | spriteTessellationDetail: -1 |
| | | textureType: 8 |
| | | textureShape: 1 |
| | | singleChannelComponent: 0 |
| | | maxTextureSizeSet: 0 |
| | | compressionQualitySet: 0 |
| | | textureFormatSet: 0 |
| | | 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 |
| | | - serializedVersion: 3 |
| | | buildTarget: Android |
| | | maxTextureSize: 2048 |
| | | resizeAlgorithm: 0 |
| | | textureFormat: 4 |
| | | textureCompression: 1 |
| | | compressionQuality: 50 |
| | | crunchedCompression: 0 |
| | | allowsAlphaSplitting: 0 |
| | | overridden: 1 |
| | | 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: |
New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: caf683e4f8ed0be47ad00f33ac3edb3a |
| | | 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: -100 |
| | | wrapU: 1 |
| | | wrapV: 1 |
| | | wrapW: -1 |
| | | nPOTScale: 0 |
| | | lightmap: 0 |
| | | compressionQuality: 50 |
| | | spriteMode: 1 |
| | | spriteExtrude: 1 |
| | | spriteMeshType: 1 |
| | | alignment: 0 |
| | | spritePivot: {x: 0.5, y: 0.5} |
| | | spritePixelsToUnits: 100 |
| | | spriteBorder: {x: 0, y: 0, z: 0, w: 0} |
| | | spriteGenerateFallbackPhysicsShape: 1 |
| | | alphaUsage: 1 |
| | | alphaIsTransparency: 1 |
| | | spriteTessellationDetail: -1 |
| | | textureType: 8 |
| | | textureShape: 1 |
| | | singleChannelComponent: 0 |
| | | maxTextureSizeSet: 0 |
| | | compressionQualitySet: 0 |
| | | textureFormatSet: 0 |
| | | 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 |
| | | - serializedVersion: 3 |
| | | buildTarget: Android |
| | | maxTextureSize: 2048 |
| | | resizeAlgorithm: 0 |
| | | textureFormat: 4 |
| | | textureCompression: 1 |
| | | compressionQuality: 50 |
| | | crunchedCompression: 0 |
| | | allowsAlphaSplitting: 0 |
| | | overridden: 1 |
| | | 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: |