00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #include <sprites/TalkRenderer.h>
00022 #include <graph/ParticleEmitter.h>
00023 #include <client/ScorchedClient.h>
00024
00025 TalkRenderer::TalkRenderer(Vector &position, Vector &color) :
00026 position_(position), color_(color)
00027 {
00028 }
00029
00030 TalkRenderer::~TalkRenderer()
00031 {
00032 }
00033
00034 void TalkRenderer::draw(Action *action)
00035 {
00036 }
00037
00038 void TalkRenderer::simulate(Action *action, float timepassed, bool &remove)
00039 {
00040 remove = true;
00041 ParticleEmitter emitter;
00042 emitter.setAttributes(
00043 8.5f, 8.0f,
00044 0.2f, 0.5f,
00045 0.01f, 0.02f,
00046 Vector(0.0f, 0.0f, 0.0f), Vector(0.0f, 0.0f, 0.0f),
00047 color_, 1.0f,
00048 color_, 1.0f,
00049 color_, 0.0f,
00050 color_, 0.0f,
00051 2.0f, 2.0f, 2.0f, 2.0f,
00052 2.0f, 2.0f, 2.0f, 2.0f,
00053 Vector(0.0f, 0.0f, 0.0f),
00054 false,
00055 false);
00056
00057 position_[2] += 10.0f;
00058 emitter.emitTalk(position_,
00059 ScorchedClient::instance()->getParticleEngine());
00060 }