roguev6 > charpattern.py


※上記の広告は60日以上更新のないWIKIに表示されています。更新することで広告が下部へ移動します。

びみょ・・・。

#animation_nameに代入していく

def data(pos,src_rect,delay):
  return (pos,src_rect,delay)

def create_walk(x,y):
  return [
    data(pos=(0,0),src_rect=(x,y,16,16),delay=30),
                data((0,0),(x+16,y,16,16),30),
    data((0,0),(x,y,16,16),30),
    data((0,0),(x+32,y,16,16),30),]

def create_single(x,y):
  return [
    data(pos=(0,0),src_rect=(x,y,16,16),delay=0),
  ]

walk_south = create_walk(0,48)
walk_north = create_walk(48,0)
walk_west  = create_walk(0,16)
walk_east  = create_walk(48,32)
walk_north_west = create_walk(0,0)
walk_north_east = create_walk(48,16)
walk_south_west = create_walk(0,32)
walk_south_east = create_walk(48,48)

damage_south = create_single(0,112)
damage_north = create_single(16,64)
damage_west  = create_single(0,80)
damage_east  = create_single(16,96)
damage_north_west = create_single(0,64)
damage_north_east = create_single(16,80)
damage_south_west = create_single(0,96)
damage_south_east = create_single(16,112)

attack_south = create_single(32,112)
attack_north = create_single(16+32,64)
attack_west  = create_single(32,80)
attack_east  = create_single(16+32,96)
attack_north_west = create_single(32,64)
attack_north_east = create_single(16+32,80)
attack_south_west = create_single(32,96)
attack_south_east = create_single(16+32,112)