The open source repository for the action RPG game in development by Sig Productions titled 'Adventures in Lestoria'! https://forums.lestoria.net
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
AdventuresInLestoria/Crawler/Monster.cpp

41 lines
922 B

#include "Monster.h"
MonsterData::MonsterData(){}
MonsterData::MonsterData(int hp,int atk,float moveSpd,float size,MonsterStrategy strategy):
hp(hp),atk(atk),moveSpd(moveSpd),size(size),strategy(strategy){
}
int MonsterData::GetHealth(){
return hp;
}
int MonsterData::GetAttack(){
return atk;
}
float MonsterData::GetMoveSpdMult(){
return moveSpd;
}
float MonsterData::GetSizeMult(){
return size;
}
MonsterStrategy MonsterData::GetAIStrategy(){
return strategy;
}
Monster::Monster(){}
Monster::Monster(vf2d pos,MonsterData data):
pos(pos),hp(data.GetHealth()),maxhp(data.GetHealth()),atk(data.GetAttack()),moveSpd(data.GetMoveSpdMult()),size(data.GetSizeMult()),strategy(data.GetAIStrategy()){
}
vf2d&Monster::GetPos(){
return pos;
}
int Monster::GetHealth(){
return hp;
}
int Monster::GetAttack(){
return atk;
}
float Monster::GetMoveSpdMult(){
return moveSpd;
}
float Monster::GetSizeMult(){
return size;
}