Changeset 8007


Ignore:
Timestamp:
2016-07-07 22:47:17 (3 years ago)
Author:
tesatapa
Message:

toimiva respawn

Location:
2016/27/ohjaajat/VenienteFragore/VenienteFragore/VenienteFragore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • 2016/27/ohjaajat/VenienteFragore/VenienteFragore/VenienteFragore/LevelCreationMethods.cs

    r7999 r8007  
    172172            if (lives.Value > 0 && alive == 0) 
    173173            { 
     174                lives.Value--; 
    174175                Timer.SingleShot(2.0, Respawn); 
    175176                return; 
  • 2016/27/ohjaajat/VenienteFragore/VenienteFragore/VenienteFragore/VenienteFragore.cs

    r8004 r8007  
    7171        private void CreateGUI() 
    7272        { 
    73             Label liveMeter = new Label(lives); 
    74             liveMeter.Position = new Vector(Screen.Left + Screen.Width * 0.15, Screen.Top - Screen.Height * 0.1); 
     73            Label liveMeter = new Label(Screen.Width * 0.10, Screen.Height * 0.05); 
     74            liveMeter.Position = new Vector(Screen.Left + Screen.Width * 0.165, Screen.Top - Screen.Height * 0.1); 
     75           
     76             
     77            liveMeter.BindTo(lives); 
     78            liveMeter.HorizontalAlignment = HorizontalAlignment.Center; 
    7579            Add(liveMeter); 
     80 
     81            Label border = new Label(Screen.Width * 0.1, Screen.Height * 0.05); 
     82            border.Position = new Vector(Screen.Left + Screen.Width * 0.15, Screen.Top - Screen.Height * 0.1); 
     83            border.BorderColor = Color.Gold; 
     84            Add(border); 
     85 
     86            Label face = new Label(Screen.Width * 0.035, Screen.Width * 0.05); 
     87            face.Image = advenaImages[0]; 
     88            face.Position = new Vector(Screen.Left + Screen.Width * 0.12, Screen.Top - Screen.Height * 0.1); 
     89            Add(face); 
    7690        } 
    7791 
     
    300314 
    301315                destroyable.Destroy(); 
     316                destroyable.IsAlive = false; 
    302317                lives.Value++; 
    303318            } 
Note: See TracChangeset for help on using the changeset viewer.