made stun + fix bugs

This commit is contained in:
Беляев Даниил 2022-03-06 16:11:48 +03:00
parent 9473298345
commit 50c942535d
32 changed files with 7115 additions and 1064 deletions

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 8.0 KiB

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: aaede90ffe96b2940b8e63f884f5e7d4 guid: 664fb4e4278a75745bf61ff9b2105118
TextureImporter: TextureImporter:
internalIDToNameTable: [] internalIDToNameTable: []
externalObjects: {} externalObjects: {}

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 664fb4e4278a75745bf61ff9b2105118 guid: aaede90ffe96b2940b8e63f884f5e7d4
TextureImporter: TextureImporter:
internalIDToNameTable: [] internalIDToNameTable: []
externalObjects: {} externalObjects: {}

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

View File

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

@ -759,6 +759,11 @@ MonoBehaviour:
localarmor: 0 localarmor: 0
armorIcon: {fileID: 424785889149391059} armorIcon: {fileID: 424785889149391059}
armorText: {fileID: 8930653481890132327} armorText: {fileID: 8930653481890132327}
effectsName: []
effectsTurns:
effectsDamage:
effectsLink: []
hasStun: 0
--- !u!114 &4704034719369620078 --- !u!114 &4704034719369620078
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

View File

@ -308,3 +308,5 @@ MonoBehaviour:
effectIcons: effectIcons:
- name: poison - name: poison
icon: {fileID: 21300000, guid: 664fb4e4278a75745bf61ff9b2105118, type: 3} icon: {fileID: 21300000, guid: 664fb4e4278a75745bf61ff9b2105118, type: 3}
- name: stun
icon: {fileID: 21300000, guid: 6ec6424c00ba76e468b14f90e4bf20b1, type: 3}

View File

@ -26,8 +26,11 @@ MonoBehaviour:
addArmor: 0 addArmor: 0
enemyCount: 0 enemyCount: 0
effects: effects:
- effect: 1
turns: 1
damage: 0
- effect: 0 - effect: 0
turns: 2 turns: 1
damage: 1 damage: 1
CardCharacteristicslvl1: CardCharacteristicslvl1:
cardName: Long Small Damage cardName: Long Small Damage
@ -42,8 +45,11 @@ MonoBehaviour:
addArmor: 0 addArmor: 0
enemyCount: 0 enemyCount: 0
effects: effects:
- effect: 1
turns: 1
damage: 0
- effect: 0 - effect: 0
turns: 2 turns: 1
damage: 1 damage: 1
CardCharacteristicslvl2: CardCharacteristicslvl2:
cardName: cardName:

View File

