Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
Offline Cr3dos  
#1 Posted : Saturday, February 9, 2013 4:16:49 PM(UTC)
Cr3dos

Joined: 8/22/2011(UTC)
Posts: 61
Location: Switzerland

Was thanked: 4 time(s) in 4 post(s)
Hi

Unfortunately every sample has only one Screen and I have not really an idea how to do a game with several screens.

I have the baseClass GameScreen, does this class need to inherit Renderable or another class?
Then how does the screen show the sprites which he has?

I hope you can help me.

kind regards,
Dominik

Edited by user Saturday, February 9, 2013 9:30:42 PM(UTC)  | Reason: Not specified

Wanna join the discussion?! Login to your forum accountregister a new account. Or Connect via Facebook Twitter Google

Offline Cr3dos  
#2 Posted : Saturday, February 9, 2013 9:25:04 PM(UTC)
Cr3dos

Joined: 8/22/2011(UTC)
Posts: 61
Location: Switzerland

Was thanked: 4 time(s) in 4 post(s)
I manage to implement this. I forgot to add the sprites to the renderer.
But how do I remove the input which I added like this:

Quote:
Input.Add(DeltaEngine.Input.Devices.MouseButton.Left, DeltaEngine.Input.State.Pressed, mousePressed);


Because the method gets still called on the next screen

Edited by user Saturday, February 9, 2013 9:31:43 PM(UTC)  | Reason: Not specified

Offline Benjamin  
#3 Posted : Tuesday, February 12, 2013 11:46:48 PM(UTC)
Benjamin

Medals: Admin

Joined: 8/20/2011(UTC)
Posts: 1,421
Location: Hannover

Thanks: 18 times
Was thanked: 97 time(s) in 92 post(s)
Currently there is no method to remove all commands at once, but you can simply add it (1 line of code: commands.Clear())

Another way is to use Add(Command) and then later use Remove(Command) to get rid of it again (later this will be done automatically for Scenes).

And you can also build a trigger from triggers, which you can also freely add and remove from commands to deactivate triggers while keeping the commands alive.
Rss Feed  Atom Feed
Users browsing this topic
OceanSpiders 2.0
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2022, Yet Another Forum.NET
This page was generated in 0.438 seconds.