Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Ago19

Pages: [1]
1
Graphics / Re: Resizing of an Image in SFML 2.5
« on: February 16, 2022, 04:35:34 pm »
How do I drawn on sf::RenderTexture? And then how do I use sf::RenderTexture::...?
Could you write me some example code? thanks


2
Graphics / Resizing of an Image in SFML 2.5
« on: February 15, 2022, 02:36:56 pm »
I know that I can't resize an Image in SFML 2.5.
I learning how to use SFML and I'm trying to make a program that reads every pixel of an Image then transforms it into an ASCII char. The problem is that if the image size is too big the program takes too long and also can't output the whole pixel line to the console. (because in the console you can only output a fixed amount of char before it goes to the new line).
What I'm trying to do is to resize an Image. I tryied with sf::Image, sf::Texture but I can't with any of those. The only thing that i can resize is an sf::Sprite but then I can't take each pixel of the sprite with getPixel(x,y).
Any suggestions?
Thanks

3
Graphics / Re: RectangleShape Not Drawing
« on: November 17, 2020, 02:48:40 pm »
no, I mean things like pragma once and include "Shapes.h"

I just put all together in a single source file:

I did the same but the Boxes don't appear on the screen when I click. Their coordinates are right on the debug window though. When I click everything goes fine except of the Box being drawn on the screen
 :'(

4
Graphics / Re: RectangleShape Not Drawing
« on: November 17, 2020, 12:01:21 pm »
I just tested your code (i've put everything in the same source file, except from preprocessors) and its working as it should...
Sorry I can't understand. I've set the project to be SFML_STATIC. Maybe it's that? What do you mean with "except from preprocessor"?

5
Graphics / RectangleShape Not Drawing
« on: November 17, 2020, 10:37:28 am »
The RectangleShape in the struct Box won't draw, it should draw a box where you click with your mouse

Shapes.h
#pragma once
#include <SFML/Graphics.hpp>
#include <vector>


struct Box {
       
        sf::RectangleShape sprite;

        Box() {

                sprite.setSize(sf::Vector2f(100.f, 100.f));
                sprite.setFillColor(sf::Color::Red);
                sprite.setPosition(0, 0);
        }

}shape_box;

std::vector<Box> shapes;

 

logger.h
#pragma once
#include <iostream>
#include <SFML/Graphics.hpp>

void logVec2f(const sf::Vector2f& vec) {
        std::cout << "x: " << vec.x << " y: " << vec.y << std::endl;
}

void logMousePosRelToWin(sf::RenderWindow& Win) {
        std::cout << "x: " << sf::Mouse::getPosition(Win).x << " y: " << sf::Mouse::getPosition(Win).y << std::endl;
}
 

main.cpp
#include <SFML/Graphics.hpp>
#include <iostream>
#include "Shapes.h"
#include "logger.h"


int main()
{
    sf::RenderWindow window(sf::VideoMode(1200, 800), "Gravity Box");


    while (window.isOpen())
    {
        sf::Event event;
        while (window.pollEvent(event))
        {
            if (event.type == sf::Event::Closed)
                window.close();

            if (event.type == sf::Event::MouseButtonPressed) {
                shape_box.sprite.setPosition(sf::Vector2f(sf::Mouse::getPosition(window)));
                shapes.push_back(shape_box);
                logMousePosRelToWin(window);
                std::cout << "[Log] Shape Drawn " << shapes.size() << std::endl;
                logVec2f(shape_box.sprite.getPosition());
            }
        }

        window.clear();
        for (unsigned int i = 0; i < shapes.size(); i++) {
            window.draw(shapes[i].sprite);
        }

        window.display();
    }

    return 0;
}


 
This is the whole code, thanks in advance

6
Graphics / Re: SFML Draw() won't draw sprite on Window [SOLVED]
« on: October 16, 2020, 11:12:46 am »
Thank you  ;D

7
Graphics / Re: SFML Draw() won't draw sprite on Window
« on: October 16, 2020, 08:43:59 am »
Quote
Because at the moment when global variable get values (i.e. constructor is called) your texture is not yet loaded (it's loading from file inside main function)
You're right, thanks for the explenation
Quote
No, it's not the same (I'm not even sure that ship.Ship() compiled)
You're right 2.0. As much as I've understood ship = Ship(); is like calling the constructor. But I was wondering why Ship ship doesn't do the same.

Quote
About your bullet sprite problem...
Did you try to add setUp method also for bullet?  ;)
You're right 3.0. I thought that the reason why the sprite didn't load was different from the previous one, while in truth was the exact same
;)

