Changeset 2412 for 2011/26


Ignore:
Timestamp:
2011-07-01 12:11:21 (8 years ago)
Author:
teeevasa
Message:

some final changes, such as removing unnecessary files etc.

Location:
2011/26/JaakkoL
Files:
2 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • 2011/26/JaakkoL/Rogue Agent 2372/Rogue Agent 2372/Rogue Agent 2372/Peli.cs

    r2402 r2412  
    1414    Player player; 
    1515    Image background1 = LoadImage("Images/reactorInsideBG"); 
     16 
     17    // The sound effect intended for walking sounds close enough to ferocious aliens ripping your guts out 
     18    SoundEffect alienAttack = LoadSoundEffect("Sounds/walkingSound"); 
    1619 
    1720    public override void Begin() 
     
    7679        MediaPlayer.Stop(); 
    7780        // Starts playing the background music, which is set to repeat 
    78         MediaPlayer.Play("Sounds/Stage1Music"); 
     81        MediaPlayer.Play("Sounds/Stage2Music"); 
    7982        MediaPlayer.Volume = 0.75; 
    8083        MediaPlayer.IsRepeating = true; 
     
    97100    } 
    98101 
    99     void handleAlienCollision(MeleeAlien alien, Player player) 
     102    void handleAlienCollision(PhysicsObject alien, PhysicsObject target) 
    100103    { 
    101         player.reduceHitPointsBy(10); 
     104        if (target.Tag == "Player") 
     105        { 
     106            alienAttack.Play(); 
     107            player.reduceHitPointsBy(10); 
     108        } 
    102109    } 
    103110 
     
    124131    { 
    125132        MeleeAlien meleeAlien = new MeleeAlien(45, 80, Shape.Rectangle, 50, player); 
     133        AddCollisionHandler(meleeAlien, handleAlienCollision); 
    126134        return meleeAlien; 
    127135    } 
  • 2011/26/JaakkoL/Rogue Agent 2372/Rogue Agent 2372/Rogue Agent 2372/Player.cs

    r2402 r2412  
    2424        : base(width, height, shape, HP) 
    2525        { 
    26         hitPoints = 100; 
     26        hitPoints = HP; 
    2727        AddedToGame += addControls; 
    2828        this.Image = portrait; 
  • 2011/26/JaakkoL/todo.txt

    r2402 r2412  
    66Kävelyääni 
    77HP:en visuaalinen dokumentointi 
    8 Vihollisten hyökkäykset 
Note: See TracChangeset for help on using the changeset viewer.