1 #include "stdafx.h"
2 #include "sound.h"
3 #include "position.h"
4 
Sound(SoundId i)5 Sound::Sound(SoundId i) : id(i) {
6 }
7 
SERIALIZE_DEF(Sound,id,position,pitch)8 SERIALIZE_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)16 Sound& Sound::setPitch(double v) {
17   pitch = v;
18   return *this;
19 }
20 
getId() const21 SoundId Sound::getId() const {
22   return id;
23 }
24 
getPosition() const25 const optional<Position>& Sound::getPosition() const {
26   return position;
27 }
28 
getPitch() const29 double Sound::getPitch() const {
30   return pitch;
31 }
32