Ignore:
Timestamp:
2017-06-16 11:50:56 (2 years ago)
Author:
npo17_23
Message:

Vihut saatu liikkeelle kaikki valmista!

Location:
2017/24/LeeviE/Peli/Jump/Jump
Files:
1 added
3 deleted
14 edited

Legend:

Unmodified
Added
Removed
  • 2017/24/LeeviE/Peli/Jump/Jump/Jump/Jump.cs

    r8761 r8785  
    2929    { 
    3030        SeuraavaKentta(); 
    31  
    32        
     31         
     32 
     33 
    3334        //Luolaatta(0.0, -100.0); 
    3435        //Luolaatta(100.0, -200.0); 
     
    3839 
    3940 
    40  
    41          
    42     } 
     41        //PhysicsObject randomOlio = new PhysicsObject(20.0, 20.0); 
     42        //Add(randomOlio); 
     43        //RandomMoverBrain vihollinen = new RandomMoverBrain(200); 
     44        //randomOlio.Brain = vihollinen; 
     45        //vihollinen.ChangeMovementSeconds = 3; 
     46        //vihollinen.WanderRadius = 200; 
     47        //vihollinen.WanderPosition = new Vector(200, 300); 
     48 
     49 
     50 
     51       
     52         
     53 
     54    } 
     55 
    4356    void LuoMaali(Vector paikka, double leveys, double korkeus) 
    4457    { 
     
    5366   void LuoVihollinen(Vector paikka, double leveys, double korkeus) 
    5467    { 
    55         PhysicsObject vihollinen = new PhysicsObject(84.0, 124.0); 
     68        PhysicsObject vihollinen = new PhysicsObject(84.0, 120.0); 
    5669        vihollinen.Image = vihu1; 
     70         
    5771        vihollinen.CanRotate = false; 
    5872        SmoothTextures = false; 
    5973        vihollinen.Position = paikka; 
     74        
    6075        vihollinen.Tag = "vihollinen"; 
     76        paikka.Y = paikka.Y + 10; 
     77        List<Vector> polku = new List<Vector>(); 
     78        polku.Add((paikka + new Vector(-50, 0))); 
     79        polku.Add(paikka + new Vector(100, 0)); 
     80      //  polku.Add(paikka + new Vector(250, 0)); 
     81        PathFollowerBrain polkuAivot = new PathFollowerBrain(); 
     82        polkuAivot.Path = polku; 
     83        polkuAivot.Loop = true; 
     84        polkuAivot.Speed = 100; 
     85        polkuAivot.TurnWhileMoving = false; 
     86         
     87        vihollinen.IgnoresGravity = true; 
     88 
     89        vihollinen.Brain = polkuAivot; 
    6190        Add(vihollinen); 
    6291 
    6392    } 
    64  
    65    
     93    
     94 
    6695    void LuoPelaaja(Vector paikka, double leveys, double korkeus) 
    6796    { 
     
    73102        AddCollisionHandler(pelaaja, "vihollinen", TormaaViholliseen); 
    74103        AddCollisionHandler(pelaaja, "maali", TormasiMaaliin); 
     104       // pelaaja.IgnoresGravity = false; 
    75105        //pelaaja.Weapon = new AssaultRifle(30, 10); 
    76106        //pelaaja.Weapon.Ammo.Value = 10000; 
     
    90120        if (kenttaNro == 1) LuoKentta("kentta1"); 
    91121        else if (kenttaNro == 2) LuoKentta("kentta2"); 
    92         else if (kenttaNro == 2) Exit(); 
     122        else if (kenttaNro > 2) Exit(); 
    93123 
    94124        GameObject taustakuva = new GameObject(9300.0, 2000.0); 
     
    102132 
    103133 
    104  
     134         
    105135        Asetaohjaimet(); 
    106136 
     
    117147    } 
    118148    
    119  
    120149    void TormaaTahteen(PhysicsObject pelaaja, PhysicsObject tahti) 
    121150    { 
  • 2017/24/LeeviE/Peli/Jump/Jump/Jump/Jump.csproj.Debug.cachefile

    r8740 r8785  
    22Content\Tyyppi peliin cropattu.xnb 
    33Content\Plat.xnb 
    4 Content\kentta1.xnb 
    54Content\Laatta.xnb 
    65Content\Laatta2.xnb 
     
    1110Content\tÀÀthi.xnb 
    1211Content\Vihu.xnb 
     12Content\kentta1.xnb 
    1313Content\kentta2.xnb 
     14Content\kentta2.txt 
  • 2017/24/LeeviE/Peli/Jump/Jump/Jump/obj/x86/Debug/ContentPipeline-{2750B644-1BA7-4D9C-B766-2A8DD7E77FC1}.xml

    r8761 r8785  
    2828      <Output>C:\MyTemp\LeeviE\Peli\Jump\Jump\Jump\bin\x86\Debug\Content\Plat.xnb</Output> 
    2929      <Time>2017-06-14T12:47:07.0101534+03:00</Time> 
    30     </Item> 
    31     <Item> 
    32       <Source>kentta1.txt</Source> 
    33       <Name>kentta1</Name> 
    34       <Importer>TextFileImporter</Importer> 
    35       <Processor>TextFileContentProcessor</Processor> 
    36       <Options>None</Options> 
    37       <Output>C:\MyTemp\LeeviE\Peli\Jump\Jump\Jump\bin\x86\Debug\Content\kentta1.xnb</Output> 
    38       <Time>2017-06-16T09:53:11.0796052+03:00</Time> 
    3930    </Item> 
    4031    <Item> 
     
    111102    </Item> 
    112103    <Item> 
     104      <Source>kentta1.txt</Source> 
     105      <Name>kentta1</Name> 
     106      <Importer>TextFileImporter</Importer> 
     107      <Processor>TextFileContentProcessor</Processor> 
     108      <Options>None</Options> 
     109      <Output>C:\MyTemp\LeeviE\Peli\Jump\Jump\Jump\bin\x86\Debug\Content\kentta1.xnb</Output> 
     110      <Time>2017-06-16T11:47:55.3655253+03:00</Time> 
     111    </Item> 
     112    <Item> 
    113113      <Source>kentta2.txt</Source> 
    114114      <Name>kentta2</Name> 
     
    117117      <Options>None</Options> 
    118118      <Output>C:\MyTemp\LeeviE\Peli\Jump\Jump\Jump\bin\x86\Debug\Content\kentta2.xnb</Output> 
    119       <Time>2017-06-15T14:19:17.6352347+03:00</Time> 
     119      <Time>2017-06-16T11:47:55.3342747+03:00</Time> 
    120120    </Item> 
    121121    <BuildSuccessful>true</BuildSuccessful> 
  • 2017/24/LeeviE/Peli/Jump/Jump/Jump/obj/x86/Debug/Jump.csproj.FileListAbsolute.txt

    r8740 r8785  
    44C:\MyTemp\LeeviE\Peli\Jump\Jump\Jump\bin\x86\Debug\Jypeli.dll 
    55C:\MyTemp\LeeviE\Peli\Jump\Jump\Jump\bin\x86\Debug\Jypeli.xml 
    6 C:\MyTemp\LeeviE\Peli\Jump\Jump\Jump\obj\x86\Debug\Jump.csprojResolveAssemblyReference.cache 
    76C:\MyTemp\LeeviE\Peli\Jump\Jump\Jump\obj\x86\Debug\Microsoft.Xna.Framework.RuntimeProfile.txt 
    87C:\MyTemp\LeeviE\Peli\Jump\Jump\Jump\obj\x86\Debug\Jump.exe 
     
    2019C:\MyTemp\LeeviE\Peli\Jump\Jump\Jump\bin\x86\Debug\Content\Vihu.xnb 
    2120C:\MyTemp\LeeviE\Peli\Jump\Jump\Jump\bin\x86\Debug\Content\kentta2.xnb 
     21C:\MyTemp\LeeviE\Peli\Jump\Jump\Jump\bin\x86\Debug\Content\kentta2.txt 
  • 2017/24/LeeviE/Peli/Jump/Jump/Jump/obj/x86/Debug/cachefile-{2750B644-1BA7-4D9C-B766-2A8DD7E77FC1}-targetpath.txt

    r8740 r8785  
    22Content\Tyyppi peliin cropattu.xnb 
    33Content\Plat.xnb 
    4 Content\kentta1.xnb 
    54Content\Laatta.xnb 
    65Content\Laatta2.xnb 
     
    1110Content\tÀÀthi.xnb 
    1211Content\Vihu.xnb 
     12Content\kentta1.xnb 
    1313Content\kentta2.xnb 
     14Content\kentta2.txt 
  • 2017/24/LeeviE/Peli/Jump/Jump/JumpContent/JumpContent.contentproj

    r8740 r8785  
    134134      <Importer>TextFileImporter</Importer> 
    135135      <Processor>TextFileContentProcessor</Processor> 
     136      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> 
    136137    </Compile> 
    137138  </ItemGroup> 
  • 2017/24/LeeviE/Peli/Jump/Jump/JumpContent/kentta1.txt

    r8761 r8785  
    22 
    33 
    4 #######################################################################################################################################.....#M......# 
    5 #............................................................................#...............................................................#......# 
    6 #.........................................v..................................#.................................................................#....# 
    7 #...............................................................v....#.......#...............................................*...............#......# 
    8 #..............................##..#..............................*..#.......#..............................................###...........###.......# 
    9 #.............................................*.....#..##....#..###..#..#....#.................v....###.................##............##............# 
    10 #.......................#..###........#.....######.........#.........#.......#.............#..####.......#.....v.*..##............##................# 
     4##################################################################################################################################################### 
     5#............................................................................#...............................................................#.M....# 
     6#............................................................................#.................................................................#....# 
     7#....................................................................#.......#...............................................*.............v.#......# 
     8#..............................##..#.............................v*..#.......#.......................v......................###...........###.......# 
     9#...........................v................v*.v...#..##....#..###..#..#....#.................v....###.................##............##............# 
     10#...................v...#..###........#.....######.........#.........#.......#.............#..####.......#.....v.*..##............##................# 
    1111#..............v...###................#...#..........................#.......#......#..##..............*.#....####..................................# 
    1212#.............###.....................#.#............................##..........#.......................#..#.......................................# 
  • 2017/24/LeeviE/Peli/Jump/Jump/JumpContent/kentta2.txt

    r8740 r8785  
    11################################################################################################# 
    2 #................................................#...............................v..............# 
     2#................................................#..............................................# 
    33#................................................#..............#######################..#......# 
    4 #.............................................#..#..............#.....................#....#....# 
    5 #....................v...v....................#..#........v.....#......v..............#......#..# 
    6 #................############..##.......#######..################...############......#.........# 
    7 #..........#.#..........#####.....####........#.....................#............######.....#...# 
    8 #.!........#.......v..*.#####v......*#........#....v............v...#..*....v...................# 
    9 ################################################################################################# 
     4#.............................................#..#.M..v...v.....#.....................##...#....# 
     5#....................v...v................v...#..################.....................#......#..# 
     6#................############..##.......#######.....................############......#.........# 
     7#..........#.#..........#####.....####........#....................##............######.....#...# 
     8#.!..#..v..#.......v....#####v......*#........#....v..v...v.....v...#.......v...................# 
     9################################################################################################## 
Note: See TracChangeset for help on using the changeset viewer.