SHARE
TWEET

mireiyu_novel_class.rb_2

a guest Dec 22nd, 2014 3 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ##固定データの変更に用いる。こう行わないと後述記述しているeach上のパラメータ変更が適用できない。##
  2. class Class_param_edit
  3.  
  4.  def initialize
  5.  end
  6.  
  7.  def do(data,type)
  8.   case type
  9.    when 0
  10.    $sample_param[0] = data[1] if data[0] == 0 || data[0] == "フラグ1"
  11.    $sample_param[1] = data[1] if data[0] == 1 || data[1] == "フラグ2"
  12.    $sample_param[2] = data[1] if data[0] == 2 || data[2] == "フラグ3"
  13.    when 1
  14.    $sample_param[0] += data[1] if data[0] == 0 || data[0] == "フラグ1"
  15.    $sample_param[1] += data[1] if data[0] == 1 || data[1] == "フラグ2"
  16.    $sample_param[2] += data[1] if data[0] == 2 || data[2] == "フラグ3"
  17.    when 2
  18.    $sample_param[0] *= data[1] if data[0] == 0 || data[0] == "フラグ1"
  19.    $sample_param[1] *= data[1] if data[0] == 1 || data[1] == "フラグ2"
  20.    $sample_param[2] *= data[1] if data[0] == 2 || data[2] == "フラグ3"
  21.  end
  22. end
RAW Paste Data
Top