Heightmap fix, texture fix, rotating crystals and enemy height to 0
This commit is contained in:
@@ -18,6 +18,8 @@ Crystal::Crystal(const std::string & filled, const std::string & empty, const Ve
|
||||
sound_id = CrystalPoint::GetSoundSystem().LoadSound("WAVE/Crystal.wav", false);
|
||||
music = CrystalPoint::GetSoundSystem().GetSound(sound_id);
|
||||
music->SetPos(position, Vec3f());
|
||||
|
||||
crystalRot = 0;
|
||||
}
|
||||
|
||||
Crystal::~Crystal()
|
||||
@@ -38,6 +40,8 @@ Crystal::~Crystal()
|
||||
|
||||
void Crystal::draw()
|
||||
{
|
||||
crystalRot -= 3.0f;
|
||||
rotation = Vec3f(0, crystalRot, 0);
|
||||
Entity::draw();
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ public:
|
||||
Crystal(const std::string &filled, const std::string &empty,
|
||||
const Vec3f &position, Vec3f &rotation, const float &scale);
|
||||
~Crystal();
|
||||
|
||||
float crystalRot;
|
||||
bool isFilled;
|
||||
void draw();
|
||||
void collide();
|
||||
|
||||
+1
-1
@@ -49,7 +49,7 @@ HeightMap::HeightMap(const std::string &file, World* world)
|
||||
{
|
||||
int offsets[4][2] = { { 0, 0 },{ 1, 0 },{ 1, 1 },{ 0, 1 } };
|
||||
|
||||
if (valueAt(x, y, GREEN) > 0)
|
||||
if (valueAt(x, y, GREEN) > 5)
|
||||
{
|
||||
world->addLevelObject(new LevelObject(world->getObjectFromValue(valueAt(x, y, GREEN)).first, Vec3f(x, heightAt(x, y), y), Vec3f(0, 0, 0), 1, world->getObjectFromValue(valueAt(x, y, GREEN)).second));
|
||||
}
|
||||
|
||||
@@ -319,7 +319,7 @@ void World::update(float elapsedTime)
|
||||
continue;
|
||||
}
|
||||
}
|
||||
enemy->position.y = getHeight(enemy->position.x, enemy->position.z) + 2.0f;
|
||||
enemy->position.y = getHeight(enemy->position.x, enemy->position.z);
|
||||
|
||||
if(!remove)
|
||||
count++;
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 262 KiB After Width: | Height: | Size: 261 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 49 MiB After Width: | Height: | Size: 49 MiB |
Reference in New Issue
Block a user