local function oncurrent(self,current)
    self.inst.currentmiaoji:set(current)
end

local Miaojio_exp = Class(function(self,inst)
    self.inst = inst
    self.max = 5000
    self.min = 0
	self.current = self.min
    self.overridestarvefn = nil
end,
nil,
{
    current = oncurrent
})

function Miaojio_exp:DoDelta(delta)  		
    self.current = math.clamp(self.current + delta, self.min, self.max)
    self.inst:PushEvent("miaojio_exp")
end
function Miaojio_exp:OnSave()
	return {
	current = self.current
	}
end

function Miaojio_exp:OnLoad(data)
	if data.current then
        self.current = data.current
    end
end
return Miaojio_exp