@ -126,16 +126,17 @@ public class DeckManager : MonoBehaviour
HandingOut(); HandingOut();
if (stamina < 3) if (stamina < 3)
NewStaminaQuantity(stamina + 1); NewStaminaQuantity(stamina + 1);
for (int i = 0; i < Session.main.currentEnemies.Count; i++)
{
Session.main.currentEnemies[i].GetComponent<Enemy>().EffectsBy();
}
//нужна корутина для вражеского хода //нужна корутина для вражеского хода
if (enemyTurn) if (enemyTurn)
StartCoroutine(EnemyStep()); StartCoroutine(EnemyStep());
//а, вот же она //а, вот же она
turn += 1; turn += 1;
for (int i = 0; i < Session.main.currentEnemies.Count; i++)
{
Session.main.currentEnemies[i].GetComponent<Enemy>().EffectsBy();
}
} }
public void MarkersRegulator() public void MarkersRegulator()
{ {

View File

@ -36,6 +36,8 @@ public class Enemy : MonoBehaviour
[HideInInspector] public List<GameObject> effectsLink = new List<GameObject>(); [HideInInspector] public List<GameObject> effectsLink = new List<GameObject>();
[HideInInspector] public bool hasStun = false;
private void Start() private void Start()
{ {
NewInformation(); NewInformation();
@ -130,19 +132,31 @@ public class Enemy : MonoBehaviour
if (effectsName[i] == "poison") if (effectsName[i] == "poison")
{ {
LibraryEffects.main.Poison(gameObject, effectsDamage[i]); LibraryEffects.main.Poison(gameObject, effectsDamage[i]);
//LibraryEffects.main.InstantiateEffect("poison", gameObject, effectsDamage[i]);
effectsTurns[i] -= 1; effectsTurns[i] -= 1;
} }
if (effectsTurns[i] == 0)
if (effectsName[i] == "stun")
{ {
effectsName.Remove(effectsName[i]); LibraryEffects.main.Stun(gameObject);
effectsTurns.Remove(effectsTurns[i]); effectsTurns[i] -= 1;
effectsDamage.Remove(effectsDamage[i]);
for (int j = 0; j < effectsLink.Count; j++)
{
Destroy(effectsLink[0]);
} }
effectsLink.Clear(); }
var _dopCounter = 0;
var _effectsCount = effectsName.Count;
for (int i = 0; i < _effectsCount; i++)
{
if (effectsTurns[_dopCounter] <= 0)
{
effectsName.Remove(effectsName[_dopCounter]);
effectsTurns.Remove(effectsTurns[_dopCounter]);
effectsDamage.Remove(effectsDamage[_dopCounter]);
Destroy(effectsLink[_dopCounter]);
effectsLink.RemoveAt(_dopCounter);
}
else
{
_dopCounter += 1;
} }
} }
} }
@ -189,10 +203,18 @@ public class Enemy : MonoBehaviour
public void Turn() public void Turn()
{ {
int _phase = phaseAttack % attackLoop.Count; int _phase = phaseAttack % attackLoop.Count;
if (hasStun is false)
{
attackLoop[_phase]?.Invoke(); attackLoop[_phase]?.Invoke();
phaseAttack++; phaseAttack++;
UpdateNextStepIconAndText(); UpdateNextStepIconAndText();
} }
else
{
hasStun = true;
}
}
public int CheckHp() public int CheckHp()
{ {

View File

@ -7,17 +7,18 @@ using UnityEditor;
public class LibraryTurnMethods : MonoBehaviour public class LibraryTurnMethods : MonoBehaviour
{ {
private Enemy enemy; private Enemy enemy;
public static LibraryTurnMethods main;
private void Awake() private void Awake()
{ {
enemy = GetComponent<Enemy>(); enemy = GetComponent<Enemy>();
main = this;
} }
public void Attack() public void Attack()
{ {
Player.main.ChangeHp(enemy.enemyConfig.enemyCharacteristics.damage); Player.main.ChangeHp(enemy.enemyConfig.enemyCharacteristics.damage);
} }
@ -109,11 +110,6 @@ public class LibraryTurnMethods : MonoBehaviour
_currentEnemies[i].GetComponent<Enemy>().AddArmor(_addArmorAll); _currentEnemies[i].GetComponent<Enemy>().AddArmor(_addArmorAll);
} }
} }
} }

View File

@ -30,6 +30,11 @@ public class LibraryEffects : MonoBehaviour
_enemy.GetComponent<Enemy>().ChangeHp(_damage); _enemy.GetComponent<Enemy>().ChangeHp(_damage);
} }
public void Stun(GameObject _enemy)
{
_enemy.GetComponent<Enemy>().hasStun = true;
}
public void InstantiateEffect(string _name, GameObject _parent, int _damageText) 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++)

Binary file not shown.

View File

