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

Pages: [1]
1
Graphics / Noob: pass &RenderWindow to constructor. Set as Public v
« on: March 26, 2011, 09:51:32 am »
there are several possibilities, depends on what you do with your classes

yes you can pass a reference in the constructor (and store it as member)

OR

you can inherit Game from RenderWindow, so every game instance has game properties and IS a renderwindow, so you can draw directly

OR

if you have many instance of Game for only one window, you can use a static member

2
Graphics / Error displaying, pointer to Sprite
« on: March 24, 2011, 10:54:27 pm »
show your new code if help is needed.


just comments :

Code: [Select]
int main()
{
   std::cout<<"Sterowanie strzałkami";
   //App app;
   App *pPoint= new App;
   pPoint->Run();
   //pPoint-> ~App();
   return 0;
}


 :shock:

Code: [Select]
int main()
{
   std::cout<<"Sterowanie strzałkami";
   App app;
   app.Run();
   return 0;
}


or

Code: [Select]
int main()
{
   App *app=new App;
   app->Run();
   delete app;
   return 0;
}


are better

and you can do simple : inherit the class App from RenderWindow and the class Ball from Sprite

3
General / Player pointing at mouse?
« on: March 23, 2011, 02:48:23 pm »
try atan2 ?

Pages: [1]
anything