8
Graphics / Re: SFML Draw() won't draw sprite on Window
« on: October 15, 2020, 07:52:33 pm »
I think I'm getting nuts. Maybe I just need a break  :o
Before optimizing the code I wanted to implement some more features, like making the ship shoot. But when I press the button to trigger the Shoot() function the Bullet's sprite isn't drawn on the screen, even if the function is called. Here's some code:

Ship Class:
struct Ship {
        sf::Sprite sprite;
        Bullet b = (Bullet)false;
        int speed = 5;
        enum Side {LEFT, RIGHT};

        // Keys
        bool isLeftPressed = false;
        bool isRightPressed = false;


        void setUp() {
                sprite.setTexture(tship);
                sprite.setScale(0.5f,0.5);
                sprite.setPosition((float)WIDTH / 2.0f - (float)sprite.getGlobalBounds().width / 2.0f, HEIGHT * 5.0f / 6.0f);
                std::cout << "Ship Builded\n";
        }

        void move(Side side) {
                switch (side)
                {
                case Ship::LEFT:
                        sprite.move(-speed, 0);
                        break;
                case Ship::RIGHT:
                        sprite.move(speed, 0);
                        break;
                default:
                        break;
                }
        }

        bool keepShipInScreen() {
                if (sprite.getPosition().x < 0) {
                        sprite.setPosition(0, sprite.getPosition().y);
                        return true;
                }
                else if (sprite.getPosition().x > WIDTH - sprite.getGlobalBounds().width) {
                        sprite.setPosition(WIDTH - sprite.getGlobalBounds().width, sprite.getPosition().y);
                        return true;
                }
                else return false;
        }

        void Shoot() {
                b.bExist = true;
                b.sprite.setPosition(sprite.getPosition().x + sprite.getGlobalBounds().width / 2 - b.sprite.getGlobalBounds().height / 2, sprite.getPosition().y);
        }

        void handler() {

                if (keepShipInScreen() == false) {
                        if (isLeftPressed == true) {
                                move(LEFT);
                        }
                        if (isRightPressed == true) {
                                move(RIGHT);
                        }
                }


                b.handler();

        }

}ship;
 

Player's Thread:
void ShipThread() {
        // Thread Settings
        auto ssTimer = std::chrono::steady_clock::now();
        while (1) {
                auto seTimer = std::chrono::steady_clock::now();
                if (std::chrono::duration_cast<std::chrono::milliseconds>(seTimer - ssTimer).count() >= 16.67) { // Set Looprate to 60
                        // Thread
                                // Player Input
                                        // Move Left
                        if (sf::Keyboard::isKeyPressed(sf::Keyboard::A) || sf::Keyboard::isKeyPressed(sf::Keyboard::Left))
                        {
                                ship.isLeftPressed = true;
                        }
                        else ship.isLeftPressed = false;
                                        // Move Right
                        if (sf::Keyboard::isKeyPressed(sf::Keyboard::D) || sf::Keyboard::isKeyPressed(sf::Keyboard::Right))
                        {
                                ship.isRightPressed = true;
                        }
                        else ship.isRightPressed = false;
                                        // Shoot
                        if (sf::Keyboard::isKeyPressed(sf::Keyboard::W) || sf::Keyboard::isKeyPressed(sf::Keyboard::Up)) {
                                ship.Shoot();
                        }
                                // Player Handler
                        ship.handler();

                        ssTimer = std::chrono::steady_clock::now(); // Restart Timer
                }
        }
}
 

Texture Loading Function:
sf::Texture tship, tenemy, tbullet;

bool textureLoad() {
        if (tship.loadFromFile("../Textures/ship.png")) {
                std::cout << "Ship Texture Succesfully Loaded\n";
                if (tenemy.loadFromFile("../Textures/enemy.png")) {
                        std::cout << "Enemy Texture Succesfully Loaded\n";
                        if (tbullet.loadFromFile("../textures/bullet.png")) {
                                std::cout << "Bullet Texture Succesfully Loaded\n";
                                return true;
                        }
                        else return false;
                }
                else return false;
        }
        else return false;
}
 

