// Position = "-29.795 -7.241"; // size = "33.875 10.000"; // text = "Hi There"; // font = "Arial"; // wordWrap = "0"; // hideOverflow = "1"; // textAlign = "Left"; // lineHeight = "10"; // aspectRatio = "1"; // lineSpacing = "0"; // characterSpacing = "0"; // autoSize = "1"; // fontSizes = "80"; // textColor = "1 1 1 1"; // hideOverlap = "0"; // mountID = "28"; function AmmoCountController:: onLevelLoaded(%this,%scenegraph) { %this.textColor="0 0 0 0.7"; //%this.checkCount(%this.text); } function AmmoCountController:: updateCount(%this,%newcount) { %this.text=%newcount; } function AmmoCountController:: add(%this,%amount) { %this.text= %this.text + %amount; } function AmmoCountController:: subtract(%this,%amount) { %this.text= %this.text - %amount; } function p1Health:: checkCount(%this,%count) { %this.textColor="0 0 0 1"; if(%count >= 100) { %this.updateCount(100); } if(%count <= 0) { %this.updateCount(0); Player1Win.setPosition(-6.042,263.331); Player1Win.setLayer(0); } if(%count >=0) %this.textColor="0.69 0.09 0.12 1"; if(%count >20) %this.textColor="0.86 0.08 0.235 1"; if(%count >40) %this.textColor="0 0.80 0 1"; if(%count >60) %this.textColor="0 0.54 0 1"; if(%count >80) %this.textColor="0 0.50 0 1"; if(%count >90) %this.textColor="0 0.392 0 1"; } function p2Health:: checkCount(%this,%count) { %this.textColor="0 0 0 1"; if(%count >= 100) { %this.updateCount(100); } if(%count <= 0) { %this.updateCount(0); Player1Win.setPosition(-6.042,263.331); Player1Win.setLayer(0); } if(%count >=0) %this.textColor="0.69 0.09 0.12 1"; if(%count >20) %this.textColor="0.86 0.08 0.235 1"; if(%count >40) %this.textColor="0 0.80 0 1"; if(%count >60) %this.textColor="0 0.54 0 1"; if(%count >80) %this.textColor="0 0.50 0 1"; if(%count >90) %this.textColor="0 0.392 0 1"; } function p2BombananaAmmoCount:: checkCount(%this,%count) { if(%count >= 5) { %this.updateCount(5); } if(%count <= 0) { %this.updateCount(00); } } function p2MgAmmoCount:: checkCount(%this,%count) { if(%count >= 40) { %this.updateCount(40); } if(%count <= 0) { %this.updateCount(00); } } function p2cannonAmmoCount:: checkCount(%this,%count) { if(%count >= 15) { %this.updateCount(15); } if(%count <= 0) { %this.updateCount(00); } } function p2grenadeAmmoCount:: checkCount(%this,%count) { if(%count >= 10) { %this.updateCount(10); } if(%count <= 0) { %this.updateCount(00); } } function p1BombananaAmmoCount:: checkCount(%this,%count) { if(%count >= 5) { %this.updateCount(5); } if(%count <= 0) { %this.updateCount(00); } } function p1MgAmmoCount:: checkCount(%this,%count) { if(%count >= 40) { %this.updateCount(40); } if(%count <= 0) { %this.updateCount(00); } } function p1cannonAmmoCount:: checkCount(%this,%count) { if(%count >= 15) { %this.updateCount(15); } if(%count <= 0) { %this.updateCount(00); } } function p1grenadeAmmoCount:: checkCount(%this,%count) { if(%count >= 10) { %this.updateCount(10); } if(%count <= 0) { %this.updateCount(00); } }