yang1zhi 发表于 2016-10-22 19:24
$game_party.items 是道具
$game_party.weapons 是武器
$game_party.armors 是防具
$game_party.item_number(item_id) # 获取物品数量 $game_party.gain_item(item_id, number) # 获得物品 $game_party.lose_item(item_id, number) # 失去物品
attr_reader :items $game_party.items[item_id] $game_party.items[item_id] += n $game_party.items[item_id] -= n
$game_party.items[1] > 0
RyanBern 发表于 2016-10-24 09:04
RGSS1不将@items等变量在Game_Party内公开是有一定道理的。它涉及到面向对象编程中内部变量的隐藏和对象 ...
RyanBern 发表于 2016-10-24 09:04
RGSS1不将@items等变量在Game_Party内公开是有一定道理的。它涉及到面向对象编程中内部变量的隐藏和对象 ...
欢迎光临 Project1 (https://rpg.blue/) | Powered by Discuz! X3.1 |