Changeset 8247 for 2016/30/TaavettiV


Ignore:
Timestamp:
2016-07-29 11:40:01 (3 years ago)
Author:
sieerinn
Message:
 
Location:
2016/30/TaavettiV
Files:
4 added
6 edited

Legend:

Unmodified
Added
Removed
  • 2016/30/TaavettiV/Street Alien Domination/Street Alien Domination/Street Alien DominationContent/Street Alien DominationContent.contentproj

    r8214 r8247  
    8181    </Compile> 
    8282  </ItemGroup> 
     83  <ItemGroup> 
     84    <Compile Include="kentta2.txt"> 
     85      <Name>kentta2</Name> 
     86      <Importer>TextFileImporter</Importer> 
     87      <Processor>TextFileContentProcessor</Processor> 
     88    </Compile> 
     89  </ItemGroup> 
     90  <ItemGroup> 
     91    <Compile Include="kentta3.txt"> 
     92      <Name>kentta3</Name> 
     93      <Importer>TextFileImporter</Importer> 
     94      <Processor>TextFileContentProcessor</Processor> 
     95    </Compile> 
     96  </ItemGroup> 
     97  <ItemGroup> 
     98    <Compile Include="kentta4.txt"> 
     99      <Name>kentta4</Name> 
     100      <Importer>TextFileImporter</Importer> 
     101      <Processor>TextFileContentProcessor</Processor> 
     102    </Compile> 
     103  </ItemGroup> 
     104  <ItemGroup> 
     105    <Compile Include="knight.png"> 
     106      <Name>knight</Name> 
     107      <Importer>TextureImporter</Importer> 
     108      <Processor>TextureProcessor</Processor> 
     109    </Compile> 
     110  </ItemGroup> 
    83111  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 
    84112  <!--  To modify your build process, add your task inside one of the targets below and uncomment it.  
  • 2016/30/TaavettiV/Street Alien Domination/Street Alien Domination/Street Alien DominationContent/kentta1.txt

    r8214 r8247  
    1111#.............................##############.....................# 
    1212#.............................################....................#.. 
    13 #.........N........p..............................................###..... 
     13#.........N........p......................AAAAAAAAAAAAAAAA.........##..... 
    1414#################################################################..#### 
    1515#################################################################........# 
  • 2016/30/TaavettiV/Street Alien Domination/Street Alien Domination/Street Alien DominationContent/kentta2.txt

    r8219 r8247  
    88#............................................................................................. ......AAAAAAAA................A..........# 
    99#...............................................................................#.p..#....#### ####..################.......######......# 
    10 #.........pppppppppppppppppppppppppppppppppppppppppppppppAAAAAAAAAA......... .....p............###....######............................# 
     10#.........ppppppppppppppppppppppppppppppppppppAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA......... .....p............###....######...................# 
    1111##########################################################################pppppppppppppppppppppppppppppppppppppppppppppppAAAAAAApppppppp# 
    1212######################################################################################################################################### 
  • 2016/30/TaavettiV/Street Alien Domination/Street Alien Domination/Street_Alien_Domination/Street_Alien_Domination.cs

    r8219 r8247  
    2323    Image tähtäinkuva = LoadImage("tähtäin"); 
    2424 
     25    Image knightkuva = LoadImage("knight"); 
     26 
    2527    SoundEffect maaliAani = LoadSoundEffect("maali"); 
    2628 
     
    5254    void LuoKentta() 
    5355    { 
    54         TileMap kentta = TileMap.FromLevelAsset("kentta2"); 
     56        TileMap kentta = TileMap.FromLevelAsset("kentta4"); 
    5557        kentta.SetTileMethod('#', LisaaTaso); 
    5658        kentta.SetTileMethod('*', LisaaTahti); 
     
    5860        kentta.SetTileMethod('p', LisaaOlio); 
    5961        kentta.SetTileMethod('A', LisaaOlio2); 
     62        kentta.SetTileMethod('m', LisaaOlio3); 
    6063        kentta.Execute(RUUDUN_KOKO, RUUDUN_KOKO); 
    6164        Level.CreateBorders(); 
     
    123126        aikaLaskuri.Start(); 
    124127    } 
    125      
    126     
     128    void LisaaOlio3(Vector paikka, double leveys, double korkeus) 
     129    { 
     130        PlatformCharacter m = new PlatformCharacter(leveys * 0.9, korkeus * 0.9); 
     131        m.Position = paikka; 
     132        m.Image = knightkuva; 
     133        Add(m); 
     134        m.Tag = "m"; 
     135 
     136        PlatformWandererBrain tasoAivot = new PlatformWandererBrain(); 
     137        tasoAivot.Speed = 100; 
     138 
     139        tasoAivot.FallsOffPlatforms = true; 
     140        tasoAivot.TriesToJump = true; 
     141 
     142        m.Brain = tasoAivot; 
     143 
     144    } 
     145 
     146 
    127147 
    128148    void Tormaap(PhysicsObject pelaaja1, PhysicsObject p) 
     
    143163        pelaaja1.Image = pelaajanKuva; 
    144164        AddCollisionHandler(pelaaja1, "tahti", TormaaTahteen); 
    145         AddCollisionHandler(pelaaja1, "p", Tormaap); 
     165 
     166        AddCollisionHandler(pelaaja1, "m", Tormaap); 
    146167        Add(pelaaja1); 
    147168 
Note: See TracChangeset for help on using the changeset viewer.