main.cpp
#include <SFML/Graphics.hpp>
#include <iostream>
#include <thread>
#include <vector>
#include <stdlib.h>
#include "TextureLoad.h"
#include "Entity.h"
#include "Threads.h"

short WIDTH = 600, HEIGHT = 800;
sf::RenderWindow window;
std::vector<Enemy> e;


int main()
{
    srand(time(NULL));

    // Setup Game Window
    window.create(sf::VideoMode(WIDTH, HEIGHT), "Space Invaders");
    window.setFramerateLimit(60);

    // Load Textures
    textureLoad();
    ship.setUp();
    // SetUp Level
    for (int i = 0; i < 5; i++) {
        e.push_back(enemy = (Enemy)i);
    }

    // Threads
        // Enemy
    std::thread th_enemy(EnemyThread);
        // Ship
    std::thread th_ship(ShipThread);


    // Game Loop
    while (window.isOpen())
    {
        // Event Handler
        sf::Event event;
        while (window.pollEvent(event))
        {
            if (event.type == sf::Event::Closed)
                window.close();
        }

        // Bullet Handler
        for (unsigned int i = 0; i < e.size(); i++) {
            if (e[i].b.bExist == true) {
                e[i].b.handler();
            }
        }

        // Draw
        window.clear();

            // Draw Enemy
        for (unsigned int i = 0; i < e.size(); i++) {
            window.draw(e[i].sprite);
        }

            // Draw Enemy Bullet
        for (unsigned int i = 0; i < e.size(); i++) {
            if (e[i].b.bExist == true) {
                window.draw(e[i].b.sprite);
            }
        }

            // Draw Ship
        window.draw(ship.sprite);
           
            // Draw Ship Bullets
        if (ship.b.bExist == true) {
            window.draw(ship.b.sprite);
        }

        window.display();
    }

    th_enemy.join();
    th_ship.join();
    return 0;
}
 

I looked if the sprite was drawn out of the windows but it wans't. I checked if the texture was loaded correctly and it was, also because the bullets of the enemies work fine. I have no idea
PLS HELP ME!! :P

9
Graphics / Re: SFML Draw() won't draw sprite on Window
« on: October 15, 2020, 04:24:15 pm »
Thanks now it works but it's now creating 2 instances of Ship  :(
I've fixed it removing the constructor and writing all the code in a method called setUp, but it's not how I want to do it. I want to only write once Ship ship like I did with the Enemy instances.
I'm wondering why I had to add that line (ship = Ship() Is it the same as ship.Ship() ?). I'm pretty new to c++ so I still have a lot to learn.
I can't explain why it didn't compile on your computer, while on mine goes flawlessly. I have visual studio community

10
Graphics / Re: SFML Draw() won't draw sprite on Window
« on: October 14, 2020, 10:33:46 pm »

main.cpp
#include <SFML/Graphics.hpp>
#include <iostream>
#include <thread>
#include <vector>
#include <stdlib.h>
#include "Collision.hpp"
#include "TextureLoad.h"
#include "Entity.h"
#include "Threads.h"

short WIDTH = 600, HEIGHT = 800;
std::vector<Enemy> e;
Ship ship;

int main()
{
    srand(time(NULL));

    // Setup Game Window
    sf::RenderWindow window(sf::VideoMode(WIDTH, HEIGHT), "Space Invaders");
    window.setFramerateLimit(60);

    // Load Textures
    textureLoad();

    // SetUp Level
    for (int i = 0; i < 5; i++) {
        e.push_back(enemy = (Enemy)i);
    }

    // Threads
        // Enemy
    std::thread th_enemy(EnemyThread);

    // Game Loop
    while (window.isOpen())
    {
        // Event Handler
        sf::Event event;
        while (window.pollEvent(event))
        {
            if (event.type == sf::Event::Closed)
                window.close();
        }

        // Bullet Handler
        for (unsigned int i = 0; i < e.size(); i++) {
            if (e[i].b.bExist == true) {
                e[i].b.handler();
            }
        }

        // Draw
        window.clear();

            // Draw Enemy
        for (unsigned int i = 0; i < e.size(); i++) {
            window.draw(e[i].sprite);
        }

            // Draw Enemy Bullet
        for (unsigned int i = 0; i < e.size(); i++) {
            if (e[i].b.bExist == true) {
                window.draw(e[i].b.sprite);
            }
        }

            // Draw Ship
        window.draw(ship.sprite);

        window.display();
    }

    th_enemy.join();
    return 0;
}
 

