Changeset 3413 for 2012/26


Ignore:
Timestamp:
2012-06-29 12:37:29 (11 years ago)
Author:
mitokalu
Message:

Talletus.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 2012/26/MikaL/Zombie Survival/Zombie Survival/Zombie Survival/Zombie_Survival.cs

    r3397 r3413  
    8484        zombipaikat = new List<Vector>(); 
    8585 
    86         SetWindowSize(1024, 768, false); 
     86        SetWindowSize(1024, 768, true); 
    8787        if (DataStorage.Exists("scores.xml")) topLista = DataStorage.Load<ScoreList>(topLista, "scores.xml"); 
    8888 
     
    328328        p1_hpPalkki.Y = Screen.Top - 15; 
    329329        p1_hpPalkki.BarImage = LoadImage("fullbar"); 
     330        p1_hpPalkki.Image = LoadImage("emptybar"); 
    330331        Add(player1); 
    331332        Add(p1_hpPalkki); 
     
    477478    void ZombieHit(PhysicsObject zombi, PhysicsObject kohde) 
    478479    { 
    479         if (kohde.Tag == "living") p1_hp.Value--; 
     480        if (kohde.Tag == "living" && kohde == p1) p1_hp.Value--; 
     481        if (kohde.Tag == "living" && kohde == p2) p2_hp.Value--; 
    480482        if (p1_hp == 0) GameOver(); 
    481483        if (multiplayer == 1 && p2_hp == 0) GameOver(); 
     
    586588            p1_ammo.SetValue(280); 
    587589            rahaLaskuri.SetValue(rahaLaskuri.Value - 500); 
     590            if (pelaaja == p1) 
     591            { 
     592                p1_ammo.Value = 280; 
     593                p1_lipas.Value = 30; 
     594            } 
     595            if (pelaaja == p2) 
     596            { 
     597                p2_ammo.Value = 280; 
     598                p2_lipas.Value = 30; 
     599            } 
    588600        } 
    589601        else return; 
Note: See TracChangeset for help on using the changeset viewer.