29 changed files with 559 additions and 45 deletions
@ -0,0 +1,8 @@ |
|||||
|
fileFormatVersion: 2 |
||||
|
guid: 6084914329ce1a942983a04197d65939 |
||||
|
folderAsset: yes |
||||
|
DefaultImporter: |
||||
|
externalObjects: {} |
||||
|
userData: |
||||
|
assetBundleName: |
||||
|
assetBundleVariant: |
||||
@ -0,0 +1,8 @@ |
|||||
|
fileFormatVersion: 2 |
||||
|
guid: a7e11b54a2cdf1d4ea4a034c00094bdf |
||||
|
folderAsset: yes |
||||
|
DefaultImporter: |
||||
|
externalObjects: {} |
||||
|
userData: |
||||
|
assetBundleName: |
||||
|
assetBundleVariant: |
||||
@ -0,0 +1,22 @@ |
|||||
|
%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: 84838e1060cbc4f45a2f463816b2d2fe, type: 3} |
||||
|
m_Name: DeformSettings |
||||
|
m_EditorClassIdentifier: |
||||
|
solidHandleColor: {r: 1, g: 0.4, b: 0, a: 1} |
||||
|
lightHandleColor: {r: 1, g: 0.4, b: 0, a: 0.75} |
||||
|
recordingHandleColor: {r: 1, g: 0, b: 0, a: 0.9} |
||||
|
dottedLineSize: 5 |
||||
|
screenspaceHandleCapSize: 0.0275 |
||||
|
screenspaceAngleHandleSize: 1.25 |
||||
|
screenspaceLatticeCapSize: 0.035 |
||||
|
modelsReadableByDefault: 0 |
||||
@ -0,0 +1,8 @@ |
|||||
|
fileFormatVersion: 2 |
||||
|
guid: 6bc3ffa9a9b76044a87687a1a30ef4be |
||||
|
NativeFormatImporter: |
||||
|
externalObjects: {} |
||||
|
mainObjectFileID: 11400000 |
||||
|
userData: |
||||
|
assetBundleName: |
||||
|
assetBundleVariant: |
||||
|
After Width: | Height: | Size: 753 KiB |
@ -0,0 +1,127 @@ |
|||||
|
fileFormatVersion: 2 |
||||
|
guid: 2f7c7e2877b292942973149249a39684 |
||||
|
TextureImporter: |
||||
|
internalIDToNameTable: [] |
||||
|
externalObjects: {} |
||||
|
serializedVersion: 12 |
||||
|
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: 0 |
||||
|
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 |
||||
|
swizzle: 50462976 |
||||
|
cookieLightType: 0 |
||||
|
platformSettings: |
||||
|
- serializedVersion: 3 |
||||
|
buildTarget: DefaultTexturePlatform |
||||
|
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: 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: Server |
||||
|
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: |
||||
|
After Width: | Height: | Size: 753 KiB |
@ -0,0 +1,127 @@ |
|||||
|
fileFormatVersion: 2 |
||||
|
guid: 123512f9faead4d4da8eb3aecef0b09e |
||||
|
TextureImporter: |
||||
|
internalIDToNameTable: [] |
||||
|
externalObjects: {} |
||||
|
serializedVersion: 12 |
||||
|
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: 0 |
||||
|
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 |
||||
|
swizzle: 50462976 |
||||
|
cookieLightType: 0 |
||||
|
platformSettings: |
||||
|
- serializedVersion: 3 |
||||
|
buildTarget: DefaultTexturePlatform |
||||
|
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: 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: Server |
||||
|
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: |
||||
|
After Width: | Height: | Size: 753 KiB |
@ -0,0 +1,127 @@ |
|||||
|
fileFormatVersion: 2 |
||||
|
guid: 89ef6d1bd01c2da4cab21c0c2191f6d3 |
||||
|
TextureImporter: |
||||
|
internalIDToNameTable: [] |
||||
|
externalObjects: {} |
||||
|
serializedVersion: 12 |
||||
|
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: 0 |
||||
|
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 |
||||
|
swizzle: 50462976 |
||||
|
cookieLightType: 0 |
||||
|
platformSettings: |
||||
|
- serializedVersion: 3 |
||||
|
buildTarget: DefaultTexturePlatform |
||||
|
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: 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: Server |
||||
|
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: |
||||
@ -0,0 +1,57 @@ |
|||||
|
using System; |
||||
|
using System.Collections; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Text.RegularExpressions; |
||||
|
using UnityEngine; |
||||
|
|
||||
|
public class CardManager : Singleton<CardManager> |
||||
|
{ |
||||
|
public string switchCardCondition(string orginalCardId, CardOriginalData cardOriginalData, string newColor, int conditionCount) |
||||
|
{ |
||||
|
CardOriginalData newCardOriginalData=cardOriginalData; |
||||
|
string condition = newCardOriginalData.conditionAndFunctionVal.ElementAt(conditionCount).Key; |
||||
|
string pattern = @"(\w+)([><=])(\d+)"; |
||||
|
newCardOriginalData.originFunctionVal.Clear(); |
||||
|
Match match = Regex.Match(condition, pattern); |
||||
|
if (match.Success) |
||||
|
{ |
||||
|
string beforecolor = match.Groups[1].Value; // 颜色部分
|
||||
|
string op = match.Groups[2].Value; // 运算符部分
|
||||
|
string number = match.Groups[3].Value; // 数值部分
|
||||
|
Tuple<string, string> value = newCardOriginalData.conditionAndFunctionVal[beforecolor]; |
||||
|
string newCondition=newColor+op+number; |
||||
|
newCardOriginalData.conditionAndFunctionVal.Remove(beforecolor); |
||||
|
newCardOriginalData.conditionAndFunctionVal.Add(newCondition, value); |
||||
|
} |
||||
|
string newCardId=AddElementToDictionary(CardOriginalDataList.Instance.existCardOriginalDataList, cardOriginalData.CardId, newCardOriginalData); |
||||
|
return newCardId; |
||||
|
} |
||||
|
|
||||
|
public string switchCardColor(string orginalCardId, CardOriginalData cardOriginalData, string newColor) |
||||
|
{ |
||||
|
CardOriginalData newCardOriginalData = cardOriginalData; |
||||
|
for (int i = 0; i < newCardOriginalData.nodesColor.Length; i++) |
||||
|
{ |
||||
|
newCardOriginalData.nodesColor[i] = newColor; |
||||
|
} |
||||
|
string newCardImgPath = "CardIcon/" + cardOriginalData.EffectRange + newColor; |
||||
|
cardOriginalData.ImgPath = newCardImgPath; |
||||
|
string newCardId = AddElementToDictionary(CardOriginalDataList.Instance.existCardOriginalDataList, cardOriginalData.CardId, newCardOriginalData); |
||||
|
return newCardId; |
||||
|
} |
||||
|
public static string AddElementToDictionary(Dictionary<string, CardOriginalData> dictionary, string baseKey, CardOriginalData value) |
||||
|
{ |
||||
|
string key = baseKey; |
||||
|
int counter = 1; |
||||
|
|
||||
|
while (dictionary.ContainsKey(key)) |
||||
|
{ |
||||
|
key = baseKey + counter.ToString(); |
||||
|
counter++; |
||||
|
} |
||||
|
|
||||
|
dictionary.Add(key, value); |
||||
|
return key; |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,11 @@ |
|||||
|
fileFormatVersion: 2 |
||||
|
guid: ca1e05724f689024392e0ea50533f6ad |
||||
|
MonoImporter: |
||||
|
externalObjects: {} |
||||
|
serializedVersion: 2 |
||||
|
defaultReferences: [] |
||||
|
executionOrder: 0 |
||||
|
icon: {instanceID: 0} |
||||
|
userData: |
||||
|
assetBundleName: |
||||
|
assetBundleVariant: |
||||
Binary file not shown.
Loading…
Reference in new issue