Setup King Slime encounter, Boss room map setup with spawn and player, made non-infinite. Implemented enemy iframes and added phase framework for the boss.

This commit is contained in:
2023-09-07 01:35:23 -05:00
parent c9fa25a823
commit c75e56d642
15 changed files with 363 additions and 1041 deletions
+21 -34
View File
@@ -129,7 +129,7 @@ bool Crawler::OnUserCreate(){
sig::Animation::SetupPlayerAnimations();
view=TileTransformedView{GetScreenSize(),{1,1}};
LoadLevel(CAMPAIGN_1_1);
LoadLevel(BOSS_1);
InitializeClasses();
ChangePlayerClass(WARRIOR);
Warrior::ability4=Ranger::ability1; //Class ability swapping demonstration.
@@ -1180,78 +1180,65 @@ int main()
}
datafilestringdata operator ""_s(const char*key,std::size_t len){
if(utils::datafile::DEBUG_ACCESS_OPTIONS){
std::cout<<"Reading "<<std::string(key,len)<<std::endl;
}
Crawler::OutputDebugInfo(key,len);
return {DATA,std::string(key,len)};
}
datafileintdata operator ""_i(const char*key,std::size_t len){
if(utils::datafile::DEBUG_ACCESS_OPTIONS){
std::cout<<"Reading "<<std::string(key,len)<<std::endl;
}
Crawler::OutputDebugInfo(key,len);
return {DATA,std::string(key,len)};
}
datafilefloatdata operator ""_f(const char*key,std::size_t len){
if(utils::datafile::DEBUG_ACCESS_OPTIONS){
std::cout<<"Reading "<<std::string(key,len)<<std::endl;
}
Crawler::OutputDebugInfo(key,len);
return {DATA,std::string(key,len)};
}
datafiledoubledata operator ""_d(const char*key,std::size_t len){
if(utils::datafile::DEBUG_ACCESS_OPTIONS){
std::cout<<"Reading "<<std::string(key,len)<<std::endl;
}
Crawler::OutputDebugInfo(key,len);
return {DATA,std::string(key,len)};
}
Pixel operator ""_Pixel(const char*key,std::size_t len){
if(utils::datafile::DEBUG_ACCESS_OPTIONS){
std::cout<<"Reading "<<std::string(key,len)<<std::endl;
}
Crawler::OutputDebugInfo(key,len);
return {uint8_t(DATA.GetProperty(std::string(key,len)).GetInt(0)),uint8_t(DATA.GetProperty(std::string(key,len)).GetInt(1)),uint8_t(DATA.GetProperty(std::string(key,len)).GetInt(2)),uint8_t(DATA.GetProperty(std::string(key,len)).GetInt(3))};
}
std::string operator ""_S(const char*key,std::size_t len){
if(utils::datafile::DEBUG_ACCESS_OPTIONS){
std::cout<<"Reading "<<std::string(key,len)<<std::endl;
}
Crawler::OutputDebugInfo(key,len);
return DATA.GetProperty(std::string(key,len)).GetString();
}
int operator ""_I(const char*key,std::size_t len){
if(utils::datafile::DEBUG_ACCESS_OPTIONS){
std::cout<<"Reading "<<std::string(key,len)<<std::endl;
}
Crawler::OutputDebugInfo(key,len);
return DATA.GetProperty(std::string(key,len)).GetInt();
}
float operator ""_F(const char*key,std::size_t len){
if(utils::datafile::DEBUG_ACCESS_OPTIONS){
std::cout<<"Reading "<<std::string(key,len)<<std::endl;
}
Crawler::OutputDebugInfo(key,len);
return DATA.GetProperty(std::string(key,len)).GetReal();
}
float operator ""_FRange(const char*key,std::size_t len){
if(utils::datafile::DEBUG_ACCESS_OPTIONS){
std::cout<<"Reading "<<std::string(key,len)<<std::endl;
}
Crawler::OutputDebugInfo(key,len);
return util::random(DATA.GetProperty(std::string(key,len)).GetReal(1)-DATA.GetProperty(std::string(key,len)).GetReal(0))+DATA.GetProperty(std::string(key,len)).GetReal(0);
}
double operator ""_D(const char*key,std::size_t len){
if(utils::datafile::DEBUG_ACCESS_OPTIONS){
std::cout<<std::string(key,len)<<std::endl;
}
Crawler::OutputDebugInfo(key,len);
return DATA.GetProperty(std::string(key,len)).GetReal();
}
datafile operator ""_A(const char*key,std::size_t len){
if(utils::datafile::DEBUG_ACCESS_OPTIONS){
std::cout<<std::string(key,len)<<std::endl;
}
Crawler::OutputDebugInfo(key,len);
return DATA.GetProperty(std::string(key,len));
}
void Crawler::OutputDebugInfo(const char*key,std::size_t len){
if(utils::datafile::DEBUG_ACCESS_OPTIONS){
std::string k=std::string(key);
if(!k.starts_with("debug_")){
std::cout<<"Reading "<<k<<std::endl;
}
}
}