コード例 #1
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);
        }
コード例 #2
0
 public Boost(ShipMovementController movementController, ValueRef <bool> controllable)
     : base(NAME, movementController)
 {
     _controllable = controllable;
 }