Define health and growth rates of each class.
This commit is contained in:
parent
3ee6d03728
commit
e779725106
@ -12,11 +12,15 @@ typedef Attribute A;
|
||||
void Menu::InitializeClassInfoWindow(){
|
||||
Menu*classInfoWindow=CreateMenu(CLASS_INFO,CENTERED,game->GetScreenSize()-vi2d{64,64});
|
||||
|
||||
MenuLabel*label=new MenuLabel(CLASS_INFO,{{classInfoWindow->pos.x,classInfoWindow->pos.y+8},{classInfoWindow->size.x,16}},"Warrior",2,true,true);
|
||||
MenuLabel*label=new MenuLabel(CLASS_INFO,{{0,8},{classInfoWindow->size.x,16}},"Warrior",2,true,true);
|
||||
|
||||
classInfoWindow->AddComponent("Class Name",label);
|
||||
|
||||
CharacterRotatingDisplay*classDisplay=new CharacterRotatingDisplay(CLASS_INFO,{classInfoWindow->center()-vf2d{classInfoWindow->size.x/4,0},{72,120}},GFX["knight_full_render1.png"].Decal());
|
||||
CharacterRotatingDisplay*classDisplay=new CharacterRotatingDisplay(CLASS_INFO,{{0,0},{72,120}},GFX["knight_full_render1.png"].Decal());
|
||||
|
||||
classInfoWindow->AddComponent("Rotating Character Display",classDisplay);
|
||||
|
||||
MenuLabel*baseStatsLabel=new MenuLabel(CLASS_INFO,{{2*classInfoWindow->size.x/3,classInfoWindow->pos.y+20},{classInfoWindow->size.x/3,16}},"Base Stats",1,true,true);
|
||||
|
||||
classInfoWindow->AddComponent("Base Stats Text",baseStatsLabel);
|
||||
}
|
@ -27,12 +27,11 @@ protected:
|
||||
}
|
||||
virtual inline void DrawDecal(Crawler*game,vf2d parentPos,bool focused)override{
|
||||
//MenuComponent::DrawDecal(game,parentPos,focused);
|
||||
std::cout<<sin(timer)<<std::endl;
|
||||
game->DrawWarpedDecal(icon,std::array<vf2d,4>{
|
||||
rect.pos-icon->sprite->Size()/2+vf2d{abs(sin(timer)),sin(float(timer+PI))}*vf2d{rotatingFactor,perspectiveFactor},
|
||||
rect.pos+vf2d{0,rect.size.y}-icon->sprite->Size()/2+vf2d{abs(sin(timer)),sin(timer)}*vf2d{rotatingFactor,perspectiveFactor},
|
||||
rect.pos+rect.size-icon->sprite->Size()/2+vf2d{-abs(sin(float(timer+PI))),sin(float(timer+PI))}*vf2d{rotatingFactor,perspectiveFactor},
|
||||
rect.pos+vf2d{rect.size.x,0}-icon->sprite->Size()/2+vf2d{-abs(sin(float(timer+PI))),sin(timer)}*vf2d{rotatingFactor,perspectiveFactor},
|
||||
parentPos+rect.middle()+vf2d{abs(sin(timer)),sin(float(timer+PI))}*vf2d{rotatingFactor,perspectiveFactor},
|
||||
parentPos+rect.middle()+vf2d{0,rect.size.y}+vf2d{abs(sin(timer)),sin(timer)}*vf2d{rotatingFactor,perspectiveFactor},
|
||||
parentPos+rect.middle()+rect.size+vf2d{-abs(sin(float(timer+PI))),sin(float(timer+PI))}*vf2d{rotatingFactor,perspectiveFactor},
|
||||
parentPos+rect.middle()+vf2d{rect.size.x,0}+vf2d{-abs(sin(float(timer+PI))),sin(timer)}*vf2d{rotatingFactor,perspectiveFactor},
|
||||
});
|
||||
}
|
||||
};
|
@ -239,13 +239,13 @@ void Menu::Draw(Crawler*game){
|
||||
game->Clear(BLANK);
|
||||
for(auto&component:displayComponents){
|
||||
if(component->renderInMain){
|
||||
component->_Draw(game,pos,this==Menu::stack.back());
|
||||
component->_Draw(game,{0,0},this==Menu::stack.back());
|
||||
}
|
||||
}
|
||||
for(auto&key:buttons){
|
||||
for(auto&button:key.second){
|
||||
if(button->renderInMain){
|
||||
button->_Draw(game,pos,this==Menu::stack.back());
|
||||
button->_Draw(game,{0,0},this==Menu::stack.back());
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -255,13 +255,13 @@ void Menu::Draw(Crawler*game){
|
||||
game->DrawDecal(pos,r.Decal());
|
||||
for(auto&component:displayComponents){
|
||||
if(component->renderInMain){
|
||||
component->_DrawDecal(game,pos,this==Menu::stack.back());
|
||||
component->_DrawDecal(game,{0,0},this==Menu::stack.back());
|
||||
}
|
||||
}
|
||||
for(auto&key:buttons){
|
||||
for(auto&button:key.second){
|
||||
if(button->renderInMain){
|
||||
button->_DrawDecal(game,pos,this==Menu::stack.back());
|
||||
button->_DrawDecal(game,{0,0},this==Menu::stack.back());
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -588,5 +588,5 @@ void Menu::AddInventoryListener(MenuComponent*component,ITCategory category){
|
||||
}
|
||||
|
||||
vf2d Menu::center(){
|
||||
return pos+size/2;
|
||||
return size/2;
|
||||
}
|
@ -24,7 +24,7 @@ protected:
|
||||
}
|
||||
virtual void inline Draw(Crawler*game,vf2d parentPos,bool focused)override{
|
||||
std::string wrappedText=util::WrapText(game,label,rect.size.x,true,{float(scale),float(scale)});
|
||||
vf2d drawPos=-parentPos+rect.middle()-game->GetTextSizeProp(wrappedText)*float(scale)/2; //Assume centered.
|
||||
vf2d drawPos=parentPos+rect.middle()-vf2d{game->GetTextSizeProp(wrappedText)}*float(scale)/2; //Assume centered.
|
||||
if(!centered){
|
||||
drawPos=rect.pos+parentPos;
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
#define VERSION_MAJOR 0
|
||||
#define VERSION_MINOR 2
|
||||
#define VERSION_PATCH 0
|
||||
#define VERSION_BUILD 2196
|
||||
#define VERSION_BUILD 2225
|
||||
|
||||
#define stringify(a) stringify_(a)
|
||||
#define stringify_(a) #a
|
||||
|
@ -1,11 +1,8 @@
|
||||
Player
|
||||
{
|
||||
BaseHealth = 100
|
||||
BaseMana = 100
|
||||
MoveSpd = 100
|
||||
|
||||
BaseAtk = 10
|
||||
|
||||
# Amount of spd to increase/decrease vertically as you climb staircases
|
||||
StaircaseClimbSpd = 45
|
||||
|
||||
|
@ -2,6 +2,14 @@ Ranger
|
||||
{
|
||||
ClassName = Ranger
|
||||
|
||||
BaseHealth = 90
|
||||
BaseAtk = 13
|
||||
|
||||
# Amount of health gained per level.
|
||||
HealthGrowthRate = 3
|
||||
# Amount of attack gained per level.
|
||||
AtkGrowthRate = 0.8
|
||||
|
||||
Auto Attack
|
||||
{
|
||||
DamageMult = 1
|
||||
|
@ -2,6 +2,14 @@ Thief
|
||||
{
|
||||
ClassName = Thief
|
||||
|
||||
BaseHealth = 100
|
||||
BaseAtk = 10
|
||||
|
||||
# Amount of health gained per level.
|
||||
HealthGrowthRate = 5
|
||||
# Amount of attack gained per level.
|
||||
AtkGrowthRate = 0.2
|
||||
|
||||
Right Click Ability
|
||||
{
|
||||
Name = ???
|
||||
|
@ -2,6 +2,14 @@ Trapper
|
||||
{
|
||||
ClassName = Trapper
|
||||
|
||||
BaseHealth = 100
|
||||
BaseAtk = 10
|
||||
|
||||
# Amount of health gained per level.
|
||||
HealthGrowthRate = 5
|
||||
# Amount of attack gained per level.
|
||||
AtkGrowthRate = 0.2
|
||||
|
||||
Right Click Ability
|
||||
{
|
||||
Name = ???
|
||||
|
@ -2,6 +2,14 @@ Warrior
|
||||
{
|
||||
ClassName = Warrior
|
||||
|
||||
BaseHealth = 100
|
||||
BaseAtk = 10
|
||||
|
||||
# Amount of health gained per level.
|
||||
HealthGrowthRate = 5
|
||||
# Amount of attack gained per level.
|
||||
AtkGrowthRate = 0.2
|
||||
|
||||
Auto Attack
|
||||
{
|
||||
DamageMult = 1
|
||||
|
@ -2,6 +2,14 @@ Witch
|
||||
{
|
||||
ClassName = Witch
|
||||
|
||||
BaseHealth = 100
|
||||
BaseAtk = 10
|
||||
|
||||
# Amount of health gained per level.
|
||||
HealthGrowthRate = 5
|
||||
# Amount of attack gained per level.
|
||||
AtkGrowthRate = 0.2
|
||||
|
||||
Right Click Ability
|
||||
{
|
||||
Name = ???
|
||||
|
@ -2,6 +2,14 @@ Wizard
|
||||
{
|
||||
ClassName = Wizard
|
||||
|
||||
BaseHealth = 80
|
||||
BaseAtk = 15
|
||||
|
||||
# Amount of health gained per level.
|
||||
HealthGrowthRate = 1
|
||||
# Amount of attack gained per level.
|
||||
AtkGrowthRate = 0.5
|
||||
|
||||
Auto Attack
|
||||
{
|
||||
DamageMult = 1
|
||||
|
Loading…
x
Reference in New Issue
Block a user