@ -369,22 +369,22 @@ MonoBehaviour:
m_SkipHidden: 0 m_SkipHidden: 0
m_SearchArea: 1 m_SearchArea: 1
m_Folders: m_Folders:
- Assets/Scripts/Configs/CardConfigs - Assets/Prefabs/Enemy
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/Scripts/Configs/CardConfigs - Assets/Prefabs/Enemy
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: 0} scrollPos: {x: 0, y: 79}
m_SelectedIDs: 52470000 m_SelectedIDs: ee470000
m_LastClickedID: 18258 m_LastClickedID: 18414
m_ExpandedIDs: 000000002a4700003e470000424700005247000000ca9a3b m_ExpandedIDs: 000000002a470000144c0000244e0000fe4f0000b653000000ca9a3b
m_RenameOverlay: m_RenameOverlay:
m_UserAcceptedRename: 0 m_UserAcceptedRename: 0
m_Name: m_Name:
@ -437,8 +437,8 @@ MonoBehaviour:
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_ResourceFile: m_ResourceFile:
m_ListAreaState: m_ListAreaState:
m_SelectedInstanceIDs: d0b5ffff m_SelectedInstanceIDs:
m_LastClickedInstanceID: -18992 m_LastClickedInstanceID: 0
m_HadKeyboardFocusLastEvent: 1 m_HadKeyboardFocusLastEvent: 1
m_ExpandedInstanceIDs: c6230000 m_ExpandedInstanceIDs: c6230000
m_RenameOverlay: m_RenameOverlay:
@ -456,7 +456,7 @@ MonoBehaviour:
m_IsRenaming: 0 m_IsRenaming: 0
m_OriginalEventType: 11 m_OriginalEventType: 11
m_IsRenamingFilename: 1 m_IsRenamingFilename: 1
m_ClientGUIView: {fileID: 11} m_ClientGUIView: {fileID: 5}
m_CreateAssetUtility: m_CreateAssetUtility:
m_EndAction: {fileID: 0} m_EndAction: {fileID: 0}
m_InstanceID: 0 m_InstanceID: 0
@ -535,7 +535,7 @@ MonoBehaviour:
scrollPos: {x: 0, y: 0} scrollPos: {x: 0, y: 0}
m_SelectedIDs: m_SelectedIDs:
m_LastClickedID: 0 m_LastClickedID: 0
m_ExpandedIDs: 76b9ffff96660000a8660000c2660000 m_ExpandedIDs: 0a42feff9e5ffeff7eadfeff72b1feff8cb5feff66c0feff80c4feff84e3fefffae3feff14e8feff70eefeff803affff044effffc254ffffdc58ffff2a87ffff9ee0ffff3efbffff40fbffffc64300002e440000344400008a6500009c650000b66500001e71000030710000467100004a7100008076000092760000a8760000ac7600004a7800007278000076780000147b0000267b00003c7b0000407b00007089000082890000988900009c8900003c8b0000648b0000688b00006c9200009492000098920000049600002c96000030960000d0970000f8970000fc9700002ea6000056a600005aa6000096ab0000beab0000c2ab0000
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: 1526.882, y: 958.54706, z: -118.527534} m_Target: {x: 1263.6136, y: 603.8462, z: -41.184925}
speed: 2 speed: 2
m_Value: {x: 1526.882, y: 958.54706, z: -118.527534} m_Value: {x: 1263.6136, y: 603.8462, z: -41.184925}
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: 191.46387 m_Target: 897.4202
speed: 2 speed: 2
m_Value: 191.46387 m_Value: 897.4202
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.

View File

@ -879,3 +879,23 @@ C# parse time : 123ms
candidates check time : 35ms candidates check time : 35ms
console write time : 0ms console write time : 0ms
[api-updater (non-obsolete-error-filter)] 06.03.2022 15:15:01 : Starting C:/Program Files/Unity/Hub/Editor/2020.3.19f1/Editor/Data/Tools/ScriptUpdater/APIUpdater.NonObsoleteApiUpdaterDetector.exe
[api-updater (non-obsolete-error-filter)]
----------------------------------
jit/startup time : 375,2599ms
moved types parse time: 50ms
candidates parse time : 9ms
C# parse time : 181ms
candidates check time : 22ms
console write time : 0ms
[api-updater (non-obsolete-error-filter)] 06.03.2022 15:20:08 : Starting C:/Program Files/Unity/Hub/Editor/2020.3.19f1/Editor/Data/Tools/ScriptUpdater/APIUpdater.NonObsoleteApiUpdaterDetector.exe
[api-updater (non-obsolete-error-filter)]
----------------------------------
jit/startup time : 56,3769ms
moved types parse time: 36ms
candidates parse time : 7ms
C# parse time : 138ms
candidates check time : 34ms
console write time : 0ms

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

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

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

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