Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def handle_add_projectile(buffer)
- start_x = buffer.read_short
- start_y = buffer.read_short
- finish_x = buffer.read_short
- finish_y = buffer.read_short
- target_x = buffer.read_short
- target_y = buffer.read_short
- projectile_type = buffer.read_byte
- projectile_id = buffer.read_byte
- if $game_map.in_screen?(start_x, start_y) || $game_map.in_screen?(finish_x, finish_y)
- projectile = projectile_type == Constants::PROJECTILE_WEAPON ? Configs::RANGE_WEAPONS[projectile_id] : Configs::RANGE_SKILLS[projectile_id]
- $game_map.projectiles << Game_Projectile.new(start_x, start_y, finish_x, finish_y, target_x, target_y, projectile[0])
- SceneManager.scene.add_projectile($game_map.projectiles.last)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement