feat:update blockly.json

This commit is contained in:
Kylin_on_Mac 2023-11-10 16:08:10 +08:00
parent ca649971ce
commit 5ce4c0c3d9
3 changed files with 16 additions and 14 deletions

View File

@ -9,24 +9,22 @@
"SCENE_INFO": [ "SCENE_INFO": [
["scene_info['frame']", "# frame", "# 幀數"], ["scene_info['frame']", "# frame", "# 幀數"],
["scene_info['status']", "game status", "遊戲狀態"], ["scene_info['status']", "game status", "遊戲狀態"],
["scene_info['player_x']", "x coordinate of player", "玩家角色的中心 x 座標"], ["scene_info['squid_x']", "x coordinate of squid", "玩家角色的中心 x 座標"],
["scene_info['player_y']", "y coordinate of player", "玩家角色的中心 y 座標"], ["scene_info['squid_y']", "y coordinate of squid", "玩家角色的中心 y 座標"],
["scene_info['player_size']", "y coordinate of player", "玩家角色的大小"], ["scene_info['squid_w']", "width of squid", "玩家角色的寬度"],
["scene_info['player_vel']", "velocity of player", "玩家角色的速度"], ["scene_info['squid_h']", "height of squid", "玩家角色的高度"],
["scene_info['squid_lv']", "level of squid", "玩家角色的等級"],
["scene_info['squid_vel']", "velocity of squid", "玩家角色的速度"],
["scene_info['score']", "score", "目前的分數"], ["scene_info['score']", "score", "目前的分數"],
["scene_info['foods']", "list of foods positions", "點點的位置清單"], ["scene_info['foods']", "list of foods positions", "點點的位置清單"],
["scene_info['score_to_pass']", "the score for next level", "通關分數"], ["scene_info['score_to_pass']", "the score for next level", "通關分數"],
["scene_info", "dictionary of all information", "包含所有資訊的字典"] ["scene_info", "dictionary of all information", "包含所有資訊的字典"]
], ],
"CONSTANT": [ "CONSTANT": [
[0, "left boundary", "左邊界"],
[800, "right boundary", "右邊界"], [30, "food lv1 size", "等級一食物的寬高度"],
[0, "top boundary", "上邊界"], [40, "food lv2 size", "等級二食物的高度"],
[600, "bottom boundary", "下邊界"], [50, "food lv3 size", "等級三食物的高度"]
[30, "player size", "玩家角色的初始大小"],
[8, "food lv1 size", "等級一食物的寬高度"],
[12, "food lv2 size", "等級二食物的高度"],
[16, "food lv3 size", "等級三食物的高度"]
], ],
"ACTION": [ "ACTION": [
["['UP']", "moving up", "向上移動"], ["['UP']", "moving up", "向上移動"],

View File

@ -1,6 +1,6 @@
{ {
"game_name": "easy_game", "game_name": "easy_game",
"version": "2.3.4-alpha", "version": "2.4a0",
"url": "https://github.com/PAIA-Playful-AI-Arena/easy_game", "url": "https://github.com/PAIA-Playful-AI-Arena/easy_game",
"description": "這是一個吃東西小遊戲,除了讓你熟習所有基本操作,也是 PAIA 的遊戲教學範例", "description": "這是一個吃東西小遊戲,除了讓你熟習所有基本操作,也是 PAIA 的遊戲教學範例",
"logo": [ "logo": [

View File

@ -136,7 +136,11 @@ class EasyGame(PaiaGame):
to_players_data = {} to_players_data = {}
foods_data = [] foods_data = []
for food in self.foods: for food in self.foods:
foods_data.append({"x": food.rect.centerx, "y": food.rect.centery, "type": food.type, "score": food.score}) foods_data.append(
{"x": food.rect.centerx, "y": food.rect.centery,
"w":food.rect.width,"h":food.rect.height,
"type": str(food.type), "score": food.score}
)
data_to_1p = { data_to_1p = {
"frame": self.frame_count, "frame": self.frame_count,