Finished poison

This commit is contained in:
Беляев Даниил 2022-02-13 21:56:03 +03:00
parent efc1780110
commit 3e56a55e37
21 changed files with 2540 additions and 2789 deletions

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

View File

@ -0,0 +1,96 @@
fileFormatVersion: 2
guid: 664fb4e4278a75745bf61ff9b2105118
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:

View File

@ -34,8 +34,8 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -117.750244, y: 116.80835} m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 335.5006, y: 333.6166} m_SizeDelta: {x: 367.8733, y: 352.1152}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &109837387070460922 --- !u!222 &109837387070460922
CanvasRenderer: CanvasRenderer:
@ -58,7 +58,7 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
m_Material: {fileID: 0} m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1} m_Color: {r: 0, g: 0, b: 0, a: 1}
m_RaycastTarget: 1 m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1 m_Maskable: 1
@ -110,7 +110,7 @@ RectTransform:
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 164.1519, y: 68.6638} m_SizeDelta: {x: 728.59, y: 740.59}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &3780427103887971505 --- !u!222 &3780427103887971505
CanvasRenderer: CanvasRenderer:
@ -142,11 +142,11 @@ MonoBehaviour:
m_Calls: [] m_Calls: []
m_FontData: m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 50 m_FontSize: 200
m_FontStyle: 0 m_FontStyle: 0
m_BestFit: 0 m_BestFit: 0
m_MinSize: 0 m_MinSize: 0
m_MaxSize: 50 m_MaxSize: 300
m_Alignment: 4 m_Alignment: 4
m_AlignByGeometry: 0 m_AlignByGeometry: 0
m_RichText: 1 m_RichText: 1

View File

@ -307,4 +307,4 @@ MonoBehaviour:
effectPrefab: {fileID: 8365349782809087845, guid: 68a81a1d82a983543b7f52b5dd9a9190, type: 3} effectPrefab: {fileID: 8365349782809087845, guid: 68a81a1d82a983543b7f52b5dd9a9190, type: 3}
effectIcons: effectIcons:
- name: poison - name: poison
icon: {fileID: 21300000, guid: aaede90ffe96b2940b8e63f884f5e7d4, type: 3} icon: {fileID: 21300000, guid: 664fb4e4278a75745bf61ff9b2105118, type: 3}

View File

@ -27,7 +27,7 @@ MonoBehaviour:
enemyCount: 0 enemyCount: 0
effects: effects:
- effect: 0 - effect: 0
turns: 1 turns: 2
damage: 1 damage: 1
quantityStamina2: 0 quantityStamina2: 0
quantityHealth2: 0 quantityHealth2: 0

View File

@ -17,9 +17,21 @@ MonoBehaviour:
picture: {fileID: 21300000, guid: 81903c5799d202f458fd2fa30bb13cd9, type: 3} picture: {fileID: 21300000, guid: 81903c5799d202f458fd2fa30bb13cd9, type: 3}
description: This is small damage description: This is small damage
specialization: 0 specialization: 0
improvedLevel: 0
quantityStamina: 1 quantityStamina: 1
quantityHealth: 0 quantityHealth: 0
damage: 5 damage: 5
healing: 0 addHealth: 0
addStamina: 0 addStamina: 0
armor: 0 addArmor: 0
enemyCount: 0
effects:
- effect: 0
turns: 1
damage: 1
quantityStamina2: 0
quantityHealth2: 0
damage2: 0
addHealth2: 0
addStamina2: 0
addArmor2: 0

View File

@ -189,6 +189,7 @@ public class DeckManager : MonoBehaviour
enemy.effectsName.Add(currentCard.CardCharacteristics.effects[i].effect.ToString()); enemy.effectsName.Add(currentCard.CardCharacteristics.effects[i].effect.ToString());
enemy.effectsDamage.Add(currentCard.CardCharacteristics.effects[i].damage); enemy.effectsDamage.Add(currentCard.CardCharacteristics.effects[i].damage);
enemy.effectsTurns.Add(currentCard.CardCharacteristics.effects[i].turns); enemy.effectsTurns.Add(currentCard.CardCharacteristics.effects[i].turns);
LibraryEffects.main.InstantiateEffect(currentCard.CardCharacteristics.effects[i].effect.ToString(), enemy.gameObject, currentCard.CardCharacteristics.effects[i].damage);
} }
} }

View File

@ -127,22 +127,22 @@ public class Enemy : MonoBehaviour
{ {
for (int i = 0; i < effectsName.Count; i++) for (int i = 0; i < effectsName.Count; i++)
{ {
for (int j = 0; j < effectsLink.Count; j++) if (effectsName[i] == "poison")
{ {
effectsLink.RemoveAt(j); LibraryEffects.main.Poison(gameObject, effectsDamage[i]);
//LibraryEffects.main.InstantiateEffect("poison", gameObject, effectsDamage[i]);
effectsTurns[i] -= 1;
} }
effectsLink.Clear(); if (effectsTurns[i] == 0)
if(effectsTurns[i] == 0)
{ {
effectsName.Remove(effectsName[i]); effectsName.Remove(effectsName[i]);
effectsTurns.Remove(effectsTurns[i]); effectsTurns.Remove(effectsTurns[i]);
effectsDamage.Remove(effectsDamage[i]); effectsDamage.Remove(effectsDamage[i]);
} for (int j = 0; j < effectsLink.Count; j++)
else if(effectsName[i] == "poison") {
{ Destroy(effectsLink[0]);
LibraryEffects.main.Poison(gameObject, effectsDamage[i]); }
effectsTurns[i] -= 1; effectsLink.Clear();
} }
} }
} }

