|
@@ -9,7 +9,7 @@ const float INPUT_SENSITIVITY = 0.05f;
|
|
|
const float PANNING_SENSITIVITY = 0.01f;
|
|
const float PANNING_SENSITIVITY = 0.01f;
|
|
|
const float ROTATE_SENSITIVITY = 0.25f;
|
|
const float ROTATE_SENSITIVITY = 0.25f;
|
|
|
const Vector4 BACKGROUND_COLOR = Vector4::zero();
|
|
const Vector4 BACKGROUND_COLOR = Vector4::zero();
|
|
|
-const float INITIAL_ZOOM = 6.0f;
|
|
|
|
|
|
|
+const float ZOOM_DEFAULT = 6.0f;
|
|
|
|
|
|
|
|
ParticlesGame::ParticlesGame() : _scene(NULL), _panning(false), _rotating(false), _zooming(false)
|
|
ParticlesGame::ParticlesGame() : _scene(NULL), _panning(false), _rotating(false), _zooming(false)
|
|
|
{
|
|
{
|
|
@@ -124,7 +124,7 @@ void ParticlesGame::initialize()
|
|
|
_cameraParent->addChild(cameraNode);
|
|
_cameraParent->addChild(cameraNode);
|
|
|
Camera* camera = Camera::createPerspective(45.0f, (float)getWidth() / (float)getHeight(), 0.25f, 1000.0f);
|
|
Camera* camera = Camera::createPerspective(45.0f, (float)getWidth() / (float)getHeight(), 0.25f, 1000.0f);
|
|
|
cameraNode->setCamera(camera);
|
|
cameraNode->setCamera(camera);
|
|
|
- cameraNode->setTranslation(0.0f, 0.0f, INITIAL_ZOOM);
|
|
|
|
|
|
|
+ cameraNode->setTranslation(0.0f, 0.0f, ZOOM_DEFAULT);
|
|
|
_scene->setActiveCamera(camera);
|
|
_scene->setActiveCamera(camera);
|
|
|
SAFE_RELEASE(camera);
|
|
SAFE_RELEASE(camera);
|
|
|
|
|
|
|
@@ -645,12 +645,6 @@ void ParticlesGame::controlEvent(Control* control, EventType evt)
|
|
|
{
|
|
{
|
|
|
emitter->setRotation(emitter->getRotationSpeedMin(), _rotationSpeedMax->getValue(), emitter->getRotationAxis(), emitter->getRotationAxisVariance());
|
|
emitter->setRotation(emitter->getRotationSpeedMin(), _rotationSpeedMax->getValue(), emitter->getRotationAxis(), emitter->getRotationAxisVariance());
|
|
|
}
|
|
}
|
|
|
- else if (control == _burstSize)
|
|
|
|
|
- {
|
|
|
|
|
- char txt[25];
|
|
|
|
|
- sprintf(txt, "Burst Size\n\n%.0f", _burstSize->getValue());
|
|
|
|
|
- _burstSize->setText(txt);
|
|
|
|
|
- }
|
|
|
|
|
else if (control == _started)
|
|
else if (control == _started)
|
|
|
{
|
|
{
|
|
|
if (_started->isChecked())
|
|
if (_started->isChecked())
|
|
@@ -1074,10 +1068,6 @@ void ParticlesGame::emitterChanged()
|
|
|
|
|
|
|
|
_emissionRate->setValue(emitter->getEmissionRate());
|
|
_emissionRate->setValue(emitter->getEmissionRate());
|
|
|
|
|
|
|
|
- char txt[25];
|
|
|
|
|
- sprintf(txt, "Burst Size\n\n%.0f", _burstSize->getValue());
|
|
|
|
|
- _burstSize->setText(txt);
|
|
|
|
|
-
|
|
|
|
|
const Vector3& posVar = emitter->getPositionVariance();
|
|
const Vector3& posVar = emitter->getPositionVariance();
|
|
|
_posVarX->setValue(posVar.x);
|
|
_posVarX->setValue(posVar.x);
|
|
|
_posVarY->setValue(posVar.y);
|
|
_posVarY->setValue(posVar.y);
|