用户:尚轩滨_原跑酷喵查看:0 回复:4 评论:0 创建时间:2020-03-29T21:00:57
【作品展示】

【作品介绍】
我的作品适合刚刚接触Python的萌新们,Python萌新有福啦!
【作品源代码】
import time
#开始进入Python的世界
# 介绍我
print('Hi~ o(* ̄▽ ̄*)ブ')
# 等待一秒
time.sleep(1)
# 我的笔名
print('我是一只会七十二变的喵(笔名)!')
# 等待一秒
time.sleep(1)
# 开头
print('今天,我会给你们讲一个代码(Python代码渣必看)')
# 等待一秒
time.sleep(1)
# 过程
print('打开海龟编辑器,点击右上角的"代码模式"输入:print("hello!")再点击积木模式,点击运行,就OK啦!')
# 等待一秒
time.sleep(1)
# 再见
print('我们下节课再见ヾ( ̄▽ ̄)Bye~Bye~!')
【提示】
部分含有Python第三方库相关内容的作品,在海龟编辑器网页端无法运行哦!如遇到这种情况,可以打开下面的链接,下载海龟编辑器客户端:
https://python.codemao.cn
亿只懒Ink/*SJS Tool version 0.1.5-beta, Copyright 2020 By Shyfcka, All right reserved. Code is Open Source. */const $ = {Position: (x, y, z) => {return new Box3Vector3(x, y, z);},GetEntityByPlayerName: (n) => {g = {e: null};world.querySelectorAll('player').forEach((e) => {if (e.player.name == n) {g.e = e}});return g.e;},PracticalFunctions: {},Gamerule: {Init: {CanFly: false,SpawnPoint: new Box3Vector3(喵, 15, 喵),CanByAttack: false,ShowHpBar: false,JumpPower: 1,DoubleJumpPower: 1,WalkSpeed: 0.2,RunSpeed: 0.3,MaxHp: 10.01,Hp: 10,},Running: {RespawnY: 0}},};(($) => {$.SendMessage = (e, m) => {e.player.directMessage(m);};$.SendMessageByName = (name, m) => {$.GetEntityByPlayerName(name).player.directMessage(m)};$.EntitySay = (e, m) => {e.say(m);};$.EntitySayByPlayerName = (name, m) => {$.GetEntityByPlayerName(name).say(m)};$.SetSpawnPoint = (e, x, y, z) => {e.player.spawnPoint = new Box3Vector3(x, y, z);};$.PracticalFunctions.Portal = (from, to, func = (e) => {}) => {world.querySelector(`.${from}`).onEntityContact(({other}, t = world.querySelector(`.${to}`).position, ds = func) => {other.position.x = t.x;other.position.y = t.y + 1;other.position.z = t.z;ds(other);})};$.PracticalFunctions.SavePoint = (tag, tips = '存档成功', func = (e) => {}) => {world.querySelector(`.${tag}`).onEntityContact(({entity,other}, ps = tips, fun = func) => {if (!other.isPlayer) {return;};other.player.spawnPoint = new Box3Vector3(entity.position.x, entity.position.y, entity.position.z);other.player.directMessage(ps);fun(other);});};$.AttackEntity = (e, conut) => {e.hurt(conut);};$.ForEachAllPlayer = (func) => {world.querySelectorAll('player').forEach((e) => {func(e)})};$.Start =() => {console.clear();console.log('程序开始运行\n已导入SJS v0.1\n--------------------------------------------------\n\n');world.onPlayerJoin(({entity}) => {gr = $.Gamerule.Init;entity.player.CanFly = gr.CanFly;entity.player.spawnPoint = gr.SpawnPoint;entity.enableDamage = gr.CanByAttack;entity.showHealthBar = gr.ShowHpBar;entity.maxHp = gr.MaxHp;entity.hp = gr.Hp;entity.player.spawnPoint = gr.SpawnPoint;entity.player.jumpPower = gr.JumpPower;entity.player.doubleJumpPower = gr.DoubleJumpPower;entity.player.walkSpeed = gr.WalkSpeed;entity.player.runSpeed = gr.RunSpeed;});world.onTick((evt) => {world.querySelectorAll('player').forEach((i) => {if (i.position.y < $.Gamerule.Running.RespawnY) {i.hurt(i.hp);i.position.y = -999;};});});};})($);world.$ = $;'enableDamage enable ';;
(async function(){
world.onPlayerJoin(async ({entity})=>{
});
})();
/*SJS Tool version 0.1.5-beta, Copyright 2020 By Shyfcka, All right reserved. Code is Open Source. */const $ = {Position: (x, y, z) => {return new Box3Vector3(x, y, z);},GetEntityByPlayerName: (n) => {g = {e: null};world.querySelectorAll('player').forEach((e) => {if (e.player.name == n) {g.e = e}});return g.e;},PracticalFunctions: {},Gamerule: {Init: {CanFly: false,SpawnPoint: new Box3Vector3(喵, 15, 喵),CanByAttack: false,ShowHpBar: false,JumpPower: 1,DoubleJumpPower: 1,WalkSpeed: 0.2,RunSpeed: 0.3,MaxHp: 10.01,Hp: 10,},Running: {RespawnY: 0}},};(($) => {$.SendMessage = (e, m) => {e.player.directMessage(m);};$.SendMessageByName = (name, m) => {$.GetEntityByPlayerName(name).player.directMessage(m)};$.EntitySay = (e, m) => {e.say(m);};$.EntitySayByPlayerName = (name, m) => {$.GetEntityByPlayerName(name).say(m)};$.SetSpawnPoint = (e, x, y, z) => {e.player.spawnPoint = new Box3Vector3(x, y, z);};$.PracticalFunctions.Portal = (from, to, func = (e) => {}) => {world.querySelector(`.${from}`).onEntityContact(({other}, t = world.querySelector(`.${to}`).position, ds = func) => {other.position.x = t.x;other.position.y = t.y + 1;other.position.z = t.z;ds(other);})};$.PracticalFunctions.SavePoint = (tag, tips = '存档成功', func = (e) => {}) => {world.querySelector(`.${tag}`).onEntityContact(({entity,other}, ps = tips, fun = func) => {if (!other.isPlayer) {return;};other.player.spawnPoint = new Box3Vector3(entity.position.x, entity.position.y, entity.position.z);other.player.directMessage(ps);fun(other);});};$.AttackEntity = (e, conut) => {e.hurt(conut);};$.ForEachAllPlayer = (func) => {world.querySelectorAll('player').forEach((e) => {func(e)})};$.Start =() => {console.clear();console.log('程序开始运行\n已导入SJS v0.1\n--------------------------------------------------\n\n');world.onPlayerJoin(({entity}) => {gr = $.Gamerule.Init;entity.player.CanFly = gr.CanFly;entity.player.spawnPoint = gr.SpawnPoint;entity.enableDamage = gr.CanByAttack;entity.showHealthBar = gr.ShowHpBar;entity.maxHp = gr.MaxHp;entity.hp = gr.Hp;entity.player.spawnPoint = gr.SpawnPoint;entity.player.jumpPower = gr.JumpPower;entity.player.doubleJumpPower = gr.DoubleJumpPower;entity.player.walkSpeed = gr.WalkSpeed;entity.player.runSpeed = gr.RunSpeed;});world.onTick((evt) => {world.querySelectorAll('player').forEach((i) => {if (i.position.y < $.Gamerule.Running.RespawnY) {i.hurt(i.hp);i.position.y = -999;};});});};})($);world.$ = $;'enableDamage enable ';;
(async function(){
world.onPlayerJoin(async ({entity})=>{
});
})();点赞0
评论