24 lines
644 B
Lua
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

--- Поведение персонажа. Их можно комбинировать как угодно, добавлять и заменять на лету...
--- @class Behavior
--- @field id string
--- @field owner Character
--- @field new fun(...) : self
--- @field update fun(self, dt): nil
--- @field draw fun(self): nil
local behavior = {}
behavior.__index = behavior
behavior.id = "behavior"
function behavior.new() return setmetatable({}, behavior) end
--- это деструктор с крутым названием
function behavior:die()
end
function behavior:update(dt) end
function behavior:draw() end
return behavior