-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBygginstruktioner MonoGame.txt
38 lines (24 loc) · 1.49 KB
/
Bygginstruktioner MonoGame.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
LINUX:
1. Gör ett linux monogame projekt
2. Importera klasser från projektet
3. Använd Pipeline.exe och importera .contenproj från xnabygget.
- Sätt Platform till Linux (och möjligtvis Compress till true)
- Spara mgcb-filen och importera den till Content-mappen i monogame-projektet
4. Högerklicka på .mgcb-filen, välj properties och välj "MonoGameContentReference" som Build Action
5. Importera contentfiler från xna-bygget. Sätt Build Action till "Content" och Copy to output till "Do not copy"
6. Kommentera ut visual basic och Speech referenser
NOTIS: Musiken fungerar inte när man bygger till Linux. Kan krascha om OpenAL inte är installerat
7. Importera OpenTK.dll.config och tao.sdl.dll.config och sätt Build Action toll "Content" och Copy if newer
8. Bygg genom att ändra till Release i Configuration Manager och tryck build.
9. Ta bort referenser till Visual Basic. Se till att Data-filerna och Levels-filerna har "Copy Always".
10. Lägg in följande funktion i Game1.cs, och gör ett anrop efter "apply changes":
private void CenterScreenWindow()
{
if (!graphics.IsFullScreen)
{
Window.Position = new Point((GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Width - (int)Resolution.X) / 2,
(GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Height - (int)Resolution.Y) / 2);
}
}
Detta ser till att spelet startar centrerat.
11. Uppdatera så projektet inte använder Game.Window.ClientBounds för höjd och bredd.