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 - ZiyadCodes

Pages: [1]
1
General / Re: All sprites showing as white boxes.
« on: February 21, 2022, 06:22:51 pm »
Thank you so much. You helped me fix the problem ;D

THANKS     ~     THANKS     ~     THANKS     ~     THANKS     ~     THANKS     ~     THANKS     ~     THANKS

2
General / Re: All sprites showing as white boxes.
« on: February 21, 2022, 10:08:06 am »
I still don't understand the right way to fix the sprites appearing as white.
Here is my Bullet.cpp script:
(click to show/hide)


and here is my Bullet.h script:
(click to show/hide)

I even tried to do something like this in the update function:
(click to show/hide)

But still like it kind of worked but didn't at the same time. Sometimes the bullets would appear as a white box and sometimes they work with the texture and sometimes they work at the first second after they are shot and they turn to a white box, this is very confusing :'(

and my sprite still appears as a white square.
The only way I managed to get the sprite to work properly is when I put sprite.setTexture() in the update method.
Is there a correct way to fix this problem?

Pages: [1]
anything