TextureLoad.h
#pragma once
#include <SFML/Graphics.hpp>
#include <iostream>



sf::Texture tship, tenemy, tbullet;

bool textureLoad() {
        if (tship.loadFromFile("../Textures/ship.png")) {
                std::cout << "Ship Texture Succesfully Loaded\n";
                if (tenemy.loadFromFile("../Textures/enemy.png")) {
                        std::cout << "Enemy Texture Succesfully Loaded\n";
                        if (tbullet.loadFromFile("../textures/bullet.png")) {
                                std::cout << "Bullet Texture Succesfully Loaded\n";
                                return true;
                        }
                        else return false;
                }
                else return false;
        }
        else return false;
}

 

Threads.h
#pragma once
#include <chrono>


extern std::vector<Enemy> e;
void EnemyThread() {
        auto startTimer = std::chrono::steady_clock::now();
        while (1) {
                auto endTimer = std::chrono::steady_clock::now();
        if (std::chrono::duration_cast<std::chrono::milliseconds>(endTimer - startTimer).count() >= 16.67) {
                    for (unsigned int i = 0; i < e.size(); i++) {
                            e[i].handler();
                    }
                                startTimer = std::chrono::steady_clock::now();
        }
        }
}

 

Entity.h
#pragma once
#include <SFML/Graphics.hpp>
#include <iostream>
#include <stdlib.h>
#include <time.h>  

extern short WIDTH, HEIGHT;

struct Bullet {
        sf::Sprite sprite;
        bool bExist = false;
        float speed = 5;
        bool amEnemy;

        Bullet(bool amAnEnemy) : amEnemy(amAnEnemy) {
                sprite.setTexture(tbullet);
                sprite.setScale(0.05f,0.05f);
                if (amEnemy == true) {
                        sprite.rotate(90);
                }
                else sprite.rotate(270);
        }

        void handler() {

                // Should I Exist? & Move By Gravity
                        switch (amEnemy)
                        {
                        case true:
                                if (sprite.getPosition().y > HEIGHT) {
                                        bExist = false;
                                        break;
                                }
                                if (bExist == true) {
                                        sprite.move(0, speed);
                                }
                                break;
                        case false:
                                if (sprite.getPosition().y < 0) {
                                        bExist = false;
                                        break;
                                }
                                if (bExist == true) {
                                        sprite.move(0, -speed);
                                }
                                break;
                        }
        }

       

};

struct Enemy {
        sf::Sprite sprite;
        Bullet b = (Bullet)true;
       

        Enemy(int nIter) {
                sprite.setTexture(tenemy);
                sprite.setScale(0.1f, 0.1f);
                sprite.setPosition(WIDTH * nIter / 5.0f, 0.0f);
        }

        void Shoot() {
                b.bExist = true;
                b.sprite.setPosition(sprite.getPosition().x / 2 + b.sprite.getPosition().x / 2, sprite.getPosition().y);
        }

        void handler() {
                if(b.bExist == false){
                        int possNum = rand() % 500 + 1;
                        if (possNum == 1) {
                                Shoot();
                        }
                }
        }


}enemy = (Enemy)1;

struct Ship {
        sf::Sprite sprite;
        Bullet b = (Bullet)false;

        Ship() {
                sprite.setTexture(tship);
                sprite.setScale(0.5f,0.5);
                sprite.setPosition((float)WIDTH / 2.0f - (float)sprite.getGlobalBounds().width / 2.0f, HEIGHT * 5.0f / 6.0f);
                std::cout << "Ship Builded\n";
        }
};
 

This is the whole code

11
Graphics / Re: SFML Draw() won't draw sprite on Window
« on: October 14, 2020, 09:30:39 pm »
I've changed the code converting all integers in floats but the problem is the same

        Ship() {
                sprite.setTexture(tship);
                sprite.setScale(0.5f,0.5);
                sprite.setPosition((float)WIDTH / 2.0f - (float)sprite.getGlobalBounds().width / 2.0f, HEIGHT * 5.0f / 6.0f);
                std::cout << "Ship Builded\n";
        }
 

