Changeset 6922 for 2015


Ignore:
Timestamp:
2015-07-22 13:39:24 (8 years ago)
Author:
arjuhoyl
Message:
 
Location:
2015/30/ArttuH/TasoHyppely
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • 2015/30/ArttuH/TasoHyppely/TasoHyppely/TasoHyppely/TasoHyppely.cs

    r6912 r6922  
    1212    const double hyppyNopeus = 750; 
    1313    const int RUUDUN_KOKO = 40; 
     14    double ammusnopeus2 = 1000; 
    1415 
    1516    PlatformCharacter pelaaja1; 
     
    3334        Gravity = new Vector(0, -1500); 
    3435        Paavalikko(); 
    35         //LuoKentta(); 
    36         //LisaaOhjaimet(); 
    37  
    38         //Camera.Follow(pelaaja1,pelaaja2); 
    39         //Camera.ZoomFactor = 1.2; 
    40         //Camera.StayInLevel = true; 
    4136    } 
    4237 
     
    4944        kentta.SetTileMethod('X', Piikki); 
    5045        kentta.SetTileMethod('A', Ammuspaketti); 
     46        kentta.SetTileMethod('P', LisääPahis); 
    5147        if (pelaajienMaara == 2) 
    5248        { 
     
    245241            ammus.Size *= 0.8; 
    246242            ammus.Image = luoti; 
     243            luotilaskuri2.Value--; 
     244            ammus.Velocity = pelaaja2.Weapon.Angle.GetVector().Normalize() * ammusnopeus2; 
    247245            ControllerTwo.Vibrate(100.16, 100.16, 0.16, 0.16, 0.1); 
    248             ammus.MaximumLifetime = TimeSpan.FromSeconds(0.6); 
     246            ammus.MaximumLifetime = TimeSpan.FromSeconds(1.0); 
    249247        } 
    250248    } 
     
    303301        luotilaskuri2.Value = 100; 
    304302    } 
    305       
     303 
     304    void LisääPahis(Vector paikka, double leveys, double korkeus) 
     305       { 
     306        PlatformCharacter pahis = new PlatformCharacter(leveys, korkeus); 
     307        pahis.Position = paikka; 
     308       } 
     309 
    306310} 
Note: See TracChangeset for help on using the changeset viewer.