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

            _collisionTableau = SetCollisionTableau(_carte1, _carte2, _elementDecor);
        }
Example #2
0
        public void Initialize(MoteurSysteme _moteurSysteme, MoteurPhysique _moteurPhysique, Color[] _colorMouseMap)
        {
            this._moteurSysteme = _moteurSysteme;
            this._moteurPhysique = _moteurPhysique;

            _personnage1 = new Personnage("Meta", 100, 90, 6, 3);
            _carte1 = new Carte(_moteurSysteme.CarteTableau1, _colorMouseMap, _moteurSysteme.CarteTableauWidth, _moteurSysteme.CarteTableauHeight, 64, 64, 32, 16);
            _carte2 = new Carte(_moteurSysteme.CarteTableau2, _colorMouseMap,_moteurSysteme.CarteTableauWidth, _moteurSysteme.CarteTableauHeight, 64, 64, 32, 16);
            _elementDecor = new ElementDecor(_moteurSysteme.ElementDecorTableau);
        }
Example #3
0
        public void Initialize(MoteurSysteme _moteurSysteme, MoteurPhysique _moteurPhysique)
        {
            this._moteurSysteme = _moteurSysteme;
            this._moteurPhysique = _moteurPhysique;

            _interfaceUtilisateur = new InterfaceUtilisateur(new String[4] {"Reprendre", "Reglage", "Sauvegarder", "Quitter"});// chaque string correspond a un bouton

            _camera = new Vector2(50, -50);

            _personnage1 = new Personnage("Meta", 100, 90, 6, 3);
            _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 SpriteCarte(Carte _carte, int _type, Vector2 _camera)
 {
     this._carte = _carte;
     this._type = _type;
     this._camera = _camera;
 }
Example #5
0
 public SpriteCarte(Carte _carte, int _type)
 {
     this._carte = _carte;
     this._type = _type;
 }
        public int[,] SetCollisionTableau(Carte _carte1, Carte _carte2, ElementDecor _elementDecor)
        {
            int[,] _collisionTableau = new int[_carte1.TileTotalWidth,_carte1.TileTotalHeight];

            for (int y = 0; y < _carte1.TileTotalHeight; y++)
            {
                for (int x = 0; y < _carte1.TileTotalWidth; 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;

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

            return _collisionTableau;
        }
        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 < 40; y++)
            {
                for (int x = 0; x < 40; 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;
        }