View File

@ -26,17 +26,23 @@ public class LibraryEffects : MonoBehaviour
} }
public void Poison(GameObject _enemy, int _damage) public void Poison(GameObject _enemy, int _damage)
{
_enemy.GetComponent<Enemy>().ChangeHp(_damage);
}
public void InstantiateEffect(string _name, GameObject _parent, int _damageText)
{ {
for (int i = 0; i < effectIcons.Length; i++) for (int i = 0; i < effectIcons.Length; i++)
{ {
if(effectIcons[i].name == "poison") if (effectIcons[i].name == _name)
{ {
effectPrefab.GetComponentInChildren<Image>().sprite = effectIcons[i].icon; effectPrefab.GetComponentInChildren<Image>().sprite = effectIcons[i].icon;
} }
} }
effectPrefab.GetComponentInChildren<Text>().text = _damage.ToString(); var _move = new Vector3(520, -369, 0);
_enemy.GetComponent<Enemy>().ChangeHp(_damage); effectPrefab.GetComponentInChildren<Text>().text = _damageText.ToString();
GameObject link = Instantiate(effectPrefab, _enemy.transform); GameObject link = Instantiate(effectPrefab, _parent.transform);
_enemy.GetComponent<Enemy>().effectsLink.Add(link); link.transform.localPosition = _move;
_parent.GetComponent<Enemy>().effectsLink.Add(link);
} }
} }

Binary file not shown.

View File

