1 #include "stdafx.h" 2 #include "sound.h" 3 #include "position.h" 4 Sound(SoundId i)5Sound::Sound(SoundId i) : id(i) { 6 } 7 SERIALIZE_DEF(Sound,id,position,pitch)8SERIALIZE_DEF(Sound, id, position, pitch) 9 SERIALIZATION_CONSTRUCTOR_IMPL(Sound) 10 11 Sound& Sound::setPosition(const Position& p) { 12 position = p; 13 return *this; 14 } 15 setPitch(double v)16Sound& Sound::setPitch(double v) { 17 pitch = v; 18 return *this; 19 } 20 getId() const21SoundId Sound::getId() const { 22 return id; 23 } 24 getPosition() const25const optional<Position>& Sound::getPosition() const { 26 return position; 27 } 28 getPitch() const29double Sound::getPitch() const { 30 return pitch; 31 } 32