Esempio n. 1
0
 public PhysicalObject(Point location, Size spriteSize, DeleteObjectFunc deleteObjectFunc)
     : base(location)
 {
     this.size             = spriteSize;
     this.deleteObjectFunc = deleteObjectFunc;
     currSpriteOffset      = 0;
 }
Esempio n. 2
0
 public Bomb(Point location, Image texture, int areaOfExplosion, DeleteObjectFunc deleteBombFunc, Player owner)
     : base(location, texture)
 {
     timerExplosion          = new Timer();
     timerExplosion.Interval = 3000;
     this.deleteObjectFunc   = deleteBombFunc;
     timerExplosion.Tick    += TimerEvent;
     this.areaOfExplosion    = areaOfExplosion;
     timerExplosion.Enabled  = true;
     this.owner = owner;
 }
Esempio n. 3
0
        public Bomb(Point location, int areaOfExplosion, DeleteObjectFunc deleteBombFunc, Player owner)
            : base(location)
        {
            Timer timerExplosion = new Timer();

            timerExplosion.Interval = 3000;
            this.deleteObjectFunc   = deleteBombFunc;
            timerExplosion.Elapsed += TimerEvent;
            this.areaOfExplosion    = areaOfExplosion;
            timerExplosion.Enabled  = true;
            this.isBlowedUp         = false;
            this.owner = owner;
        }
Esempio n. 4
0
        public Player(Point location, Image sprite, Size spriteSize, string name, DeleteObjectFunc deletePlayerFunc, Image bombSprite, Size bombSize, DeleteObjectFunc deleteBombFunc, int id)
            : base(location, sprite, spriteSize, deletePlayerFunc)
        {
            thisName = name;
            isMoved  = false;

            isDead         = false;
            isDying        = false;
            maxCountBombs  = 2;
            currCountBombs = 0;
            this.id        = id;

            bombFactory = new BombFactory(bombSprite, bombSize, deleteBombFunc, this);
        }
 public PhysicalObject(Point location, Image sprite, Size spriteSize, DeleteObjectFunc deleteObjectFunc)
     : base(location, sprite)
 {
     this.size             = spriteSize;
     this.deleteObjectFunc = deleteObjectFunc;
 }