CPitcher.js 987 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. function CPitcher(oParentContainerPitcher){
  2. var _aPitcher = new Array();
  3. this._init = function(oParentContainerPitcher){
  4. for(var i = 0; i<NUM_SPRITE_PLAYERS; i++){
  5. _aPitcher.push(createBitmap(s_oSpriteLibrary.getSprite("pitcher_"+i)));
  6. _aPitcher[i].x = PITCHER_X;
  7. _aPitcher[i].y = PITCHER_Y;
  8. _aPitcher[i].rotation = 0;
  9. _aPitcher[i].visible = false;
  10. oParentContainerPitcher.addChild(_aPitcher[i]);
  11. }
  12. _aPitcher[0].visible = true;
  13. };
  14. this.viewPitcher = function(iPitcher){
  15. _aPitcher[iPitcher].visible = true;
  16. };
  17. this.hidePitcher = function(iPitcher){
  18. _aPitcher[iPitcher].visible = false;
  19. };
  20. this.getValue = function(){
  21. return _bCellOccupied;
  22. };
  23. this.unload = function(i){
  24. };
  25. s_oPticher = this;
  26. this._init(oParentContainerPitcher);
  27. }
  28. s_oPticher = null;