remake effects code
This commit is contained in:
parent
85b9231cee
commit
4480cd0272
Binary file not shown.
|
@ -1089,8 +1089,6 @@ MonoBehaviour:
|
|||
- {fileID: 21300000, guid: 993fdba9d116dba4bacdee2d29d33f04, type: 3}
|
||||
- {fileID: 21300000, guid: 9c3fd8d256ec8eb4181e171ceea55452, type: 3}
|
||||
- {fileID: 21300000, guid: 7ab8624721af8974b9d81950d6603da1, type: 3}
|
||||
- {fileID: 21300000, guid: 664fb4e4278a75745bf61ff9b2105118, type: 3}
|
||||
- {fileID: 21300000, guid: 6ec6424c00ba76e468b14f90e4bf20b1, type: 3}
|
||||
enemyConfig: {fileID: 11400000, guid: 311edf240c8ea15449adcfbad6d87fbe, type: 2}
|
||||
enemyName: {fileID: 7221412860694950147}
|
||||
enemyMaxHp: {fileID: 7221412859169780618}
|
||||
|
@ -1133,7 +1131,7 @@ MonoBehaviour:
|
|||
m_Calls:
|
||||
- m_Target: {fileID: 4592293190802169254}
|
||||
m_TargetAssemblyTypeName: LibraryTurnMethods, Assembly-CSharp
|
||||
m_MethodName: Effects
|
||||
m_MethodName: Poison
|
||||
m_Mode: 1
|
||||
m_Arguments:
|
||||
m_ObjectArgument: {fileID: 0}
|
||||
|
|
|
@ -27,6 +27,6 @@ MonoBehaviour:
|
|||
minimumPosition: 1
|
||||
maximumPosition: 3
|
||||
effects:
|
||||
- effect: 1
|
||||
- effect: 0
|
||||
turns: 1
|
||||
damage: 0
|
||||
damage: 1
|
||||
|
|
|
@ -197,9 +197,13 @@ public class Enemy : MonoBehaviour
|
|||
enemyStepIcon.sprite = allStepImageIcons[4];
|
||||
enemyStepIconText.text = enemyConfig.enemyCharacteristics.addArmorAll.ToString();
|
||||
break;
|
||||
case "Effects":
|
||||
enemyStepIcon.sprite = allStepImageIcons[6];
|
||||
enemyStepIconText.text = enemyConfig.enemyCharacteristics.addArmorAll.ToString();
|
||||
case "Poison":
|
||||
enemyStepIcon.sprite = LibraryEffects.main.effectIcons[0].icon;
|
||||
enemyStepIconText.text = "";
|
||||
break;
|
||||
case "Stun":
|
||||
enemyStepIcon.sprite = LibraryEffects.main.effectIcons[1].icon;
|
||||
enemyStepIconText.text = "";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -112,17 +112,36 @@ public class LibraryTurnMethods : MonoBehaviour
|
|||
}
|
||||
}
|
||||
|
||||
public void Effects()
|
||||
public void Poison()
|
||||
{
|
||||
for (int i = 0; i < enemy.enemyConfig.enemyCharacteristics.effects.Length; i++)
|
||||
{
|
||||
Player.main.effectsName.Add(enemy.enemyConfig.enemyCharacteristics.effects[i].effect.ToString());
|
||||
Player.main.effectsDamage.Add(enemy.enemyConfig.enemyCharacteristics.effects[i].damage);
|
||||
Player.main.effectsTurns.Add(enemy.enemyConfig.enemyCharacteristics.effects[i].turns);
|
||||
LibraryEffects.main.InstantiateEffect(enemy.enemyConfig.enemyCharacteristics.effects[i].effect.ToString(), Player.main.gameObject,
|
||||
enemy.enemyConfig.enemyCharacteristics.effects[i].damage, i);
|
||||
if (enemy.enemyConfig.enemyCharacteristics.effects[i].effect.ToString() == "poison")
|
||||
{
|
||||
Effects(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void Stun()
|
||||
{
|
||||
for (int i = 0; i < enemy.enemyConfig.enemyCharacteristics.effects.Length; i++)
|
||||
{
|
||||
if (enemy.enemyConfig.enemyCharacteristics.effects[i].effect.ToString() == "stun")
|
||||
{
|
||||
Effects(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void Effects(int i)
|
||||
{
|
||||
Player.main.effectsName.Add(enemy.enemyConfig.enemyCharacteristics.effects[i].effect.ToString());
|
||||
Player.main.effectsDamage.Add(enemy.enemyConfig.enemyCharacteristics.effects[i].damage);
|
||||
Player.main.effectsTurns.Add(enemy.enemyConfig.enemyCharacteristics.effects[i].turns);
|
||||
LibraryEffects.main.InstantiateEffect(enemy.enemyConfig.enemyCharacteristics.effects[i].effect.ToString(), Player.main.gameObject,
|
||||
enemy.enemyConfig.enemyCharacteristics.effects[i].damage, i);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Binary file not shown.
|
@ -21,7 +21,7 @@ MonoBehaviour:
|
|||
m_ShowMode: 4
|
||||
m_Title: Game
|
||||
m_RootView: {fileID: 6}
|
||||
m_MinSize: {x: 875, y: 542}
|
||||
m_MinSize: {x: 875, y: 300}
|
||||
m_MaxSize: {x: 10000, y: 10000}
|
||||
m_Maximized: 1
|
||||
--- !u!114 &2
|
||||
|
@ -45,10 +45,10 @@ MonoBehaviour:
|
|||
y: 30
|
||||
width: 1920
|
||||
height: 947
|
||||
m_MinSize: {x: 678, y: 492}
|
||||
m_MaxSize: {x: 14001, y: 14042}
|
||||
m_MinSize: {x: 679, y: 492}
|
||||
m_MaxSize: {x: 14002, y: 14042}
|
||||
vertical: 0
|
||||
controlID: 123
|
||||
controlID: 16
|
||||
--- !u!114 &3
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 52
|
||||
|
@ -227,7 +227,7 @@ MonoBehaviour:
|
|||
m_MinSize: {x: 403, y: 492}
|
||||
m_MaxSize: {x: 10001, y: 14042}
|
||||
vertical: 1
|
||||
controlID: 62
|
||||
controlID: 17
|
||||
--- !u!114 &10
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 52
|
||||
|
@ -252,7 +252,7 @@ MonoBehaviour:
|
|||
m_MinSize: {x: 403, y: 221}
|
||||
m_MaxSize: {x: 8003, y: 4021}
|
||||
vertical: 0
|
||||
controlID: 63
|
||||
controlID: 119
|
||||
--- !u!114 &11
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 52
|
||||
|
@ -369,22 +369,22 @@ MonoBehaviour:
|
|||
m_SkipHidden: 0
|
||||
m_SearchArea: 1
|
||||
m_Folders:
|
||||
- Assets/Prefabs/Enemy
|
||||
- Assets/Scripts/Configs/EnemyConfigs
|
||||
m_Globs: []
|
||||
m_OriginalText:
|
||||
m_ViewMode: 1
|
||||
m_StartGridSize: 64
|
||||
m_LastFolders:
|
||||
- Assets/Prefabs/Enemy
|
||||
- Assets/Scripts/Configs/EnemyConfigs
|
||||
m_LastFoldersGridSize: -1
|
||||
m_LastProjectPath: "E:\\Projects \u0441#\\Unity\\omega"
|
||||
m_LockTracker:
|
||||
m_IsLocked: 0
|
||||
m_FolderTreeState:
|
||||
scrollPos: {x: 0, y: 19}
|
||||
m_SelectedIDs: 4c470000
|
||||
m_LastClickedID: 18252
|
||||
m_ExpandedIDs: 000000002e47000044470000484700007a47000000ca9a3b
|
||||
m_SelectedIDs: ca4b0000
|
||||
m_LastClickedID: 19402
|
||||
m_ExpandedIDs: 000000002e4700003a4700003e4700007647000000ca9a3b
|
||||
m_RenameOverlay:
|
||||
m_UserAcceptedRename: 0
|
||||
m_Name:
|
||||
|
@ -500,7 +500,7 @@ MonoBehaviour:
|
|||
m_ControlHash: -371814159
|
||||
m_PrefName: Preview_InspectorPreview
|
||||
m_LastInspectedObjectInstanceID: -1
|
||||
m_LastVerticalScrollValue: 492
|
||||
m_LastVerticalScrollValue: 0
|
||||
m_GlobalObjectId:
|
||||
m_LockTracker:
|
||||
m_IsLocked: 0
|
||||
|
@ -533,9 +533,9 @@ MonoBehaviour:
|
|||
m_SceneHierarchy:
|
||||
m_TreeViewState:
|
||||
scrollPos: {x: 0, y: 0}
|
||||
m_SelectedIDs: 5e470000
|
||||
m_SelectedIDs: a6420000
|
||||
m_LastClickedID: 0
|
||||
m_ExpandedIDs: b2bafeff68c0feffacc3feff94dffeffd8e2feff1cf3feff08fdfeff7a54ffffe27bffff887fffff9cc4ffff54cafffffacdffff3efbffff40fbffffca43000032440000384400005c6200006e6200008462000088620000266400004e64000052640000226d0000346d00004a6d00004e6d0000e68a0000f88a0000b48c0000c68c00001692000028920000
|
||||
m_ExpandedIDs: 40fbffff
|
||||
m_RenameOverlay:
|
||||
m_UserAcceptedRename: 0
|
||||
m_Name:
|
||||
|
|
Binary file not shown.
Binary file not shown.
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
|
@ -2,3 +2,5 @@ Base path: 'C:/Program Files/Unity/Hub/Editor/2020.3.19f1/Editor/Data', plugins
|
|||
Cmd: initializeCompiler
|
||||
|
||||
Cmd: shutdown
|
||||
|
||||
Quitting shader compiler process
|
||||
|
|
|
@ -2,3 +2,5 @@ Base path: 'C:/Program Files/Unity/Hub/Editor/2020.3.19f1/Editor/Data', plugins
|
|||
Cmd: initializeCompiler
|
||||
|
||||
Cmd: shutdown
|
||||
|
||||
Quitting shader compiler process
|
||||
|
|
|
@ -2,3 +2,5 @@ Base path: 'C:/Program Files/Unity/Hub/Editor/2020.3.19f1/Editor/Data', plugins
|
|||
Cmd: initializeCompiler
|
||||
|
||||
Cmd: shutdown
|
||||
|
||||
Quitting shader compiler process
|
||||
|
|
|
@ -2,3 +2,5 @@ Base path: 'C:/Program Files/Unity/Hub/Editor/2020.3.19f1/Editor/Data', plugins
|
|||
Cmd: initializeCompiler
|
||||
|
||||
Cmd: shutdown
|
||||
|
||||
Quitting shader compiler process
|
||||
|
|
|
@ -2,3 +2,5 @@ Base path: 'C:/Program Files/Unity/Hub/Editor/2020.3.19f1/Editor/Data', plugins
|
|||
Cmd: initializeCompiler
|
||||
|
||||
Cmd: shutdown
|
||||
|
||||
Quitting shader compiler process
|
||||
|
|
|
@ -2,3 +2,5 @@ Base path: 'C:/Program Files/Unity/Hub/Editor/2020.3.19f1/Editor/Data', plugins
|
|||
Cmd: initializeCompiler
|
||||
|
||||
Cmd: shutdown
|
||||
|
||||
Quitting shader compiler process
|
||||
|
|
Loading…
Reference in New Issue