public void Initialize(Carte _carte1, Carte _carte2, ElementDecor _elementDecor)
        {
            this._carte1       = _carte1;
            this._carte2       = _carte2;
            this._elementDecor = _elementDecor;

            _collisionTableau = SetCollisionTableau(_carte1, _carte2, _elementDecor);
        }
Esempio n. 2
0
        public void Initialize(MoteurSysteme _moteurSysteme, MoteurPhysique _moteurPhysique)
        {
            this._moteurSysteme  = _moteurSysteme;
            this._moteurPhysique = _moteurPhysique;

            _camera = new Vector2(8 * 36, -36);

            _carte1       = new Carte(_moteurSysteme.CarteTableau1, _moteurSysteme.CarteTableauWidth, _moteurSysteme.CarteTableauHeight, _camera, 64, 64, 32, 16);
            _carte2       = new Carte(_moteurSysteme.CarteTableau2, _moteurSysteme.CarteTableauWidth, _moteurSysteme.CarteTableauHeight, _camera, 64, 64, 32, 16);
            _elementDecor = new ElementDecor(_moteurSysteme.ElementDecorTableau);
        }
        public int[,] SetCollisionTableau(Carte _carte1, Carte _carte2, ElementDecor _elementDecor)
        {
            int[,] _collisionTableau = new int[_carte1.TileTotalWidth, _carte1.TileTotalHeight];

            Console.WriteLine("setcollision");

            for (int y = 0; y < 10; y++)
            {
                for (int x = 0; x < 10; x++)
                {// reste a ajouter les numéros
                    if ((_carte1.TileArray[x, y] > 64 && _carte1.TileArray[x, y] < 91) || (_carte2.TileArray[x, y] > 64 && _carte2.TileArray[x, y] < 91))
                    {
                        _collisionTableau[x, y] = 1;
                        Console.WriteLine("Collision en " + x + ", " + y);
                    }

                    //_collisionTableau[_elementDecor.DecorTableau[1, y], _elementDecor.DecorTableau[2, y]] = 1;
                }
            }


            return(_collisionTableau);
        }
Esempio n. 4
0
 public SpriteDecor(ElementDecor _elementDecor, Vector2 _camera)
 {
     this._elementDecor = _elementDecor;
     this._camera       = _camera;
 }
        public int[,] SetCollisionTableau(Carte _carte1, Carte _carte2, ElementDecor _elementDecor)
        {
            int[,] _collisionTableau = new int[_carte1.TileTotalWidth,_carte1.TileTotalHeight];

            Console.WriteLine("setcollision");

            for (int y = 0; y < 10; y++)
            {
                for (int x = 0; x < 10; x++)
                {// reste a ajouter les numéros
                    if ((_carte1.TileArray[x, y] > 64 && _carte1.TileArray[x, y] < 91) || (_carte2.TileArray[x, y] > 64 && _carte2.TileArray[x, y] < 91))
                    {
                        _collisionTableau[x, y] = 1;
                        Console.WriteLine("Collision en " + x + ", " + y);
                    }

                    //_collisionTableau[_elementDecor.DecorTableau[1, y], _elementDecor.DecorTableau[2, y]] = 1;
                }
            }

            return _collisionTableau;
        }
        public void Initialize(Carte _carte1, Carte _carte2, ElementDecor _elementDecor)
        {
            this._carte1 = _carte1;
            this._carte2 = _carte2;
            this._elementDecor = _elementDecor;

            _collisionTableau = SetCollisionTableau(_carte1, _carte2, _elementDecor);
        }
Esempio n. 7
0
 public SpriteDecor(ElementDecor _elementDecor, Vector2 _camera)
 {
     this._elementDecor = _elementDecor;
     this._camera = _camera;
 }
Esempio n. 8
0
        public void Initialize(MoteurSysteme _moteurSysteme, MoteurPhysique _moteurPhysique)
        {
            this._moteurSysteme = _moteurSysteme;
            this._moteurPhysique = _moteurPhysique;

            _camera = new Vector2(8 * 36, -36);

            _carte1 = new Carte(_moteurSysteme.CarteTableau1, _moteurSysteme.CarteTableauWidth, _moteurSysteme.CarteTableauHeight, _camera, 64, 64, 32, 16);
            _carte2 = new Carte(_moteurSysteme.CarteTableau2,_moteurSysteme.CarteTableauWidth, _moteurSysteme.CarteTableauHeight, _camera, 64, 64, 32, 16);
            _elementDecor = new ElementDecor(_moteurSysteme.ElementDecorTableau);
        }