- Timestamp:
- 2015-06-12 08:08:33 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
2015/24/ohjaajat/Dungeon/Dungeon/Dungeon/Dungeon.cs
r6043 r6045 113 113 KultuuriNaytto.TextColor = Color.HotPink; 114 114 KultuuriNaytto.Color = Color.Black; 115 KultuuriNaytto.Position = this.Position + new Vector(0, Dungeon.RUUDUN_KOKO * 0.5);115 KultuuriNaytto.Position = peli.Camera.WorldToScreen(this.Position + new Vector(0, Dungeon.RUUDUN_KOKO * 0.5)); 116 116 KultuuriNaytto.BindTo(Culture); 117 117 peli.Add(KultuuriNaytto); … … 239 239 240 240 // Paljonko peliruudukko on siirtynyt origosta. 241 Vector huoneSiirtyma = new Vector(- 300, 0);241 Vector huoneSiirtyma = new Vector(-200, 0); 242 242 243 243 public override void Begin() 244 244 { 245 //SetWindowSize(1024, 768); 246 245 247 ClearAll(); 246 248 Kontrollit(); … … 267 269 barbaariAjastin.Timeout += LuoBarbaareja; 268 270 barbaariAjastin.Interval = 3; 271 272 Level.Width = 1300; 273 Camera.ZoomToLevel(); 269 274 } 270 275 … … 291 296 Label rahat = new Label(); 292 297 rahat.BindTo(kultuuri); 293 rahat.Position = new Vector(Level.Right + Level.Width * 0.2, Level.Bottom + Level.Height * 0.1); 298 rahat.Position = new Vector(Screen.Right - 200, Screen.Bottom + 50); 299 //rahat.Position = new Vector(Level.Right + Level.Width * 0.2, Level.Bottom + Level.Height * 0.1); 294 300 rahat.TextColor = Color.White; 295 301 rahat.IntFormatString = "Käytettävää kulttuuria: {0:D3}"; … … 317 323 PushButton kuva = new PushButton(kultuuriKuvat[i]); 318 324 kuva.Size = new Vector(1, 1) * RUUDUN_KOKO; 319 kuva.Position = new Vector((Level.Right + Level.Width * 0.05), (Level.Top - Level.Height * 0.25 - (i * RUUDUN_KOKO))); 325 kuva.X = Window.ClientBounds.Width / 2 - 200; 326 kuva.Y = Window.ClientBounds.Height / 2 - (100 + RUUDUN_KOKO * i); 327 //kuva.Position = new Vector((Level.Right + Level.Width * 0.05), (Level.Top - Level.Height * 0.25 - (i * RUUDUN_KOKO))); 328 //kuva.Position = new Vector(Window.ClientBounds.Right, 0); 320 329 Add(kuva); 321 330 … … 339 348 kuva.Size = new Vector(1, 1) * RUUDUN_KOKO; 340 349 kuva.Color = Color.Gray; 341 kuva.Position = new Vector((Level.Right + Level.Width * 0.05), (Level.Top - Level.Height * 0.25 - ((kultuuriKuvat.Count() + i) * RUUDUN_KOKO))); 350 kuva.X = Window.ClientBounds.Width / 2 - 200; 351 kuva.Y = Window.ClientBounds.Height / 2 - (100 + RUUDUN_KOKO * (kultuuriKuvat.Count() + i)); 352 //kuva.Position = new Vector((Level.Right + Level.Width * 0.05), (Level.Top - Level.Height * 0.25 - ((kultuuriKuvat.Count() + i) * RUUDUN_KOKO))); 342 353 Add(kuva); 343 354 … … 435 446 if (upg == null) 436 447 continue; 437 448 438 449 kultuuri.Value += upg.Culture; 439 450 Label ilmoitus = new Label("+" + upg.Culture); … … 448 459 liikutusAjastin.Timeout += delegate 449 460 { 450 ilmoitus.Y += (kohdeY - ilmoitus.Y) *0.05;461 ilmoitus.Y += (kohdeY - ilmoitus.Y) * 0.05; 451 462 }; 452 463 liikutusAjastin.Start(); … … 843 854 } 844 855 856 /* 845 857 protected override void Paint(Canvas canvas) 846 858 { … … 857 869 base.Paint(canvas); 858 870 } 871 */ 859 872 860 873 #endregion
Note: See TracChangeset
for help on using the changeset viewer.