Changeset 2397 for 2011/26


Ignore:
Timestamp:
2011-07-01 10:33:14 (12 years ago)
Author:
teeevasa
Message:

revised the first level so that it works with the background, as well as some misc updates

Location:
2011/26/JaakkoL
Files:
8 edited

Legend:

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

    r2361 r2397  
    2525        brain.Speed = speed; 
    2626        brain.FollowAlways = true; 
    27         //brain.StopWhenTargetClose = true; 
    2827        brain.TargetCloseDistance = 20; 
    2928        } 
    30  
    31     private void closeToTarget(FollowerBrain senderBrain, EventArgs e) 
    32     { 
    33         senderBrain.Speed += 500; 
    34     } 
    35  
    36     public override void deathOccurred() 
    37     { 
    38         /*Explosion explosion = new Explosion(1000); 
    39         explosion.Position = this.Position; 
    40         Add(explosion);*/ 
    41         this.Destroy(); 
    42     } 
    4329} 
  • 2011/26/JaakkoL/Rogue Agent 2372/Rogue Agent 2372/Rogue Agent 2372/GenCharacter.cs

    r2361 r2397  
    4444 
    4545    // A method for handling death, i.e., removing the player, saving scores or whatever 
    46     public virtual void deathOccurred() 
     46    public void deathOccurred() 
    4747    { 
    48         /*Explosion explosion = new Explosion(100); 
    49         explosion.Position = this.Position; 
    50         Add(explosion);*/ 
    5148        this.Destroy(); 
    5249    } 
  • 2011/26/JaakkoL/Rogue Agent 2372/Rogue Agent 2372/Rogue Agent 2372/InsideReactor.txt

    r2392 r2397  
    1 ================================================= 
    2 |                                               | 
    3 |                                               | 
    4 |                a     x     a                  | 
    5 | a  |      =========================      |  a | 
    6 |====|=          ==============           =|====| 
    7 |aa  |                ====                 |  aa| 
    8 |    |  ==                             ==  |    | 
    9 |    |  ==    a                    a   ==  |    | 
    10 |             ====              ====            | 
    11 |                ===          ===               | 
    12 |                                               | 
    13 |====                   a                   ====| 
    14 |                      ====                     | 
    15 |                                               | 
    16 |                 a           a                 | 
    17 |          =========          =========         | 
    18 |                                               | 
    19 | P                    a          a           a | 
    20 |===============================================| 
     1====================== 
     2|                    | 
     3|    a     a         | 
     4|==============      | 
     5|                 == | 
     6|==  a               | 
     7|  =====      a      | 
     8|          ==== =    | 
     9|                    | 
     10|                    | 
     11|    a         a     | 
     12|  ========   ====== | 
     13|                    | 
     14| P      a       a   | 
     15====================== 
  • 2011/26/JaakkoL/Rogue Agent 2372/Rogue Agent 2372/Rogue Agent 2372/Peli.cs

    r2371 r2397  
    1313    const int SCREEN_HEIGHT = 50; 
    1414    Player player; 
    15     Image background1 = LoadImage("Images/reactorBG"); 
     15    Image background1 = LoadImage("Images/reactorInsideBG"); 
    1616 
    1717    public override void Begin() 
     
    8383        Camera.ZoomFactor = 1.0; 
    8484        Camera.StayInLevel = true; 
     85 
     86        //AddCollisionHandler(MeleeAlien alien, handleAlienCollision); 
     87    } 
     88 
     89    void handleAlienCollision(MeleeAlien alien, Player player) 
     90    { 
     91        player.reduceHitPointsBy(10); 
    8592    } 
    8693 
    8794    void createLevel() 
    8895    { 
    89         TileMap levelSpec = TileMap.FromFile("ReactorEntrance.txt"); 
     96        TileMap levelSpec = TileMap.FromFile("InsideReactor.txt"); 
    9097        levelSpec['='] = createVerticalBlock; 
    9198        levelSpec['|'] = createHorizontalBlock; 
     
    105112    MeleeAlien addMeleeAlien() 
    106113    { 
    107         MeleeAlien meleeAlien = new MeleeAlien(45, 80, Shape.Rectangle, 100, player); 
     114        MeleeAlien meleeAlien = new MeleeAlien(45, 80, Shape.Rectangle, 50, player); 
    108115        return meleeAlien; 
    109116    } 
  • 2011/26/JaakkoL/Rogue Agent 2372/Rogue Agent 2372/Rogue Agent 2372/Player.cs

    r2371 r2397  
    99{ 
    1010    const int speed = 200; 
    11     const int jumpSpeed = 200; 
     11    const int jumpSpeed = 600; 
    1212    const int mass = 10; 
    1313    Image portrait = Game.LoadImage("Images/character"); 
     14    Image reversedPortrait = Game.LoadImage("Images/characterreverse"); 
    1415    SoundEffect walking = Game.LoadSoundEffect("Sounds/walkingsound"); 
    1516 
     
    4647 
    4748        this.changeWeapon(rifle.name()); 
    48         // Collision handlers for enemies 
    49         //AddCollisionHandler(); 
    5049        } 
    5150 
     
    9291        { 
    9392            MeleeAlien alien = (MeleeAlien)target; 
    94             //alien.reduceHitPointsBy(this.Weapon.firePower()); 
    95             alien.reduceHitPointsBy(10); 
     93 
     94            int damage = 0; 
     95 
     96            if (currentWeapon == pistol.name()) 
     97            { 
     98                damage = pistol.firePower(); 
     99            } 
     100            else if (currentWeapon == rifle.name()) 
     101            { 
     102                damage = rifle.firePower(); 
     103            } 
     104 
     105            alien.reduceHitPointsBy(damage); 
    96106        } 
    97107    } 
     
    106116        walker.Start(); 
    107117        this.Walk(speed); 
    108         //this.Image = Image.Mirror(portrait); // Doesn't work at all! 
     118        this.Image = portrait; 
    109119    } 
    110120 
     
    113123        walker.Start(); 
    114124        this.Walk(-speed); 
    115         this.Image = Image.Mirror(portrait); 
     125        this.Image = reversedPortrait; 
    116126    } 
    117127 
  • 2011/26/JaakkoL/Rogue Agent 2372/Rogue Agent 2372/Rogue Agent 2372/Rogue Agent 2372.csproj

    r2355 r2397  
    122122    <Content Include="Game.ico" /> 
    123123    <Content Include="GameThumbnail.png" /> 
     124    <Content Include="InsideReactor.txt"> 
     125      <CopyToOutputDirectory>Always</CopyToOutputDirectory> 
     126    </Content> 
    124127    <Content Include="ReactorEntrance.txt"> 
    125128      <CopyToOutputDirectory>Always</CopyToOutputDirectory> 
  • 2011/26/JaakkoL/Rogue Agent 2372/Rogue Agent 2372/Rogue Agent 2372Content/Rogue Agent 2372Content.contentproj

    r2360 r2397  
    127127    </Compile> 
    128128  </ItemGroup> 
     129  <ItemGroup> 
     130    <Compile Include="Images\characterreverse.png"> 
     131      <Name>characterreverse</Name> 
     132      <Importer>TextureImporter</Importer> 
     133      <Processor>TextureProcessor</Processor> 
     134    </Compile> 
     135  </ItemGroup> 
     136  <ItemGroup> 
     137    <Compile Include="Images\basealienreverse.png"> 
     138      <Name>basealienreverse</Name> 
     139      <Importer>TextureImporter</Importer> 
     140      <Processor>TextureProcessor</Processor> 
     141    </Compile> 
     142  </ItemGroup> 
     143  <ItemGroup> 
     144    <Compile Include="Images\reactorInsideBG.png"> 
     145      <Name>reactorInsideBG</Name> 
     146      <Importer>TextureImporter</Importer> 
     147      <Processor>TextureProcessor</Processor> 
     148    </Compile> 
     149  </ItemGroup> 
    129150  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 
    130151  <!--  To modify your build process, add your task inside one of the targets below and uncomment it.  
  • 2011/26/JaakkoL/todo.txt

    r2371 r2397  
    11Bugilista: 
    22Kävelyääni tulee vain seisoessa paikallaan 
    3 Sprite kääntyy vain vasemmalle 
     3Viholliset leijuvat ilmassa 
     4Aseiden vaihtaminen 
    45 
    56Featurelista: 
    67HP:en visuaalinen dokumentointi 
    7 Ensimmäinen oikea kenttä (+ ovi) 
    8 Aseiden vaihtaminen 
    98Vihollisten hyökkäykset 
     9Voittaminen 
Note: See TracChangeset for help on using the changeset viewer.