Exemplo n.º 1
0
        public Entity(GameplayScreen screen, string modelName, Boolean isUsingBumpMap = false,
                      Boolean isUsingAlpha = false, bool canCollide = false, float collisionRadius = 100)
        {
            if (screen == null)
                throw new ArgumentNullException("screen");
            if (modelName == null)
                throw new ArgumentNullException("modelName");

            this.Moved = true;
            this._screen = screen;
            _collisionRadius = collisionRadius;
            _canCollide = canCollide;

            this._modelName = modelName;
            this._isUsingBumpMap = isUsingBumpMap;
            this._isUsingAlpha = isUsingAlpha;
            _position = new Vector3(0, 0, 0);
            _rotation = 0;
            _rotationX = 0;
            RotationZ = 0;
            _alpha = 1;
            _speed = 0;
            _scale = 1;
            Up = Vector3.Up;
            Velocity = Vector3.Zero;
            RotateInTime = false;
            MoveInTime = false;
            _movesRandomly = false;
            _isBoundToHeightMap = true;
            HeightOffset = 0;
        }
Exemplo n.º 2
0
 public Rocket(GameplayScreen screen, Player owner)
     : base(screen, "models/rocket/rocket", true, true, true, 20)
 {
     this._owner = owner;
     this.Position = Vector3.Zero;
     this.HeightOffset = 60;
     this._isDead = false;
 }