猫史档案馆


神教程·代码岛代码

用户:编程梦想家编程梦想家查看:0 回复:1 评论:0 创建时间:2021-04-17T08:49:09


那么现在—————————————————开始吧———————————————————

代码如下:

//Event 事件
world.onPlayerJoin(({entity})=>{})
world.onTick(({ tick }) => {});
world.onChat(({ entity, message }) => {})
world.onPlayerLeave(({ entity }) => {});
world.onInteract( ({entity, targetEntity}) => {});
world.onClick(({ entity }) => {})
world.onPress(({ button, entity }) => {})
world.onRelease(({ button, position }) => { })
world.onEntityCreate(({ entity }) => {})
world.onEntityDestroy(({ entity }) => { })
world.onTakeDamage(({ entity, attacker, damage}) => {})
world.onRespawn(({ entity }) => {})
//常用语句(与玩家相关)
entity.player.
other.player.
world.say
entity.position.set()
entity.player.color.set()
other.potition.set()
other.position.set()
entity.player.directMessage('')
other.player.directMessage('')
//常用框架if()
{}if(!)
{}if( || )
{}if(){}else{}
if(){}else if(){}else{}
for(i=0;i<number;i++){}
while(){}
//常用词汇
return break witch async null const var felse else if for while
//常用符号理解
“=”代表设置,设定一个的值“==”通常用在if中,作为判定是否为某些值得符号“>=”“<=”“<”“>”
比较符“!”通常用在if中,有这个的if通常里面都带有return
“;”这个很特别,是代表两个代码在同一行时的分隔符


回复

上一页1 页 / 共 1下一页
难起的名字难起的名字

emotion_编程猫_加油

点赞1


评论