示例#1
0
 public Proyectil(Game game)
     : base(game)
 {
     _colision = new Colision();
     _spriteBatch = new SpriteBatch(game.GraphicsDevice);
     _pos = Vector2.Zero;
     _daño = 1;
     _speed = 20.0f;
     _activo = true;
     _anguloRotacion = 0;
 }
示例#2
0
        public void Initialize(Player player, Texture2D textura, Texture texturaFrameProyectil, float daño, Vector2 pos, Vector2 incremento, Colision colision)
        {
            _player = player;
            _textura = textura;
            _daño = (int)daño;
            _pos = pos;
            _colision = colision;
            _incremento = incremento;

            //Datos de color de la textura
            _texturaFrame = textura;
            textureData = new Color[_texturaFrame.Width * _texturaFrame.Height];
            _texturaFrame.GetData(textureData);
        }
示例#3
0
        public override void Initialize()
        {
            preparados = false;
            _anguloRotacion = 0f;
            _numMandos = new bool[4] { false, false, false, false };
            ready = new bool[4] { false, false, false, false };
            _tanques = new Texture2D[4];
            _listaPlayers = new List<Player>();
            sel = new int[4];
            playingState = (Playing)Manager.Estados[GameStates.PlayingState];

            _colision = new Colision();

            for (int i = 0; i < 4; i++)
            {
                sel[i] = 0;
            }

            tanque1 = _tanques[sel[0]];
            tanque2 = _tanques[sel[1]];
            tanque3 = _tanques[sel[2]];
            tanque4 = _tanques[sel[3]];
            AsignarControles();
        }