ການອ້າງອິງ RGSS Script
@ ໃນ RGSS scripts ແມ່ນຫຍັງ?
ລາຍລະອຽດຂອງ @ Syntax ຂອງ scripts ໃນ RGSS
ກໍານົດຕົວແປ instance ສໍາລັບຫ້ອງຮຽນ. ເພື່ອໃຫ້ສາມາດອ່ານແລະຂຽນຕົວແປຂອງປະເພດນີ້, ທ່ານກໍ່ຈໍາເປັນຕ້ອງສ້າງວິທີການເຂົ້າເຖິງສໍາລັບພວກມັນ. ທ່ານຍັງສາມາດໃຊ້ attr_reader, attr_writer, ຫຼື attr_accessor shortcode ເພື່ອໂຫລດຕົວປະຕິບັດການທີ່ກ່ຽວຂ້ອງໂດຍອັດຕະໂນມັດ.
ຕົວຢ່າງລະຫັດ:
def initialize
@battler_name = ""
@battler_hue = 0
@hp = 0
@sp = 0
@states = []
@states_turn = {}
@maxhp_plus = 0
@maxsp_plus = 0
@str_plus = 0
@dex_plus = 0
@agi_plus = 0
@int_plus = 0
@hidden = false
@immortal = false
@damage_pop = false
@damage = nil
@critical = false
@animation_id = 0
@animation_hit = false
@white_flush = false
@blink = false
@current_action = Game_BattleAction.new
end