12
Graphics / Re: SFML Draw() won't draw sprite on Window
« on: October 14, 2020, 11:43:12 am »
Yes, I've also outputed the position and it says that is at y = 666.
However 5 / 6 != 0
The setPosition(WIDTH / 2, HEIGHT * 5 / 6) means to put the sprite at the 5 / 6 of the screen height, so in the lower part

13
Graphics / SFML Draw() won't draw sprite on Window [SOLVED]
« on: October 14, 2020, 10:03:30 am »
I'm creating a clone of space invaders, which actually is an old project that I'm attempting once more. The Draw function can draw everything like the Enemy Space Ship, the Bullets they shoot, but not the Player Ship that he uses to play the game. The most frustrating thing is that there is no error while compiling or executing the program.

Here's the code

Draw
        // Draw
        window.clear();

            // Draw Enemy
        for (unsigned int i = 0; i < e.size(); i++) {
            window.draw(e[i].sprite);
        }

            // Draw Enemy Bullet
        for (unsigned int i = 0; i < e.size(); i++) {
            if (e[i].b.bExist == true) {
                window.draw(e[i].b.sprite);
            }
        }

            // Draw Ship
        window.draw(ship.sprite);

        window.display();
 

Entities
#pragma once
#include <SFML/Graphics.hpp>
#include <iostream>
#include <stdlib.h>
#include <time.h>  

extern short WIDTH, HEIGHT;

struct Bullet {
        sf::Sprite sprite;
        bool bExist = false;
        float speed = 5;
        bool amEnemy;

        Bullet(bool amAnEnemy) : amEnemy(amAnEnemy) {
                sprite.setTexture(tbullet);
                sprite.setScale(0.05f,0.05f);
                if (amEnemy == true) {
                        sprite.rotate(90);
                }
                else sprite.rotate(270);
        }

        void handler() {

                // Should I Exist? & Move By Gravity
                        switch (amEnemy)
                        {
                        case true:
                                if (sprite.getPosition().y > HEIGHT) {
                                        bExist = false;
                                        break;
                                }
                                if (bExist == true) {
                                        sprite.move(0, speed);
                                }
                                break;
                        case false:
                                if (sprite.getPosition().y < 0) {
                                        bExist = false;
                                        break;
                                }
                                if (bExist == true) {
                                        sprite.move(0, -speed);
                                }
                                break;
                        }
        }

       

};

struct Enemy {
        sf::Sprite sprite;
        Bullet b = (Bullet)true;
       

        Enemy(int nIter) {
                sprite.setTexture(tenemy);
                sprite.setScale(0.1f, 0.1f);
                sprite.setPosition(WIDTH * nIter / 5.0f, 0.0f);
        }

        void Shoot() {
                b.bExist = true;
                b.sprite.setPosition(sprite.getPosition());
        }

        void handler() {
                if(b.bExist == false){
                        int possNum = rand() % 500 + 1;
                        if (possNum == 1) {
                                Shoot();
                        }
                }
        }


}enemy = (Enemy)1;

struct Ship {
        sf::Sprite sprite;
        Bullet b = (Bullet)false;

        Ship() {
                sprite.setTexture(tship);
                sprite.setScale(0.5,0.5);
                sprite.setPosition(WIDTH / 2 - sprite.getGlobalBounds().width / 2, HEIGHT * 5 / 6);
                std::cout << "Ship Builded\n";
        }
};
 

Thanks in advance

14
Network / Peer not receiving packets
« on: September 23, 2020, 06:15:26 pm »
I've created a program based on UDP connection to chat with your friends just by knowing their Ip Connection. I'm testing on my local network, so the Ips are like 192.168.1.x, The program correctly sends the data but it is not received on the other end. Sorry for my bad English

#include <SFML/Network.hpp>
#include <thread>
#include <iostream>
#include <string>

unsigned short port = 2000;
sf::UdpSocket socket;
sf::IpAddress otherAddress;
sf::Packet r_packet;
sf::Packet s_packet;

void recive_data() {
    sf::IpAddress tempAddress = otherAddress;
    std::string data;
    while (true) {
        if (socket.receive(r_packet, tempAddress, port) != sf::Socket::Done) {
           
        }
        else {
            std::cout << "Packet received" << std::endl;
            //Print received data
            r_packet >> data;
            std::cout << "- " << data << std::endl;
           
        }
    }
}

