private void TryUseEffect() { if (reloadingEntity.IsReloaded && sight.activeSelf) { sightLogic.DestroyAim(); reloadingEntity.StartReload(this); EffectShower.AddOrUpdate(destroyIcon, EffectType.Reloadable, reloadingEntity.ReloadingTime); } }
public override void Change(PlayerCharacterLogic character) { base.Change(character); TouchDetector.OnDoubleClick.Subscribe ( () => { if (restoreEntity.IsReloaded) { restoreEntity.StartReload(this); character.RestoreHealth(restoredHealth); EffectShower.AddOrUpdate(restoredIcon, EffectType.Reloadable, restoreEntity.ReloadingTime); particle.Play(); } } ).AddTo(subscribers); }
private void Start() { EffectShower.AddOrUpdate(restoredIcon, EffectType.Reloadable, restoreEntity.ReloadingTime); }