コード例 #1
0
 public PhysicalObject(Point location, Size spriteSize, DeleteObjectFunc deleteObjectFunc)
     : base(location)
 {
     this.size             = spriteSize;
     this.deleteObjectFunc = deleteObjectFunc;
     currSpriteOffset      = 0;
 }
コード例 #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;
 }
コード例 #3
0
ファイル: Bomb.cs プロジェクト: Codename4774/Bomberman-server
        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;
        }
コード例 #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);
        }
コード例 #5
0
 public PhysicalObject(Point location, Image sprite, Size spriteSize, DeleteObjectFunc deleteObjectFunc)
     : base(location, sprite)
 {
     this.size             = spriteSize;
     this.deleteObjectFunc = deleteObjectFunc;
 }