- Timestamp:
- 2015-06-15 14:05:45 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
2015/24/ohjaajat/Dungeon/Dungeon/Dungeon/MainMenu.cs
r6092 r6098 78 78 void LuoOsat() 79 79 { 80 double w = peli.Camera.ScreenToWorld(new Vector(Game.Screen.Width, 0)).X; 81 double h = peli.Camera.ScreenToWorld(new Vector(0, Game.Screen.Height)).Y; 82 double left = peli.Camera.ScreenToWorld(new Vector(-Game.Window.Width / 2.0, 0)).X; 83 double right = peli.Camera.ScreenToWorld(new Vector(Game.Window.Width / 2.0, 0)).X; 84 double top = peli.Camera.ScreenToWorld(new Vector(0, Game.Window.Height / 2.0)).Y; 85 double bottom = peli.Camera.ScreenToWorld(new Vector(0, -Game.Window.Height / 2.0)).Y; 86 80 87 const int toistoja = 3; 81 88 pala = new GameObject(30, 200 * toistoja); 82 pala.Position = peli.Camera.ScreenToWorld(new Vector(-200, Game.Screen.Top));89 pala.Position = peli.Camera.ScreenToWorld(new Vector(-200, 0)) + new Vector(0, top); 83 90 pala.Image = palaKuva; 84 91 pala.TextureWrapSize = new Vector(1, toistoja); … … 90 97 peli.Add(ratas, 2); 91 98 92 pala.Bottom = Game.Screen.Top; // Pala putoaa ikkunan yläreunasta.99 pala.Bottom = top; // Pala putoaa ikkunan yläreunasta. 93 100 94 101 // Aukon pohjavalo. 95 102 pohjaAukko = new GameObject(200, 100); 96 103 pohjaAukko.Image = aukkoPohjaKuva; 97 pohjaAukko.Left = peli.Camera.ScreenToWorld(new Vector(Game.Screen.Left, 0)).X;98 pohjaAukko.Bottom = peli.Camera.ScreenToWorld(new Vector(0, Game.Screen.Bottom)).Y;104 pohjaAukko.Left = left; 105 pohjaAukko.Bottom = bottom; 99 106 peli.Add(pohjaAukko, -1); 100 107 … … 105 112 peli.Add(aukkoValo, 1); 106 113 107 double w = peli.Camera.ScreenToWorld(new Vector(Game.Screen.Width, 0)).X;108 double h = peli.Camera.ScreenToWorld(new Vector(0, Game.Screen.Height)).Y;109 114 var pimeys = new GameObject(w, h); 110 115 pimeys.Image = pimeysKuva; … … 113 118 var otsikko = new GameObject(400, 100); 114 119 otsikko.Image = otsikkoKuva; 115 //otsikko.Right = peli.Camera.ScreenToWorld(new Vector(Game.Screen.Right, 0)).X ; //Tämä heitti miulla otsikon puoliksi näkymättömiin. 116 otsikko.Left = peli.Camera.ScreenToWorld(new Vector(pala.Right, 0)).X; 117 otsikko.Top = peli.Camera.ScreenToWorld(new Vector(0, Game.Screen.Top - ratas.Height)).Y; 120 otsikko.Left = pala.Right; 121 otsikko.Top = top - ratas.Height; 118 122 peli.Add(otsikko, 3); 119 123 }
Note: See TracChangeset
for help on using the changeset viewer.