猫史档案馆


【box3】给萌新看的东西,实用框架语句都在里面

用户:该账号已被封禁该账号已被封禁查看:2 回复:1 评论:2 创建时间:2020-10-08T20:27:45


//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
continue
case
default
switch
async
null
const
var
if
else
else if
for
while

let

//常用符号理解
“=”代表设置,设定一个的值
“==”通常用在if中,作为判定是否为某些值得符号
“>=”“<=”“<”“>”比较符
“!”通常用在if中,有这个的if通常里面都带有return
“;”这个很特别,是代表两个代码在同一行时的分隔符

-------------------------------------------------------------------------
给js和岛三萌新看的
勿喷


回复

上一页1 页 / 共 1下一页
三尺五寸上仙三尺五寸上仙

岛 三 不 能 粘 贴 emotion_dogeemotion_dogeemotion_dogeemotion_doge

点赞1


评论