Page Menu
Home
Phabricator (Chris)
Search
Configure Global Search
Log In
Files
F126065
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
20 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/media/cyclop.png b/media/cyclop.png
index c79c815..e7ef213 100644
Binary files a/media/cyclop.png and b/media/cyclop.png differ
diff --git a/src/CyclopEntity.cpp b/src/CyclopEntity.cpp
index 49d2744..fdfa0c1 100644
--- a/src/CyclopEntity.cpp
+++ b/src/CyclopEntity.cpp
@@ -1,285 +1,373 @@
#include "CyclopEntity.h"
#include "BoltEntity.h"
#include "PlayerEntity.h"
#include "RockMissileEntity.h"
+#include "FallingRockEntity.h"
#include "sfml_game/SpriteEntity.h"
#include "sfml_game/ImageManager.h"
#include "sfml_game/SoundManager.h"
#include "Constants.h"
#include "WitchBlastGame.h"
#include <iostream>
CyclopEntity::CyclopEntity(float x, float y)
: EnnemyEntity (ImageManager::getImageManager()->getImage(IMAGE_CYCLOP), x, y)
{
width = 128;
height = 192;
creatureSpeed = CYCLOP_SPEED[0];
velocity = Vector2D(creatureSpeed);
hp = CYCLOP_HP;
hpDisplay = CYCLOP_HP;
hpMax = CYCLOP_HP;
meleeDamages = CYCLOP_DAMAGES;
type = ENTITY_ENNEMY_BOSS;
bloodColor = bloodRed;
shadowFrame = 8;
dyingFrame = 5;
deathFrame = FRAME_CORPSE_CYCLOP;
frame = 0;
if (game().getPlayerPosition().x > x) isMirroring = true;
sprite.setOrigin(64.0f, 64.0f);
+ nextRockMissile = 0;
+ destroyLevel = 0;
state = 0;
timer = 2.0f;
counter = 10;
age = -1.5f;
resistance[ResistanceFrozen] = ResistanceVeryHigh;
}
int CyclopEntity::getHealthLevel()
{
int healthLevel = 0;
if (hp <= hpMax * 0.25) healthLevel = 3;
else if (hp <= hpMax * 0.5) healthLevel = 2;
else if (hp <= hpMax * 0.75) healthLevel = 1;
return healthLevel;
}
void CyclopEntity::fire()
{
- new RockMissileEntity(x, y+30);
+ new RockMissileEntity(x, y+30, nextRockMissile);
SoundManager::getSoundManager()->playSound(SOUND_THROW);
}
+void CyclopEntity::initFallingGrid()
+{
+ for (int i = 0; i < MAP_WIDTH; i++)
+ for (int j = 0; j < MAP_WIDTH; j++)
+ fallingGrid[i][j] = false;
+}
+
+void CyclopEntity::fallRock()
+{
+ int rx, ry;
+ do
+ {
+ rx = 1 + rand() % (MAP_WIDTH - 2);
+ ry = 1 + rand() % (MAP_HEIGHT - 2);
+ }
+ while (fallingGrid[rx][ry]);
+
+ fallingGrid[rx][ry] = true;
+ new FallingRockEntity(rx * TILE_WIDTH + OFFSET_X + TILE_WIDTH / 2,
+ ry * TILE_HEIGHT + OFFSET_Y + TILE_HEIGHT / 2,
+ rand() % 3);
+}
+
+
+void CyclopEntity::computeNextRockMissile()
+{
+ if (getHealthLevel() == 0)
+ nextRockMissile = rand()%5 == 0 ? 1 : 0;
+ else if (getHealthLevel() == 1)
+ nextRockMissile = rand()%3 == 0 ? 1 : 0;
+ else if (getHealthLevel() == 2)
+ nextRockMissile = rand()%2 == 0 ? 0 : 1;
+ else
+ nextRockMissile = rand()%3 == 0 ? 0 : 1;
+}
+
void CyclopEntity::computeStates(float delay)
{
timer -= delay;
if (timer <= 0.0f)
{
if (state == 0) // walking
{
if (counter > 0)
{
counter--;
timer = 0.5f;
creatureSpeed = CYCLOP_SPEED[getHealthLevel()];
- setVelocity(Vector2D(x, y).vectorTo(game().getPlayerPosition(), creatureSpeed ));
+ setVelocity(Vector2D(x + 32, y + 96).vectorTo(game().getPlayerPosition(), creatureSpeed ));
}
else
{
- state = 1; // charge
- timer = 0.9f;
velocity.x = 0.0f;
velocity.y = 0.0f;
- counter = CYCLOP_NUMBER_ROCKS[getHealthLevel()];
- SoundManager::getSoundManager()->playSound(SOUND_CYCLOP00);
+ if (destroyLevel < getHealthLevel())
+ {
+ state = 3; // charge to destroy
+ destroyLevel++;
+ counter = destroyLevel + 1;
+ timer = 0.9f;
+ SoundManager::getSoundManager()->playSound(SOUND_CYCLOP00);
+ initFallingGrid();
+ }
+ else
+ {
+ state = 1; // charge to fire
+ timer = 0.9f;
+ counter = CYCLOP_NUMBER_ROCKS[getHealthLevel()];
+ SoundManager::getSoundManager()->playSound(SOUND_CYCLOP00);
+
+ computeNextRockMissile();
+ }
}
}
else if (state == 1) // fire
{
state = 2;
fire();
- timer = 0.2;
+ timer = CYCLOP_FIRE_DELAY[getHealthLevel()];
}
else if (state == 2) // fire end
{
if (counter <= 1)
{
state = 0;
- timer = CYCLOP_FIRE_DELAY[getHealthLevel()];
+ timer = 0.2f;
counter = 10;
}
else
{
counter--;
state = 1;
timer = 0.2f;
+ computeNextRockMissile();
+ }
+ }
+ else if (state == 3)
+ {
+ state = 4; // destroy
+ timer = 0.2;
+ game().makeShake(0.4f);
+ SoundManager::getSoundManager()->playSound(SOUND_WALL_IMPACT);
+ for (int i = 0; i < 10 ; i++) fallRock();
+ }
+ else if (state == 4)
+ {
+ if (counter <= 1)
+ {
+ state = 0;
+ timer = 0.2f;
+ counter = 10;
+ }
+ else
+ {
+ counter--;
+ state = 3;
+ timer = 0.3f;
}
}
}
}
void CyclopEntity::animate(float delay)
{
if (age <= 0.0f)
{
age += delay;
return;
}
if (isAgonising)
{
if (h < -0.01f)
{
isDying = true;
SpriteEntity* corpse;
corpse = new SpriteEntity(ImageManager::getImageManager()->getImage(IMAGE_CORPSES_BIG), x, y + 48, 128, 128);
corpse->setFrame(deathFrame - FRAME_CORPSE_KING_RAT);
corpse->setZ(OFFSET_Y);
corpse->setType(ENTITY_CORPSE);
if (dyingSound != SOUND_NONE) SoundManager::getSoundManager()->playSound(dyingSound);
}
else
{
frame = dyingFrame;
hVelocity -= 700.0f * delay;
h += hVelocity * delay;
}
return;
}
// special states
if (specialState[SpecialStateIce].active) delay *= specialState[SpecialStateIce].parameter;
// IA
computeStates(delay);
// collisions
if (canCollide()) testSpriteCollisions();
BaseCreatureEntity::animate(delay);
// current frame
if (state == 0)
{
int r = ((int)(age * 5.0f)) % 4;
if (r == 2) frame = 0;
else if (r == 3) frame = 2;
else frame = r;
}
else if (state == 1)
{
isMirroring = game().getPlayer()->getX() > x;
frame = 3;
}
else if (state == 2)
{
frame = 4;
}
+ else if (state == 3)
+ {
+ frame = 6;
+ }
+ else if (state == 4)
+ {
+ frame = 7;
+ }
// frame's mirroring
if (velocity.x > 1.0f)
isMirroring = true;
else if (velocity.x < -1.0f)
isMirroring = false;
}
bool CyclopEntity::hurt(int damages, enumShotType hurtingType, int level)
{
- return EnnemyEntity::hurt(damages, hurtingType, level);
+ return EnnemyEntity::hurt(damages, hurtingType, level);
}
void CyclopEntity::calculateBB()
{
- boundingBox.left = OFFSET_X + (int)x - width / 2 + 32;
- boundingBox.width = 58;
- boundingBox.top = OFFSET_Y + (int)y - height / 2 + 120;
- boundingBox.height = 90;
+ boundingBox.left = OFFSET_X + (int)x - width / 2 + 32;
+ boundingBox.width = 58;
+ boundingBox.top = OFFSET_Y + (int)y - height / 2 + 120;
+ boundingBox.height = 90;
}
void CyclopEntity::afterWallCollide()
{
}
void CyclopEntity::collideMapRight()
{
velocity.x = -velocity.x;
afterWallCollide();
}
void CyclopEntity::collideMapLeft()
{
velocity.x = -velocity.x;
afterWallCollide();
}
void CyclopEntity::collideMapTop()
{
velocity.y = -velocity.y;
afterWallCollide();
}
void CyclopEntity::collideMapBottom()
{
velocity.y = -velocity.y;
afterWallCollide();
}
void CyclopEntity::dying()
{
ItemEntity* newItem = new ItemEntity(itemBossHeart, x, y);
newItem->setVelocity(Vector2D(100.0f + rand()% 250));
newItem->setViscosity(0.96f);
EnnemyEntity::dying();
}
void CyclopEntity::render(sf::RenderTarget* app)
{
- EnnemyEntity::render(app);
+ EnnemyEntity::render(app);
- // stones
- if (state == 1)
+ // stones
+ if (state == 1)
+ {
+ if (nextRockMissile == 0) // small rock
{
- sprite.setTextureRect(sf::IntRect(1152, 0, 64, 64)); // small
- //sprite.setTextureRect(sf::IntRect(1152, 64, 64, 64)); // medium
+ sprite.setTextureRect(sf::IntRect(1152, 0, 64, 64));
if (isMirroring)
sprite.setPosition(x + 60, y);
else
sprite.setPosition(x + 4, y);
-
- // medium
- /*if (isMirroring)
+ }
+ else // medium rock
+ {
+ sprite.setTextureRect(sf::IntRect(1152, 64, 64, 64));
+ if (isMirroring)
sprite.setPosition(x + 60, y - 12);
else
- sprite.setPosition(x + 4, y - 12);*/
-
- app->draw(sprite);
-
- sprite.setPosition(x, y);
+ sprite.setPosition(x + 4, y - 12);
}
- float l = hpDisplay * ((MAP_WIDTH - 1) * TILE_WIDTH) / hpMax;
-
- sf::RectangleShape rectangle(sf::Vector2f((MAP_WIDTH - 1) * TILE_WIDTH, 25));
- rectangle.setFillColor(sf::Color(0, 0, 0,128));
- rectangle.setPosition(sf::Vector2f(OFFSET_X + TILE_WIDTH / 2, OFFSET_Y + 25 + (MAP_HEIGHT - 1) * TILE_HEIGHT));
- app->draw(rectangle);
-
- rectangle.setSize(sf::Vector2f(l, 25));
- rectangle.setFillColor(sf::Color(190, 20, 20));
- rectangle.setPosition(sf::Vector2f(OFFSET_X + TILE_WIDTH / 2, OFFSET_Y + 25 + (MAP_HEIGHT - 1) * TILE_HEIGHT));
- app->draw(rectangle);
-
- game().write( "Cimmerian Cyclop",
- 18,
- OFFSET_X + TILE_WIDTH / 2 + 10.0f,
- OFFSET_Y + 25 + (MAP_HEIGHT - 1) * TILE_HEIGHT + 1.0f,
- ALIGN_LEFT,
- sf::Color(255, 255, 255),
- app, 0 , 0);
+ app->draw(sprite);
+ sprite.setPosition(x, y);
+ }
+
+ float l = hpDisplay * ((MAP_WIDTH - 1) * TILE_WIDTH) / hpMax;
+
+ sf::RectangleShape rectangle(sf::Vector2f((MAP_WIDTH - 1) * TILE_WIDTH, 25));
+ rectangle.setFillColor(sf::Color(0, 0, 0,128));
+ rectangle.setPosition(sf::Vector2f(OFFSET_X + TILE_WIDTH / 2, OFFSET_Y + 25 + (MAP_HEIGHT - 1) * TILE_HEIGHT));
+ app->draw(rectangle);
+
+ rectangle.setSize(sf::Vector2f(l, 25));
+ rectangle.setFillColor(sf::Color(190, 20, 20));
+ rectangle.setPosition(sf::Vector2f(OFFSET_X + TILE_WIDTH / 2, OFFSET_Y + 25 + (MAP_HEIGHT - 1) * TILE_HEIGHT));
+ app->draw(rectangle);
+
+ game().write( "Cimmerian Cyclop",
+ 18,
+ OFFSET_X + TILE_WIDTH / 2 + 10.0f,
+ OFFSET_Y + 25 + (MAP_HEIGHT - 1) * TILE_HEIGHT + 1.0f,
+ ALIGN_LEFT,
+ sf::Color(255, 255, 255),
+ app, 0 , 0);
}
void CyclopEntity::collideWithEnnemy(GameEntity* collidingEntity)
{
EnnemyEntity* entity = static_cast<EnnemyEntity*>(collidingEntity);
if (entity->getMovingStyle() == movWalking)
{
inflictsRecoilTo(entity);
}
}
void CyclopEntity::inflictsRecoilTo(BaseCreatureEntity* targetEntity)
{
}
diff --git a/src/CyclopEntity.h b/src/CyclopEntity.h
index f8d51e9..cc29883 100644
--- a/src/CyclopEntity.h
+++ b/src/CyclopEntity.h
@@ -1,36 +1,43 @@
#ifndef CYCLOPENTITY_H
#define CYCLOPENTITY_H
#include "EnnemyEntity.h"
#include "PlayerEntity.h"
class CyclopEntity : public EnnemyEntity
{
public:
CyclopEntity(float x, float y);
virtual void animate(float delay);
virtual void render(sf::RenderTarget* app);
virtual void calculateBB();
virtual void inflictsRecoilTo(BaseCreatureEntity* targetEntity);
protected:
virtual void collideMapRight();
virtual void collideMapLeft();
virtual void collideMapTop();
virtual void collideMapBottom();
void afterWallCollide();
virtual bool hurt(int damages, enumShotType hurtingType, int level);
virtual void collideWithEnnemy(GameEntity* collidingEntity);
virtual void dying();
void computeStates(float delay);
int getHealthLevel();
private:
float timer;
int state;
int counter;
+ int destroyLevel;
+
+ int nextRockMissile;
+ void computeNextRockMissile();
void fire();
+ void fallRock();
+ void initFallingGrid();
+ bool fallingGrid[MAP_WIDTH][MAP_HEIGHT];
};
#endif // CYCLOPENTITY_H
diff --git a/src/FallingRockEntity.cpp b/src/FallingRockEntity.cpp
new file mode 100644
index 0000000..2dbca4b
--- /dev/null
+++ b/src/FallingRockEntity.cpp
@@ -0,0 +1,114 @@
+#include "FallingRockEntity.h"
+#include "PlayerEntity.h"
+#include "sfml_game/SpriteEntity.h"
+#include "sfml_game/ImageManager.h"
+#include "sfml_game/SoundManager.h"
+#include "Constants.h"
+#include "WitchBlastGame.h"
+
+FallingRockEntity::FallingRockEntity(float x, float y, int rockType)
+ : EnnemyEntity (ImageManager::getImageManager()->getImage(IMAGE_CYCLOP), x, y)
+{
+
+ Vector2D targetPos = game().getPlayerPosition();
+ imagesProLine = 20;
+ type = ENTITY_ENNEMY;
+ movingStyle = movFlying;
+ bloodColor = bloodNone; // stones don't bleed
+
+ age = 0.0f;
+ h = 1800 + rand() % 1000;
+ hp = 24;
+
+ this->rockType = rockType;
+
+ switch (rockType)
+ {
+ case 0: meleeDamages = 8; frame = 18; break;
+ case 1: meleeDamages = 10; frame = 38; break;
+ case 2: meleeDamages = 12; frame = 58; break;
+ }
+}
+
+void FallingRockEntity::animate(float delay)
+{
+ h -= delay * 800.0f;
+ if (canCollide()) testSpriteCollisions();
+ if (h <= 0.0f) dying();
+}
+
+void FallingRockEntity::render(sf::RenderTarget* app)
+{
+ int nx = frame % imagesProLine;
+ int ny = frame / imagesProLine;
+
+ // shadow
+ if (h <= 1600)
+ {
+ int f = 1600 - h;
+ if (f > 255) f = 255;
+
+ sprite.setColor(sf::Color(255, 255, 255, f));
+ sprite.setPosition(x, y);
+ sprite.setTextureRect(sf::IntRect((nx + 1) * width, ny * height, width, height));
+ app->draw(sprite);
+ sprite.setColor(sf::Color(255, 255, 255, 255));
+ }
+
+ sprite.setPosition(x, y - h);
+ sprite.setTextureRect(sf::IntRect(nx * width, ny * height, width, height));
+ app->draw(sprite);
+
+ #ifdef SHOW_BOUNDING_BOX
+ sf::Vertex line[] =
+ {
+ sf::Vertex(sf::Vector2f(boundingBox.left, boundingBox.top)),
+ sf::Vertex(sf::Vector2f(boundingBox.left + boundingBox.width, boundingBox.top)),
+ sf::Vertex(sf::Vector2f(boundingBox.left + boundingBox.width, boundingBox.top)),
+ sf::Vertex(sf::Vector2f(boundingBox.left + boundingBox.width, boundingBox.top + boundingBox.height)),
+ sf::Vertex(sf::Vector2f(boundingBox.left + boundingBox.width, boundingBox.top + boundingBox.height)),
+ sf::Vertex(sf::Vector2f(boundingBox.left, boundingBox.top + boundingBox.height)),
+ sf::Vertex(sf::Vector2f(boundingBox.left, boundingBox.top + boundingBox.height)),
+ sf::Vertex(sf::Vector2f(boundingBox.left, boundingBox.top))
+ };
+ app->draw(line, 8, sf::Lines);
+ #endif
+}
+
+void FallingRockEntity::calculateBB()
+{
+ int w = 30;
+ if (rockType == 1) w = 40;
+ else if (rockType == 2) w = 50;
+
+ boundingBox.left = (int)x - w / 2;
+ boundingBox.width = w;
+ boundingBox.top = (int)y - w / 2;
+ boundingBox.height = w;
+}
+
+bool FallingRockEntity::canCollide()
+{
+ return h < 50;
+}
+
+void FallingRockEntity::dying()
+{
+ isDying = true;
+ SoundManager::getSoundManager()->playSound(SOUND_ROCK_IMPACT);
+ game().makeShake(0.1f);
+
+ for (int i = 0; i < 4; i++)
+ {
+ SpriteEntity* blood = new SpriteEntity(ImageManager::getImageManager()->getImage(IMAGE_BLOOD), x, y, 16, 16, 6);
+ blood->setZ(OFFSET_Y - 1);
+
+ blood->setFrame(12 + rand()%6);
+ blood->setType(ENTITY_BLOOD);
+ blood->setVelocity(Vector2D(rand()%150));
+ blood->setViscosity(0.95f);
+
+ float bloodScale = 1.0f + (rand() % 10) * 0.1f;
+ blood->setScale(bloodScale, bloodScale);
+ }
+}
diff --git a/src/FallingRockEntity.h b/src/FallingRockEntity.h
new file mode 100644
index 0000000..7ed3baa
--- /dev/null
+++ b/src/FallingRockEntity.h
@@ -0,0 +1,22 @@
+#ifndef FALLINGROCKENTITY_H
+#define FALLINGROCKENTITY_H
+
+#include "EnnemyEntity.h"
+
+class FallingRockEntity : public EnnemyEntity
+{
+ public:
+ FallingRockEntity(float x, float y, int rockType);
+ virtual void animate(float delay);
+ virtual void calculateBB();
+ virtual void render(sf::RenderTarget* app);
+ protected:
+ virtual bool canCollide();
+
+ virtual void dying();
+ private:
+ int rockType;
+ int h;
+};
+
+#endif // FALLINGROCKENTITY_H
diff --git a/src/RockMissileEntity.cpp b/src/RockMissileEntity.cpp
index 806225e..b3ca001 100644
--- a/src/RockMissileEntity.cpp
+++ b/src/RockMissileEntity.cpp
@@ -1,127 +1,130 @@
#include "RockMissileEntity.h"
#include "PlayerEntity.h"
#include "sfml_game/SpriteEntity.h"
#include "sfml_game/ImageManager.h"
#include "sfml_game/SoundManager.h"
#include "Constants.h"
#include "WitchBlastGame.h"
-RockMissileEntity::RockMissileEntity(float x, float y)
+RockMissileEntity::RockMissileEntity(float x, float y, int rockType)
: EnnemyEntity (ImageManager::getImageManager()->getImage(IMAGE_CYCLOP), x, y)
{
Vector2D targetPos = game().getPlayerPosition();
imagesProLine = 20;
collisionDirection = -1;
type = ENTITY_ENNEMY;
movingStyle = movFlying;
bloodColor = bloodNone; // stones don't bleed
hasCollided = false;
age = 0.0f;
- rockType = rand() % 3;
- if (rockType == 2) rockType = 0;
+ this->rockType = rockType;
if (rockType == 0)
{
creatureSpeed = 500.0f;
hp = 12;
- meleeDamages = BAT_DAMAGES;
+ meleeDamages = 8;
frame = 18;
}
else
{
creatureSpeed = 450.0f;
hp = 24;
- meleeDamages = BAT_DAMAGES;
+ meleeDamages = 10;
frame = 38;
}
setVelocity(Vector2D(x, y).vectorNearlyTo(targetPos, creatureSpeed, 0.4f));
}
void RockMissileEntity::animate(float delay)
{
EnnemyEntity::animate(delay);
}
void RockMissileEntity::calculateBB()
{
- boundingBox.left = (int)x - 10;
- boundingBox.width = 20;
- boundingBox.top = (int)y - 10;
- boundingBox.height = 20;
+ int w;
+ if (rockType == 0) w = 20;
+ else w = 24;
+
+ boundingBox.left = (int)x - w / 2;
+ boundingBox.width = w;
+ boundingBox.top = (int)y - w / 2;
+ boundingBox.height = w;
}
void RockMissileEntity::collideWall()
{
if (rockType == 1 && !hasCollided)
{
hasCollided = true;
if (collisionDirection == DIRECTION_RIGHT || collisionDirection == DIRECTION_LEFT) velocity.x = -velocity.x;
else velocity.y = -velocity.y;
}
else
{
dying();
}
}
void RockMissileEntity::collideMapRight()
{
collisionDirection = DIRECTION_RIGHT;
collideWall();
}
void RockMissileEntity::collideMapLeft()
{
collisionDirection = DIRECTION_LEFT;
collideWall();
}
void RockMissileEntity::collideMapTop()
{
collisionDirection = DIRECTION_TOP;
collideWall();
}
void RockMissileEntity::collideMapBottom()
{
collisionDirection = DIRECTION_BOTTOM;
collideWall();
}
void RockMissileEntity::collideWithEnnemy(GameEntity* collidingEntity)
{
}
void RockMissileEntity::dying()
{
isDying = true;
SoundManager::getSoundManager()->playSound(SOUND_ROCK_IMPACT);
game().makeShake(0.1f);
for (int i = 0; i < 4; i++)
{
SpriteEntity* blood = new SpriteEntity(ImageManager::getImageManager()->getImage(IMAGE_BLOOD), x, y, 16, 16, 6);
blood->setZ(OFFSET_Y - 1);
blood->setFrame(12 + rand()%6);
blood->setType(ENTITY_BLOOD);
blood->setVelocity(Vector2D(rand()%150));
blood->setViscosity(0.95f);
float bloodScale = 1.0f + (rand() % 10) * 0.1f;
blood->setScale(bloodScale, bloodScale);
if ((collisionDirection == DIRECTION_LEFT) && (blood->getVelocity().x < 0.0f))
blood->setVelocity(Vector2D(-blood->getVelocity().x * 0.25f, blood->getVelocity().y));
else if ((collisionDirection == DIRECTION_RIGHT) && (blood->getVelocity().x > 0.0f))
blood->setVelocity(Vector2D(-blood->getVelocity().x * 0.25f, blood->getVelocity().y));
else if ((collisionDirection == DIRECTION_TOP) && (blood->getVelocity().y < 0.0f))
blood->setVelocity(Vector2D(blood->getVelocity().x, -blood->getVelocity().y * 0.25f));
else if ((collisionDirection == DIRECTION_BOTTOM) && (blood->getVelocity().y > 0.0f))
blood->setVelocity(Vector2D(blood->getVelocity().x, -blood->getVelocity().y * 0.25f));
}
}
diff --git a/src/RockMissileEntity.h b/src/RockMissileEntity.h
index 695eeef..415c779 100644
--- a/src/RockMissileEntity.h
+++ b/src/RockMissileEntity.h
@@ -1,29 +1,29 @@
#ifndef ROCKMISSILENTITY_H
#define ROCKMISSILENTITY_H
#include "EnnemyEntity.h"
class RockMissileEntity : public EnnemyEntity
{
public:
- RockMissileEntity(float x, float y);
+ RockMissileEntity(float x, float y, int rockType);
virtual void animate(float delay);
virtual void calculateBB();
protected:
virtual void collideMapRight();
virtual void collideMapLeft();
virtual void collideMapTop();
virtual void collideMapBottom();
virtual void collideWithEnnemy(GameEntity* collidingEntity);
virtual void dying();
private:
int collisionDirection;
int rockType;
bool hasCollided;
void collideWall();
};
#endif // ROCKMISSILENTITY_H
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Thu, Jun 11, 10:32 AM (3 w, 5 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
68437
Default Alt Text
(20 KB)
Attached To
Mode
R78 witchblast
Attached
Detach File
Event Timeline