我们先了解一下什么是热更新。
广义: 无需关闭应用,不停机状态下修复漏洞,更新资源等,重点是更新逻辑代码。“狭义定义(ios 热更新):无需将代码重新打包提交至AppStore,即可更新客户端的执行代码,即不用下载app 而自动更新程序。现状:苹果禁止了 C#的部分反射操作,禁止JIT(即时编译,程序运行时创建并运行新代码),不允许逻辑热更新,只允许使用 AssetBundle 进行资源热更新。
注意:2017 年,苹果更新了热更新政策说明,上线后的项目,一旦发现使用热更新,一样会以下架处理
除了热更新还有冷更新
目录
什么是冷更新“开发者将测试好的代码,发布到应用商店的审核平台,平台方会进行稳定性及性能测试。测试成功后,用户即可在 AppStore 看到应用的更新信息,用户点击应用更新后,需要先关闭应用,再进行更新。“
下面是他的关键字
and break do else
elseif end false for
function if in local
nil not or repeat
return then true until
while
Lua的保留字如下:关键字不能当做标示符。Lua大小写敏感
注意事项
。1print0是Lua内置的方法
。2在Lua中字符串用"或者”’都可以表示
3,Lua中每一条语句后面是没有;号的
。4,单行注释 一注释内容
5,多行注释这里是注释内容 一
a=1
b=2.5
c="hello"
d="world"
e=true
f=nil
g={1,2,3,4,5}
function Get()
print('aaa')
end
print(type(a).."\t"..type(b)) --number
print(type(c).."\t"..type(d)) --string
print(type(e).."\t"..type(f)) --bollean nil
print(type(g).."\t"..type(Get)) --table function
--定义变量
a,b=1,2,3--可以多写
print(a..b)
c,d=1--可以少写
--print(c..d)报错:nil不能跟其他类型连接
print(c)
print(d)--nil
print(d)
--特殊情况
--1、没有整除、++、-- 三元运算符
print(2/3)
a=1
--b=1==1?1:0
--a++
--2、不等于
print(2~=3)
print(2==3)
--3、逻辑运算符 and or not
print(1==1 and 1==2)
print(1==1 or 1==2)
print(not(1==2))
print(1==1 and (1==2 or 1==1))
print(1==1 and (1==2 and 1==1))
print(1==1 and not(1==2 or 1==1))
print(1==1 and not(1==2 and 1==1))