local timer = require("level.timer")
local LD = require("design.LevelDesignLibrary")
local weaponObject
local expireTime = 2.5
local holdTime = 0.75
local effects = {}
local lspirit, position, direction
local speed = 12
local acceleration = 20
local directions
local waitedAFrame = false
function OnScriptLoaded(level, go)
  local player = game.Player.FindPlayer()
  local position = player.WorldPosition + engine.Vector.New(0, 1.25, 0) + player:GetWorldForward() * 2
  effects[1] = game.FX.Spawn("Electric_Hit_FX_JOBack3", level)
  effects[1]:SetWorldPosition(position)
  effects[1]:SetWorldFacing(game.Player.FindPlayer():GetWorldForward())
end
function OnUpdate(level, go)
  expireTime = expireTime - level:GetUnitTime()
  if expireTime <= 0 then
    if effects[1] ~= nil then
      effects[1]:Destroy()
    end
    go:Destroy()
  end
end