@ -21,7 +21,7 @@ MonoBehaviour:
m_ShowMode: 4 m_ShowMode: 4
m_Title: Game m_Title: Game
m_RootView: {fileID: 6} m_RootView: {fileID: 6}
m_MinSize: {x: 875, y: 542} m_MinSize: {x: 875, y: 300}
m_MaxSize: {x: 10000, y: 10000} m_MaxSize: {x: 10000, y: 10000}
m_Maximized: 1 m_Maximized: 1
--- !u!114 &2 --- !u!114 &2
@ -45,10 +45,10 @@ MonoBehaviour:
y: 30 y: 30
width: 1920 width: 1920
height: 947 height: 947
m_MinSize: {x: 677, y: 492} m_MinSize: {x: 679, y: 492}
m_MaxSize: {x: 14001, y: 14042} m_MaxSize: {x: 14002, y: 14042}
vertical: 0 vertical: 0
controlID: 113 controlID: 111
--- !u!114 &3 --- !u!114 &3
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 52 m_ObjectHideFlags: 52
@ -68,8 +68,8 @@ MonoBehaviour:
y: 0 y: 0
width: 389 width: 389
height: 947 height: 947
m_MinSize: {x: 275, y: 50} m_MinSize: {x: 276, y: 71}
m_MaxSize: {x: 4000, y: 4000} m_MaxSize: {x: 4001, y: 4021}
m_ActualView: {fileID: 15} m_ActualView: {fileID: 15}
m_Panes: m_Panes:
- {fileID: 15} - {fileID: 15}
@ -95,8 +95,8 @@ MonoBehaviour:
y: 0 y: 0
width: 379 width: 379
height: 589 height: 589
m_MinSize: {x: 200, y: 200} m_MinSize: {x: 201, y: 221}
m_MaxSize: {x: 4000, y: 4000} m_MaxSize: {x: 4001, y: 4021}
m_ActualView: {fileID: 16} m_ActualView: {fileID: 16}
m_Panes: m_Panes:
- {fileID: 16} - {fileID: 16}
@ -224,10 +224,10 @@ MonoBehaviour:
y: 0 y: 0
width: 1531 width: 1531
height: 947 height: 947
m_MinSize: {x: 402, y: 492} m_MinSize: {x: 403, y: 492}
m_MaxSize: {x: 10001, y: 14042} m_MaxSize: {x: 10001, y: 14042}
vertical: 1 vertical: 1
controlID: 16 controlID: 112
--- !u!114 &10 --- !u!114 &10
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 52 m_ObjectHideFlags: 52
@ -249,10 +249,10 @@ MonoBehaviour:
y: 0 y: 0
width: 1531 width: 1531
height: 589 height: 589
m_MinSize: {x: 402, y: 221} m_MinSize: {x: 403, y: 221}
m_MaxSize: {x: 8002, y: 4021} m_MaxSize: {x: 8003, y: 4021}
vertical: 0 vertical: 0
controlID: 17 controlID: 113
--- !u!114 &11 --- !u!114 &11
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 52 m_ObjectHideFlags: 52
@ -369,22 +369,22 @@ MonoBehaviour:
m_SkipHidden: 0 m_SkipHidden: 0
m_SearchArea: 1 m_SearchArea: 1
m_Folders: m_Folders:
- Assets/Prefabs - Assets/Graphics/Effects
m_Globs: [] m_Globs: []
m_OriginalText: m_OriginalText:
m_ViewMode: 1 m_ViewMode: 1
m_StartGridSize: 64 m_StartGridSize: 64
m_LastFolders: m_LastFolders:
- Assets/Prefabs - Assets/Graphics/Effects
m_LastFoldersGridSize: -1 m_LastFoldersGridSize: -1
m_LastProjectPath: "E:\\Projects \u0441#\\Unity\\omega" m_LastProjectPath: "E:\\Projects \u0441#\\Unity\\omega"
m_LockTracker: m_LockTracker:
m_IsLocked: 0 m_IsLocked: 0
m_FolderTreeState: m_FolderTreeState:
scrollPos: {x: 0, y: 35} scrollPos: {x: 0, y: 0}
m_SelectedIDs: 18470000 m_SelectedIDs: e6580000
m_LastClickedID: 18200 m_LastClickedID: 22758
m_ExpandedIDs: 000000000e470000124700001c4700002247000000ca9a3b m_ExpandedIDs: 00000000264700002c470000364700008e50000000ca9a3b
m_RenameOverlay: m_RenameOverlay:
m_UserAcceptedRename: 0 m_UserAcceptedRename: 0
m_Name: m_Name:
@ -412,7 +412,7 @@ MonoBehaviour:
scrollPos: {x: 0, y: 0} scrollPos: {x: 0, y: 0}
m_SelectedIDs: m_SelectedIDs:
m_LastClickedID: 0 m_LastClickedID: 0
m_ExpandedIDs: 000000000e470000 m_ExpandedIDs: 0000000026470000
m_RenameOverlay: m_RenameOverlay:
m_UserAcceptedRename: 0 m_UserAcceptedRename: 0
m_Name: m_Name:
@ -533,9 +533,9 @@ MonoBehaviour:
m_SceneHierarchy: m_SceneHierarchy:
m_TreeViewState: m_TreeViewState:
scrollPos: {x: 0, y: 0} scrollPos: {x: 0, y: 0}
m_SelectedIDs: m_SelectedIDs: 7a420000
m_LastClickedID: 0 m_LastClickedID: 17018
m_ExpandedIDs: 46d7ffffbad7ffff60dbffff36e2ffffdce5ffffe2ecffff7ef9ffff3efbffff40fbffffa84300001044000016440000486500005a650000746500004e67000060670000766700007a670000 m_ExpandedIDs: 1a39ffff2639ffffcc3cffff824affffdc4bffffbe4fffff6453ffff5e6bffff669dffff649effff0aa2ffff04f4ffff1ef8ffff40fbffff92590000a4590000ba590000be5900007c6d00008e6d0000a86d0000ae740000c0740000da740000787600008a760000a4760000667c0000787c0000927c0000
m_RenameOverlay: m_RenameOverlay:
m_UserAcceptedRename: 0 m_UserAcceptedRename: 0
m_Name: m_Name:
@ -595,9 +595,9 @@ MonoBehaviour:
m_PlayAudio: 0 m_PlayAudio: 0
m_AudioPlay: 0 m_AudioPlay: 0
m_Position: m_Position:
m_Target: {x: 1502.8994, y: 1105.9774, z: -50.28237} m_Target: {x: 1526.882, y: 958.54706, z: -118.527534}
speed: 2 speed: 2
m_Value: {x: 723.1668, y: 737.3668, z: -39.373474} m_Value: {x: 1526.882, y: 958.54706, z: -118.527534}
m_RenderMode: 0 m_RenderMode: 0
m_CameraMode: m_CameraMode:
drawMode: 0 drawMode: 0
@ -648,9 +648,9 @@ MonoBehaviour:
speed: 2 speed: 2
m_Value: {x: 0, y: 0, z: 0, w: 1} m_Value: {x: 0, y: 0, z: 0, w: 1}
m_Size: m_Size:
m_Target: 217.41884 m_Target: 191.46387
speed: 2 speed: 2
m_Value: 489.8413 m_Value: 191.46387
m_Ortho: m_Ortho:
m_Target: 1 m_Target: 1
speed: 2 speed: 2

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -2,3 +2,5 @@ Base path: 'C:/Program Files/Unity/Hub/Editor/2020.3.19f1/Editor/Data', plugins
Cmd: initializeCompiler Cmd: initializeCompiler
Cmd: shutdown Cmd: shutdown
Quitting shader compiler process

View File

@ -2,3 +2,5 @@ Base path: 'C:/Program Files/Unity/Hub/Editor/2020.3.19f1/Editor/Data', plugins
Cmd: initializeCompiler Cmd: initializeCompiler
Cmd: shutdown Cmd: shutdown
Quitting shader compiler process