summaryrefslogblamecommitdiff
path: root/main.lua
blob: c19ae3c88638b98a7da1ee002673c7953944c20a (plain) (tree)
1
2
3
4
5
6
7
                                         

                   


                         
                   





                               

   





                                                                                       
local funsaac = RegisterMod("funsaac", 1)
require("messages")

local render_tick = 0
local s = 0;
local function onRender()
  WsClient:update()

  render_tick = render_tick + 1
  if render_tick >= 60 then
    render_tick = 0
    s = s + 1
  end
end

local function onEnemyDamage(_, entity, amount, damage_flags, source, countdown_frames)
  ScalarCmd(1)
end

funsaac:AddCallback(ModCallbacks.MC_POST_RENDER, onRender)
funsaac:AddCallback(ModCallbacks.MC_ENTITY_TAKE_DMG, onEnemyDamage)