游戏开发1_取舍_give-and-take

发布于 2019年12月19日
(点击图片进入关卡)

火焰陷阱和生命药水能让游戏具有爆炸性!

简介

为了让游戏更有趣,尝试添加一些 "fire-trap" 和 "potion-small" !

game.spawnXY("fire-trap", 40, 20)
game.spawnXY("potion-small", 25, 20)

默认代码

# 移动到所有的X标记。
# 那些火焰陷阱会伤人!
game.spawnPlayerXY("samurai", 40, 50)
game.addSurviveGoal()
game.addMoveGoalXY(25,40)
game.spawnXY("fire-trap", 25, 40)
game.addMoveGoalXY(55,40)
game.spawnXY("fire-trap", 55, 40)
game.addMoveGoalXY(40,20)
game.spawnXY("fire-trap", 40, 20)
# 生成一些"potion-small"对象,来治愈玩家!

概览

Coming soon!

取舍 解法

# 移动到所有的X标记。
# 那些火焰陷阱会伤人!
game.spawnPlayerXY("samurai", 40, 50)
game.addSurviveGoal()
game.addMoveGoalXY(25,40)
game.spawnXY("fire-trap", 25, 40)
game.addMoveGoalXY(55,40)
game.spawnXY("fire-trap", 55, 40)
game.addMoveGoalXY(40,20)
game.spawnXY("fire-trap", 40, 20)
# 生成一些"potion-small"对象,来治愈玩家!
game.spawnXY("potion-small", 30, 39)
game.spawnXY("potion-small", 40, 25)