Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 17625

HOW TO MAKE SPAWN DELAY ON SFML

$
0
0
/*Hello, I am a newbie.
I have problem with my program,i make a program to spawn some object falling from top with random area, but my object spawn together,can you teach me how to make my object spawn with some delay. Thanks

My Code*/

#include <SFML/Graphics.hpp>

#include <stdlib.h>

#include <time.h>



using namespace sf;



int main()

{

    srand(time(0));

    RenderWindow window(VideoMode(1200,600),"PROJECT");



    int k = 0;

    float x[50],xb[50],y[50];



    for(int i = 0; i < 50; i++){

        x[i] = 0;

        y[i] = 0;

    }



    Texture buah1,latar;

    buah1.loadFromFile("pir …

Viewing all articles
Browse latest Browse all 17625

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>