Zombie + Skeletton capacities
This commit is contained in:
parent
e94e2b8dce
commit
3fc57e3a64
12 changed files with 162 additions and 3 deletions
|
@ -87,6 +87,10 @@ PrefabInstance:
|
|||
propertyPath: m_Name
|
||||
value: BaseSkeleton
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2572766376840025726, guid: 8094e6afe32f290e6987d6a2fc43119d, type: 3}
|
||||
propertyPath: <Capacity>k__BackingField
|
||||
value:
|
||||
objectReference: {fileID: -3894500519728253097}
|
||||
- target: {fileID: 2572766376840025726, guid: 8094e6afe32f290e6987d6a2fc43119d, type: 3}
|
||||
propertyPath: <AttackHandler>k__BackingField
|
||||
value:
|
||||
|
@ -139,6 +143,10 @@ PrefabInstance:
|
|||
propertyPath: speed
|
||||
value: 3
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6808800326795897577, guid: 8094e6afe32f290e6987d6a2fc43119d, type: 3}
|
||||
propertyPath: capacity
|
||||
value:
|
||||
objectReference: {fileID: -3894500519728253097}
|
||||
- target: {fileID: 8213395333053285225, guid: 8094e6afe32f290e6987d6a2fc43119d, type: 3}
|
||||
propertyPath: <MaxHealth>k__BackingField
|
||||
value: 50
|
||||
|
@ -155,6 +163,7 @@ PrefabInstance:
|
|||
- {fileID: 1284886913308718791, guid: 8094e6afe32f290e6987d6a2fc43119d, type: 3}
|
||||
- {fileID: 7841837150169133400, guid: 8094e6afe32f290e6987d6a2fc43119d, type: 3}
|
||||
- {fileID: 8908285060348773052, guid: 8094e6afe32f290e6987d6a2fc43119d, type: 3}
|
||||
- {fileID: 5894882180728040511, guid: 8094e6afe32f290e6987d6a2fc43119d, type: 3}
|
||||
m_RemovedGameObjects:
|
||||
- {fileID: 7673576048613581623, guid: 8094e6afe32f290e6987d6a2fc43119d, type: 3}
|
||||
- {fileID: 3380792937898646976, guid: 8094e6afe32f290e6987d6a2fc43119d, type: 3}
|
||||
|
@ -169,6 +178,9 @@ PrefabInstance:
|
|||
- targetCorrespondingSourceObject: {fileID: 2076979688870881298, guid: 8094e6afe32f290e6987d6a2fc43119d, type: 3}
|
||||
insertIndex: -1
|
||||
addedObject: {fileID: 694975301204954681}
|
||||
- targetCorrespondingSourceObject: {fileID: 2076979688870881298, guid: 8094e6afe32f290e6987d6a2fc43119d, type: 3}
|
||||
insertIndex: -1
|
||||
addedObject: {fileID: -3894500519728253097}
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 8094e6afe32f290e6987d6a2fc43119d, type: 3}
|
||||
--- !u!1 &6872779381538554402 stripped
|
||||
GameObject:
|
||||
|
@ -196,6 +208,21 @@ MonoBehaviour:
|
|||
arrowBaseSpeed: 20
|
||||
spawnPos: {fileID: 7035766952310155559}
|
||||
directShot: 0
|
||||
--- !u!114 &-3894500519728253097
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6872779381538554402}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: b0344a53e7b8b8f30b008023599beb65, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
<MaxMana>k__BackingField: 100
|
||||
<Mana>k__BackingField: 0
|
||||
manaCost: 50
|
||||
--- !u!4 &7591572713894325371 stripped
|
||||
Transform:
|
||||
m_CorrespondingSourceObject: {fileID: 3092074377783379531, guid: 8094e6afe32f290e6987d6a2fc43119d, type: 3}
|
||||
|
|
|
@ -39,6 +39,22 @@ PrefabInstance:
|
|||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: 1347853180693178842, guid: 8094e6afe32f290e6987d6a2fc43119d, type: 3}
|
||||
propertyPath: m_AnchorMax.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1347853180693178842, guid: 8094e6afe32f290e6987d6a2fc43119d, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1377656129870373027, guid: 8094e6afe32f290e6987d6a2fc43119d, type: 3}
|
||||
propertyPath: m_AnchorMax.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1377656129870373027, guid: 8094e6afe32f290e6987d6a2fc43119d, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1854268353119403178, guid: 8094e6afe32f290e6987d6a2fc43119d, type: 3}
|
||||
propertyPath: distanceGoal
|
||||
value: 3
|
||||
|
@ -47,6 +63,10 @@ PrefabInstance:
|
|||
propertyPath: m_Name
|
||||
value: BaseWitch
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2572766376840025726, guid: 8094e6afe32f290e6987d6a2fc43119d, type: 3}
|
||||
propertyPath: <Capacity>k__BackingField
|
||||
value:
|
||||
objectReference: {fileID: 1983685764473485393}
|
||||
- target: {fileID: 2572766376840025726, guid: 8094e6afe32f290e6987d6a2fc43119d, type: 3}
|
||||
propertyPath: <AttackHandler>k__BackingField
|
||||
value:
|
||||
|
@ -95,6 +115,14 @@ PrefabInstance:
|
|||
propertyPath: followEnemy
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6587310683195830629, guid: 8094e6afe32f290e6987d6a2fc43119d, type: 3}
|
||||
propertyPath: knockbackTime
|
||||
value: 0.5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6808800326795897577, guid: 8094e6afe32f290e6987d6a2fc43119d, type: 3}
|
||||
propertyPath: capacity
|
||||
value:
|
||||
objectReference: {fileID: 1983685764473485393}
|
||||
- target: {fileID: 7841837150169133400, guid: 8094e6afe32f290e6987d6a2fc43119d, type: 3}
|
||||
propertyPath: m_Enabled
|
||||
value: 0
|
||||
|
@ -109,6 +137,7 @@ PrefabInstance:
|
|||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents:
|
||||
- {fileID: 8908285060348773052, guid: 8094e6afe32f290e6987d6a2fc43119d, type: 3}
|
||||
- {fileID: 5894882180728040511, guid: 8094e6afe32f290e6987d6a2fc43119d, type: 3}
|
||||
m_RemovedGameObjects:
|
||||
- {fileID: 3380792937898646976, guid: 8094e6afe32f290e6987d6a2fc43119d, type: 3}
|
||||
- {fileID: 7673576048613581623, guid: 8094e6afe32f290e6987d6a2fc43119d, type: 3}
|
||||
|
@ -123,6 +152,9 @@ PrefabInstance:
|
|||
- targetCorrespondingSourceObject: {fileID: 2076979688870881298, guid: 8094e6afe32f290e6987d6a2fc43119d, type: 3}
|
||||
insertIndex: -1
|
||||
addedObject: {fileID: 6630021836861456616}
|
||||
- targetCorrespondingSourceObject: {fileID: 2076979688870881298, guid: 8094e6afe32f290e6987d6a2fc43119d, type: 3}
|
||||
insertIndex: -1
|
||||
addedObject: {fileID: 1983685764473485393}
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 8094e6afe32f290e6987d6a2fc43119d, type: 3}
|
||||
--- !u!1 &1802278516447893522 stripped
|
||||
GameObject:
|
||||
|
@ -150,6 +182,22 @@ MonoBehaviour:
|
|||
arrowBaseSpeed: 10
|
||||
spawnPos: {fileID: 5966639341884708145}
|
||||
directShot: 1
|
||||
--- !u!114 &1983685764473485393
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1802278516447893522}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 1c3c6b3848aa5f3cd9b73630ddae811e, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
<MaxMana>k__BackingField: 100
|
||||
<Mana>k__BackingField: 0
|
||||
manaCost: 50
|
||||
summonUnit: {fileID: 0}
|
||||
--- !u!4 &3402840626423002699 stripped
|
||||
Transform:
|
||||
m_CorrespondingSourceObject: {fileID: 3092074377783379531, guid: 8094e6afe32f290e6987d6a2fc43119d, type: 3}
|
||||
|
|
|
@ -121,8 +121,33 @@ PrefabInstance:
|
|||
- targetCorrespondingSourceObject: {fileID: 3092074377783379531, guid: 8094e6afe32f290e6987d6a2fc43119d, type: 3}
|
||||
insertIndex: -1
|
||||
addedObject: {fileID: 7462635044968950075}
|
||||
m_AddedComponents: []
|
||||
m_AddedComponents:
|
||||
- targetCorrespondingSourceObject: {fileID: 2076979688870881298, guid: 8094e6afe32f290e6987d6a2fc43119d, type: 3}
|
||||
insertIndex: -1
|
||||
addedObject: {fileID: 3984359816722831899}
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 8094e6afe32f290e6987d6a2fc43119d, type: 3}
|
||||
--- !u!1 &1890103981188166740 stripped
|
||||
GameObject:
|
||||
m_CorrespondingSourceObject: {fileID: 2076979688870881298, guid: 8094e6afe32f290e6987d6a2fc43119d, type: 3}
|
||||
m_PrefabInstance: {fileID: 497671446971817030}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!114 &3984359816722831899
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1890103981188166740}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: c3b089e9358a7b3adbe2f521fcfbc8c2, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
<MaxMana>k__BackingField: 100
|
||||
<Mana>k__BackingField: 0
|
||||
manaCost: 50
|
||||
timeToBoost: 2
|
||||
boost: 2
|
||||
--- !u!4 &3170908833992251917 stripped
|
||||
Transform:
|
||||
m_CorrespondingSourceObject: {fileID: 3092074377783379531, guid: 8094e6afe32f290e6987d6a2fc43119d, type: 3}
|
||||
|
|
|
@ -12,6 +12,10 @@ PrefabInstance:
|
|||
propertyPath: m_Name
|
||||
value: WitchA
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1983685764473485393, guid: 60d0116586de851dfbb6e860ae759928, type: 3}
|
||||
propertyPath: summonUnit
|
||||
value:
|
||||
objectReference: {fileID: 4976282506935113607, guid: a0750dd4706e5480da2ad597b62d8531, type: 3}
|
||||
- target: {fileID: 3402840626423002699, guid: 60d0116586de851dfbb6e860ae759928, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
|
|
|
@ -12,6 +12,10 @@ PrefabInstance:
|
|||
propertyPath: m_Name
|
||||
value: WitchB
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1983685764473485393, guid: 60d0116586de851dfbb6e860ae759928, type: 3}
|
||||
propertyPath: summonUnit
|
||||
value:
|
||||
objectReference: {fileID: 6922435743601591142, guid: e2eadb5c4fdf45ea995b4da7c9110275, type: 3}
|
||||
- target: {fileID: 2766439037223183998, guid: 60d0116586de851dfbb6e860ae759928, type: 3}
|
||||
propertyPath: <IsTeamA>k__BackingField
|
||||
value: 0
|
||||
|
|
|
@ -22,7 +22,7 @@ public class HealthPotion : ProjectileHandler
|
|||
if (targetUnit.IsTeamA != FromTeamA) continue;
|
||||
|
||||
targetUnit.Heal(healthAdd);
|
||||
_minecraftUnitOrigin.Capacity.AddMana(healthAdd);
|
||||
_minecraftUnitOrigin.Capacity.AddMana(healthAdd*0.1f);
|
||||
}
|
||||
CoroutineManager.Instance.StartCoroutine(ExplodeVisual());
|
||||
Destroy(gameObject);
|
||||
|
|
|
@ -18,7 +18,7 @@ public class BaseCapacity : MonoBehaviour
|
|||
|
||||
public void AddMana(float manaAdd)
|
||||
{
|
||||
Mana = Mathf.Max(Mana + manaAdd, MaxMana);
|
||||
Mana = Mathf.Min(Mana + manaAdd, MaxMana);
|
||||
}
|
||||
|
||||
|
||||
|
|
23
Assets/Scripts/UnitScripts/Capacities/TripleAttack.cs
Normal file
23
Assets/Scripts/UnitScripts/Capacities/TripleAttack.cs
Normal file
|
@ -0,0 +1,23 @@
|
|||
using UnityEngine;
|
||||
using System.Collections;
|
||||
|
||||
public class TripleAttack : BaseCapacity
|
||||
{
|
||||
protected override bool CapacityCall()
|
||||
{
|
||||
MinecraftUnit minecraftUnit = _unit as MinecraftUnit;
|
||||
StartCoroutine(TripleAttackRoutine(minecraftUnit));
|
||||
return true;
|
||||
}
|
||||
|
||||
private IEnumerator TripleAttackRoutine(MinecraftUnit minecraftUnit)
|
||||
{
|
||||
minecraftUnit.AttackHandler.Attack();
|
||||
yield return new WaitForSeconds(0.1f);
|
||||
minecraftUnit.AttackHandler.Attack();
|
||||
yield return new WaitForSeconds(0.1f);
|
||||
minecraftUnit.AttackHandler.Attack();
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,2 @@
|
|||
fileFormatVersion: 2
|
||||
guid: b0344a53e7b8b8f30b008023599beb65
|
|
@ -6,6 +6,8 @@ public class WitchSummon : BaseCapacity
|
|||
|
||||
protected override bool CapacityCall()
|
||||
{
|
||||
print("SUMMON");
|
||||
print(Mana);
|
||||
Instantiate(summonUnit, transform.position, Quaternion.identity);
|
||||
return true;
|
||||
}
|
||||
|
|
22
Assets/Scripts/UnitScripts/Capacities/ZombieSpeedBoost.cs
Normal file
22
Assets/Scripts/UnitScripts/Capacities/ZombieSpeedBoost.cs
Normal file
|
@ -0,0 +1,22 @@
|
|||
using UnityEngine;
|
||||
using System.Collections;
|
||||
|
||||
public class ZombieSpeedBoost : BaseCapacity
|
||||
{
|
||||
[SerializeField] float timeToBoost;
|
||||
[SerializeField] float boost;
|
||||
protected override bool CapacityCall()
|
||||
{
|
||||
MinecraftUnit minecraftUnit = _unit as MinecraftUnit;
|
||||
StartCoroutine(AddThenRemoveSpeed(minecraftUnit));
|
||||
return true;
|
||||
}
|
||||
|
||||
private IEnumerator AddThenRemoveSpeed(MinecraftUnit minecraftUnit)
|
||||
{
|
||||
// Possibility float imprecision issues
|
||||
minecraftUnit.MovementHandler.speed *= boost;
|
||||
yield return new WaitForSeconds(timeToBoost);
|
||||
minecraftUnit.MovementHandler.speed /= boost;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,2 @@
|
|||
fileFormatVersion: 2
|
||||
guid: c3b089e9358a7b3adbe2f521fcfbc8c2
|
Loading…
Add table
Add a link
Reference in a new issue