int main()
{
    //Set non-blocking sockets
    socket.setBlocking(false);

    //Binding to port to receive data
    if (socket.bind(port) != sf::Socket::Done) {
        std::cout << "Error binding socket to port\n";
    }

    //Choose sender and receiver
    std::cout << "Insert the IP of who you want to talk with\n";
    std::cin >> otherAddress;
    //Receiving data thread
    std::thread r_data(recive_data);

    //Sending messages
    std::string message;
    while (true) {
        std::cin >> message;
        s_packet << message;
        if (socket.send(s_packet, otherAddress, port) != sf::Socket::Done) {
            std::cout << "There was a problem sending the message\n";
        }
    }

    system("pause");
    return 0;

}
[/quote]

15
Graphics / Access violation reading location
« on: October 22, 2019, 11:10:30 pm »
I'm trying to recreate space invaders but it gives me this error

main:
#include <SFML/Graphics.hpp>
#include <iostream>
#include "Collision.hpp"
#include "Enemy.h"
#include "Ship.h"
#include "Entity.h"
#include "Bullet.h"
#include <vector>

int width = 608, height = 1080;

std::vector<Enemy*> e;

int main()
{
        sf::RenderWindow window(sf::VideoMode(width, height), "SFML works!",sf::Style::Close);
       
        for (int i = 0; i < 5; i++) {
                Enemy * enemy = new Enemy(i);
                e.push_back(enemy);
        }

        for (int i = 0; i < e.size(); i++) {
               
        }

        Ship ship;
        Bullet bullet;

        while (window.isOpen())
        {
                sf::Event evnt;
                while (window.pollEvent(evnt))
                {
                        switch (evnt.type)
                        {
                        case sf::Event::Closed:
                                window.close();
                                break;
                        case sf::Event::KeyPressed:
                                switch (evnt.key.code)
                                {
                                case sf::Keyboard::A:
                                        ship.sprite.move(-ship.speed, 0);
                                        break;
                                case sf::Keyboard::D:
                                        ship.sprite.move(ship.speed, 0);
                                        break;
                                case sf::Keyboard::Space:
                                        if (bullet.Exist == false) {
                                                bullet.Shoot(ship);
                                        }
                                        break;
                                default:
                                        break;
                                }
                                break;
                        default:
                                break;
                        }
                }

                for (int i = 0; i < e.size(); i++) {
                        if (Collision::PixelPerfectTest(bullet.sprite, e[i]->sprite)) {
                                e[i]->alive = false;
                        }

                        if (e[i]->alive == false) {
                                e.erase(e.begin() + i);
                                delete e[i];
                        }
                }
               

               

               

                if (bullet.sprite.getPosition().y + bullet.texture.getSize().y * bullet.scale < 0) {
                        bullet.Exist = false;
                }
                ship.keepInMap();

                window.clear(sf::Color::Black);
                for (int i = 0; i < e.size(); i++) {
                        window.draw(e[i]->sprite);
                }
                if (bullet.Exist == true) {
                        bullet.sprite.move(0, -bullet.speed);
                        window.draw(bullet.sprite);
                }
                window.draw(ship.sprite);
                window.display();
        }

        return 0;
}
 

Enemy Class
#pragma once
#include "Entity.h"

extern int width, height;

class Enemy : public Entity {
public:

        float scale;
        bool alive;

        Enemy(int position) {
                alive = true;
                texture.loadFromFile("../Textures/enemy.png");
                sprite.setTexture(texture);
                sprite.setPosition(width / 5 * position, 0);
                scale = 0.1;
                sprite.setScale(scale, scale);
        }

        bool isDead() {
                if (alive == true) {
                        return false;
                }
                else return true;
        }


};

 

Entity Class:
#pragma once
#include <SFML/Graphics.hpp>

class Entity {
public:
        int speed = 15;
        enum Direction { LEFT = 0, RIGHT = 1 };
        sf::Texture texture;
        sf::Sprite sprite;
        Direction dir;

        Entity() {
               
        }
};
 

It generatoes the error when the bullet hits and delete the enemy object in the vector e

Pages: [1]