OverlayManager refactor and Flash (#1218)
* Flash component, overlay and shader Add BeginDraw method to Overlay.cs * Add flash icons, sounds * Progress * Multiple overlays without enums * This is probably the worst way to do this IDK * Remove nullable reference type * Add AttackEventArgs as parameter to OnHitEntities MeleeWeaponComponent.Attack now continues when OnHitEntities returns true (it hit something) Add OverlayType enum so client and server can agree on overlay ids Move IConfigurable to its own file Add AoE flash with shorter duration Flashing someone slows them down * Add arc to flash Set item size to something reasonable Remove chat log message when flash burns out * Remove unused interface
This commit is contained in:
@@ -81,9 +81,9 @@ namespace Content.Server.GameObjects.Components.Weapon.Melee
|
||||
serializer.DataField(ref _cooldownTime, "cooldownTime", 1f);
|
||||
}
|
||||
|
||||
public virtual bool OnHitEntities(IReadOnlyList<IEntity> entities)
|
||||
protected virtual bool OnHitEntities(IReadOnlyList<IEntity> entities, AttackEventArgs eventArgs)
|
||||
{
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
void IAttack.Attack(AttackEventArgs eventArgs)
|
||||
@@ -112,7 +112,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Melee
|
||||
}
|
||||
}
|
||||
|
||||
if(OnHitEntities(hitEntities)) return;
|
||||
if(!OnHitEntities(hitEntities, eventArgs)) return;
|
||||
|
||||
var audioSystem = EntitySystem.Get<AudioSystem>();
|
||||
var emitter = hitEntities.Count == 0 ? eventArgs.User : hitEntities[0];
|
||||
|
||||
Reference in New Issue
Block a user