poffertjesporum
poffertjesporum
CC#
Created by Ale on 6/18/2024 in #help
open a path
I thought by "I want it to open a path when I tap on one of the buttons" you meant that, sorry. I would not know how else to do it, but with a quick google search I did find something that does open an .epub file for me through code. That said, I can't say if this is the right way to do something like this. And you also need something that can open the files, in my case: SumatraPDF https://stackoverflow.com/questions/32816364/programmatically-open-word-document-located-in-the-computer-in-c-sharp
10 replies
CC#
Created by eliza on 6/11/2024 in #help
Weird behaviour with SpriteBatch.Draw in MonoGame
Hi! I'm not a coder chad, but I'll try and help even though I may be totally wrong. Since the notes do show up. And they don't disappear it means that they are drawn to screen each frame. Given this I'd say the problem is in your update loop, where you set the position of the notes. Position = 100.0f + (float)Math.Sin(time) * 100; What I think this line does is: Set the y position of the note to the result of that equation but since the equation bases of off a sine wave, it doesn't really go anywhere. (Might be moving but sorta vibrating) And you use seconds so it would update each second, might take a while before you see some actual displacement. I'd say try a really basic thing like Position += 5; This adds 5 to the y value each update. And just as a little extra, I'd suggest putting Texture2D noteTexture = contentManager.Load<Texture2D>("NoteTexture"); In the constructor, you really only need to set a texture once. Setting it multiple times like this is a waste of resources.
3 replies