Improve crab attack telegraphing

Also, make the Armadillo explosions smaller and therefore closer to the
visual explosion, but this should've been in the last commit already.
This commit is contained in:
Jens Pitkänen 2019-08-15 00:41:43 +03:00
parent 4a87c512c3
commit a2340cbd25
2 changed files with 6 additions and 6 deletions

View File

@ -159,7 +159,9 @@ MonoBehaviour:
- {fileID: 3847767376140256459, guid: ef8e91f8ee034b54187172730881ede2, type: 3}
- {fileID: 3847767376140256459, guid: 18cee0d8962f9124cbe00dcb3e6a009b, type: 3}
DebugExplode: 0
KillOnZeroHealth: 1
ParticlesPerBodypart: 70
BodypartCountMultiplier: 1
DebrisType: 0
--- !u!114 &3362493323285318061
MonoBehaviour:
m_ObjectHideFlags: 0
@ -220,7 +222,7 @@ MonoBehaviour:
CurrentStatus:
StartExplodingRadius: 3.5
ExplodeOnImpactRadius: 1.5
ExplosionRadius: 2.5
ExplosionRadius: 1.5
FuseDuration: 1.5
MinDamage: 7
MaxDamage: 13

View File

@ -45,19 +45,17 @@ namespace Saltosion.OneWeapon.AI.Behaviours {
CurrentStatus = "Cooldown";
CooldownProgress -= Time.deltaTime / CooldownLength;
}
Attacking = CooldownProgress < 0.4f && Follow.Target != null &&
(Follow.Target.position - Enemy.transform.position).magnitude <= MeleeRange * 2f;
}
public override bool CanBehave() {
bool CanBehave = Follow.Target != null && (Follow.Target.position - Enemy.transform.position).magnitude <= MeleeRange;
if (!CanBehave) {
Attacking = false;
}
return CanBehave;
}
public override void Execute() {
if (CooldownProgress > 0) {
Attacking = false;
return;
} else {
Attacking = true;