Here is the code for the bullets' movements fired by either the hero or the terrorist:
// Movement - Bullet A - Hero
case BulletAHeroPos
of 5: begin BulletAHeroPos:=0; BulletHero:=0; ImageBulletA4.Visible:=false; end;
4: begin BulletAHeroPos:=5; ImageBulletA3.Visible:=false; ImageBulletA4.Visible:=true; end;
3: begin BulletAHeroPos:=4; ImageBulletA2.Visible:=false; ImageBulletA3.Visible:=true; end;
2: begin BulletAHeroPos:=3; ImageBulletA1.Visible:=false; ImageBulletA2.Visible:=true; end;
1: begin BulletAHeroPos:=2; ImageBulletA1.Visible:=true end;
end;
// Movement - Bullet B - Hero
case BulletBHeroPos
of 5: begin BulletBHeroPos:=0; BulletHero:=0; ImageBulletB4.Visible:=false; end;
4: begin BulletBHeroPos:=5; ImageBulletB3.Visible:=false; ImageBulletB4.Visible:=true; end;
3: begin BulletBHeroPos:=4; ImageBulletB2.Visible:=false; ImageBulletB3.Visible:=true; end;
2: begin BulletBHeroPos:=3; ImageBulletB1.Visible:=false; ImageBulletB2.Visible:=true; end;
1: begin BulletBHeroPos:=2; ImageBulletB1.Visible:=true; end;
end;
// Movement - Bullet C - Hero
case BulletCHeroPos
of 5: begin BulletCHeroPos:=0; BulletHero:=0; ImageBulletC4.Visible:=false; end;
4: begin BulletCHeroPos:=5; ImageBulletC3.Visible:=false; ImageBulletC4.Visible:=true; end;
3: begin BulletCHeroPos:=4; ImageBulletC2.Visible:=false; ImageBulletC3.Visible:=true; end;
2: begin BulletCHeroPos:=3; ImageBulletC1.Visible:=false; ImageBulletC2.Visible:=true; end;
1: begin BulletCHeroPos:=2; ImageBulletC1.Visible:=true; end;
end;
// Movement - Bullet D - Hero
case BulletDHeroPos
of 5: begin BulletDHeroPos:=0; BulletHero:=0; ImageBulletD4.Visible:=false; end;
4: begin BulletDHeroPos:=5; ImageBulletD3.Visible:=false; ImageBulletD4.Visible:=true; end;
3: begin BulletDHeroPos:=4; ImageBulletD2.Visible:=false; ImageBulletD3.Visible:=true; end;
2: begin BulletDHeroPos:=3; ImageBulletD1.Visible:=false; ImageBulletD2.Visible:=true; end;
1: begin BulletDHeroPos:=2; ImageBulletD1.Visible:=true; end;
end;
// Movement - Bullet A - Terrorist
case BulletATerroristPos
of 5: begin BulletATerroristPos:=0; BulletTerrorist:=0; ImageBulletA1.Visible:=false; end;
4: begin BulletATerroristPos:=5; ImageBulletA2.Visible:=false; ImageBulletA1.Visible:=true; end;
3: begin BulletATerroristPos:=4; ImageBulletA3.Visible:=false; ImageBulletA2.Visible:=true; end;
2: begin BulletATerroristPos:=3; ImageBulletA4.Visible:=false; ImageBulletA3.Visible:=true; end;
1: begin BulletATerroristPos:=2; ImageBulletA4.Visible:=true end;
end;
// Movement - Bullet B - Terrorist
case BulletBTerroristPos
of 5: begin BulletBTerroristPos:=0; BulletTerrorist:=0; ImageBulletB1.Visible:=false; end;
4: begin BulletBTerroristPos:=5; ImageBulletB2.Visible:=false; ImageBulletB1.Visible:=true; end;
3: begin BulletBTerroristPos:=4; ImageBulletB3.Visible:=false; ImageBulletB2.Visible:=true; end;
2: begin BulletBTerroristPos:=3; ImageBulletB4.Visible:=false; ImageBulletB3.Visible:=true; end;
1: begin BulletBTerroristPos:=2; ImageBulletB4.Visible:=true end;
end;
// Movement - Bullet C - Terrorist
case BulletCTerroristPos
of 5: begin BulletCTerroristPos:=0; BulletTerrorist:=0; ImageBulletC1.Visible:=false; end;
4: begin BulletCTerroristPos:=5; ImageBulletC2.Visible:=false; ImageBulletC1.Visible:=true; end;
3: begin BulletCTerroristPos:=4; ImageBulletC3.Visible:=false; ImageBulletC2.Visible:=true; end;
2: begin BulletCTerroristPos:=3; ImageBulletC4.Visible:=false; ImageBulletC3.Visible:=true; end;
1: begin BulletCTerroristPos:=2; ImageBulletC4.Visible:=true end;
end;
// Movement - Bullet D - Terrorist
case BulletDTerroristPos
of 5: begin BulletDTerroristPos:=0; BulletTerrorist:=0; ImageBulletD1.Visible:=false; end;
4: begin BulletDTerroristPos:=5; ImageBulletD2.Visible:=false; ImageBulletD1.Visible:=true; end;
3: begin BulletDTerroristPos:=4; ImageBulletD3.Visible:=false; ImageBulletD2.Visible:=true; end;
2: begin BulletDTerroristPos:=3; ImageBulletD4.Visible:=false; ImageBulletD3.Visible:=true; end;
1: begin BulletDTerroristPos:=2; ImageBulletD4.Visible:=true end;
end;
No comments:
Post a Comment