Setup framework for the goblin boar rider.

This commit is contained in:
2024-05-03 16:58:56 -05:00
parent 3051422383
commit c83f84f29c
9 changed files with 129 additions and 1 deletions
+21
View File
@@ -249,6 +249,27 @@ void sig::Animation::InitializeAnimations(){
CreateStillAnimation("laser.png",{5,1});
CreateStillAnimation("range_indicator.png",{24,24});
Animate2D::FrameSequence goblin_bow_mount_n,goblin_bow_mount_e,goblin_bow_mount_s,goblin_bow_mount_w;
Animate2D::FrameSequence goblin_bow_attack_n,goblin_bow_attack_e,goblin_bow_attack_s,goblin_bow_attack_w;
//Idle sequences for the mounted boar bow goblin.
for(int animationIndex=0;animationIndex<4;animationIndex++){
Animate2D::FrameSequence mountAnimation;
for(int i=0;i<2;i++){
mountAnimation.AddFrame(Animate2D::Frame{&GFX["monsters/commercial_assets/Goblin (Bow)_foreground.png"],{{i*32,animationIndex*32},{32,32}}});
}
ANIMATION_DATA[std::format("GOBLIN_BOW_MOUNTED_{}",animationIndex)]=mountAnimation;
animationIndex++;
}
//Shooting sequences for the mounted boar bow goblin.
for(int animationIndex=0;animationIndex<4;animationIndex++){
Animate2D::FrameSequence mountShootAnimation;
for(int i=0;i<4;i++){
mountShootAnimation.AddFrame(Animate2D::Frame{&GFX["monsters/commercial_assets/Goblin (Bow)_foreground.png"],{{i*32,index*32+4*32},{32,32}}});
}
ANIMATION_DATA[std::format("GOBLIN_BOW_ATTACK_{}",animationIndex)]=mountShootAnimation;
animationIndex++;
}
for(auto&dat:GFX){
std::string imgFile=dat.first;
if(!ANIMATION_DATA.count(imgFile)){