这家伙很懒,什么都没写下...
这家伙很懒,什么都没写下...
变量
CAMEAR Y
mouse turn [Player]
pointer lock
PLAYER Z
PLAYER SZ
角色
Player
代码
定义 Player Tick
如果 不成立 那么
执行 Mouse Controls
否则
如果 碰到 entities? 那么
将 {Health} 增加 -1
如果 ({Health} < 1) 那么
广播 Game over
如果 按下 空格 键? 那么
如果 ({PLAYER Z} = 0) 那么
将 {PLAYER SZ} 设为 2
将 {PLAYER Z} 增加 ({PLAYER SZ} * {DELTA})
将 {PLAYER SZ} 增加 (-0.2 * {DELTA})
如果 ({PLAYER Z} < 0) 那么
将 {PLAYER Z} 设为 0
将 {PLAYER SZ} 设为 0
定义 Get Mouse Turn {abs mouse x}
将 {mouse turn} 设为 ({abs mouse x} / 100)
如果 ({abs mouse x} > 50) 那么
将 {mouse turn} 增加 (({abs mouse x} - 50) / 50)
如果 ({abs mouse x} > 130) 那么
将 {mouse turn} 增加 (({abs mouse x} - 130) / 50)
如果 (鼠标的x坐标 < 0) 那么
将 {mouse turn} 设为 ( - {mouse turn})
定义 Mouse Controls
执行 Get Mouse Turn 绝对值(鼠标的x坐标)
右转 ({mouse turn} * {DELTA}) 度
将 {CAMEAR Y} 设为 鼠标的y坐标
Raycaster
代码
定义 Single Ray
将 {texture offset} 增加 (3 * {TEXTURE SIZE})
如果 碰到 Textures2? 那么
将 {texture offset} 增加 ((7 + (1 * 480)) * {TEXTURE SIZE})
否则
将 {texture offset} 增加 ((0 + (1 * 480)) * {TEXTURE SIZE})
entities
代码
当作为克隆体启动时
执行 Hurt Player
定义 Hurt Player
如果 (({type} = 1) 与 ({PLAYER Z} > 3)) 那么
停止 这个脚本
如果 碰到 Player? 那么
广播 Player Hurt
将 {Health} 增加 -1
如果 ({Health} < 1) 那么
广播 Game over
Pen
造型
backdrop1
hurt
代码
当接收到 Player Hurt
换成 hurt 造型
将大小设为 100
清除图形特效
移到 x:0 y:0
图章
定义 Draw Row
将 {y} 设为 ((1.5 * {height}) - ({RES} / 2))
将 {y} 设为 ((((1.5 - ({PLAYER Z} / 10)) * {height}) - ({RES} / 2)) - {CAMEAR Y})
定义 Draw
全部擦除
移到 x:0 y:( - {CAMEAR Y})
清除图形特效
换成 3 造型
将大小设为 200
换成 backdrop1 造型
图章
定义 Stamp entity
移到 x:{x} y:0
移到 x:{x} y:(((0 - ({PLAYER Z} / 10)) * {height}) - {CAMEAR Y})
Textures2
Sprite1