Пример #1
0
 public void CheckReset(object sender, LevelUpEventArgs e)
 {
     if (e.NewLevel == MAX_LEVEL_BEFORE_RESTART)
     {
         StatRecorder.Reset();
         LevelManager.Reset();
         WeaponController.Reset();
         LifeController.Reset();
     }
 }
Пример #2
0
        public Collidable(int w, int h, MovementController mc, LifeController lc, DamageController dc)
        {
            ID = -1;
            _width = w;
            _height = h;
            CollidedAt = new Vector2();            
            _bounds = new Rectangle(Convert.ToInt32(mc.Position.X), Convert.ToInt32(mc.Position.Y), _width, _height);
            MovementController = mc;
            LifeController = lc;
            DamageController = dc;
            Controllable = new ValueRef<bool>(true);

            _serverID = Interlocked.Increment(ref _itemCount);
        }
Пример #3
0
        public Collidable(int w, int h, MovementController mc, LifeController lc, DamageController dc)
        {
            ID                 = -1;
            _width             = w;
            _height            = h;
            CollidedAt         = new Vector2();
            _bounds            = new Rectangle(Convert.ToInt32(mc.Position.X), Convert.ToInt32(mc.Position.Y), _width, _height);
            MovementController = mc;
            LifeController     = lc;
            DamageController   = dc;
            Controllable       = new ValueRef <bool>(true);

            _serverID = Interlocked.Increment(ref _itemCount);
        }
Пример #4
0
 public Powerup(int w, int h, MovementController mc, LifeController lc, DamageController dc, short type)
     : base(w, h, mc, lc, dc)
 {
     ID   = Interlocked.Increment(ref _powerupGUID);
     Type = type;
 }
Пример #5
0
 public Powerup(int w, int h, MovementController mc, LifeController lc, DamageController dc, short type)
     : base(w, h, mc, lc, dc)
 {
     ID = Interlocked.Increment(ref _powerupGUID);
     Type = type;
 }