Changeset 9388 for 2017


Ignore:
Timestamp:
2017-08-03 13:57:45 (18 months ago)
Author:
npo17_71
Message:
 
Location:
2017/31/RoniM/New folder
Files:
1 added
4 deleted
16 edited

Legend:

Unmodified
Added
Removed
  • 2017/31/RoniM/New folder/New folder/Bossfloors/Bossfloors/Bossfloors/Bossfloors.cs

    r9351 r9388  
    3131    Image vihu5 = LoadImage("vihu"); 
    3232    Image zzombi = LoadImage("zzombi"); 
    33  
     33    Timer vihuajastin; 
    3434    Pelaaja pelaaja1; 
    3535    //Pelaaja pelaaja2; 
     
    3737    //Pelaaja pelaaja4; 
    3838    //IntMeter pisteLaskuri; 
    39       
     39    List<Vector> zombispawnit = new List<Vector>(); 
    4040    const int RUUDUN_KOKO = 30; 
    4141    int kenttaNro = 1; 
     
    7272    void LataaKentta() 
    7373    { 
    74         ClearAll(); 
     74      //  ClearAll(); 
    7575 
    7676        if (kenttaNro == 1) LuoKentta("kentta"); 
     
    8282            return; 
    8383        } 
    84  
     84         
    8585        //LuoPistelaskuri(); 
    8686        // LuoPistelaskuri2(); 
     
    146146        pelaaja1.Ase.FireRate = 50; 
    147147        pelaaja1.Add(pelaaja1.Ase); 
    148  
     148         
    149149        Add(pelaaja1); 
    150150        return pelaaja1; 
     
    254254        
    255255        ruudut.SetTileMethod(Color.FromHexCode("AD77FF"), luomonster); 
    256         ruudut.SetTileMethod(Color.FromHexCode("B60000"), luozombi); 
     256        ruudut.SetTileMethod(Color.FromHexCode("#FFB60000"), LisaaVihollisSpawn); 
    257257        ruudut.SetTileMethod(Color.FromHexCode("FF6A00"), dungeon); 
    258258        ruudut.SetTileMethod(Color.FromHexCode("FFFFFF"), safezone); 
    259         Level.Background.Color = Color.Gold; 
    260  
     259        Level.Background.Color = Color.Gray; 
     260       // ruudut.Optimize(Color.Black); 
    261261        ruudut.Execute(30, 30); 
    262         Camera.ZoomFactor = 0.45; 
     262        Camera.ZoomFactor = 2.45; 
    263263        Camera.Follow(pelaaja1); 
    264264    } 
     
    277277        LuoPistelaskuri(); 
    278278        luoelamalaskuri(); 
     279        zombispawn(); 
    279280    } 
    280281 
     
    393394        } 
    394395    } 
     396 
    395397    void luozombi(Vector paikka, double leveys, double korkeus) 
    396398    { 
    397         Timer aikaLaskuri = new Timer(); 
    398         aikaLaskuri.Interval = (10); 
    399            aikaLaskuri.Timeout += delegate 
    400         { 
     399      
    401400            PhysicsObject zombi = new PhysicsObject(17, 17); 
    402  
     401             
    403402            zombi.Position = paikka; 
    404403            zombi.Tag = "zombi"; 
     
    415414            satunnaisAivot.ChangeMovementSeconds = 5; 
    416415            zombi.Image = zzombi; 
    417             zombi.LifetimeLeft = TimeSpan.FromSeconds(60.0); 
     416            zombi.LifetimeLeft = TimeSpan.FromSeconds(20.0); 
    418417            AddCollisionHandler(zombi, "pelaaja", pelaajaosui2); 
    419418            satunnaisAivot.WanderRadius = 200; 
     
    422421            zombi.Brain = seuraajanAivot; 
    423422            Add(zombi, +1); 
     423       
     424 
     425 
     426    } 
     427    void LisaaVihollisSpawn(Vector paikka, double leveys, double korkeus) 
     428    { 
     429        zombispawnit.Add(paikka); 
     430    } 
     431    void zombispawn() 
     432    { 
     433 
     434        //1.0 3.0 
     435 
     436        vihuajastin = new Timer(); 
     437        vihuajastin.Interval = RandomGen.NextDouble(1.0, 3.0); 
     438        vihuajastin.Timeout += delegate 
     439        { 
     440            Vector arvottupaikka = zombispawnit[RandomGen.NextInt(zombispawnit.Count - 1)]; 
     441            luozombi(arvottupaikka, RUUDUN_KOKO, RUUDUN_KOKO); 
     442 
    424443        }; 
    425         aikaLaskuri.Start(); 
    426  
    427  
    428  
    429     } 
    430   //  void mitaTapahtuuKunOllaanLahella() 
    431   //  { 
    432   //      zombi.Color = Color.Red; 
    433   //  } 
     444        vihuajastin.Start(); 
     445 
     446    } 
     447    //  void mitaTapahtuuKunOllaanLahella() 
     448    //  { 
     449    //      zombi.Color = Color.Red; 
     450    //  } 
    434451 
    435452    void dungeon(Vector paikka, double leveys, double korkeus) 
  • 2017/31/RoniM/New folder/New folder/Bossfloors/Bossfloors/Bossfloors/Bossfloors.csproj.Debug.cachefile

    r9351 r9388  
    11Content\kpelaaja1.xnb 
    22Content\kentta.xnb 
    3 Content\dungeon 1.xnb 
    4 Content\boss 1.xnb 
    53Content\zzombi.xnb 
  • 2017/31/RoniM/New folder/New folder/Bossfloors/Bossfloors/Bossfloors/obj/x86/Debug/Bossfloors.csproj.FileListAbsolute.txt

    r9351 r9388  
    99C:\MyTemp\RoniM\New folder\New folder\Bossfloors\Bossfloors\Bossfloors\obj\x86\Debug\Bossfloors.csprojResolveAssemblyReference.cache 
    1010C:\MyTemp\RoniM\New folder\New folder\Bossfloors\Bossfloors\Bossfloors\bin\x86\Debug\Content\kentta.xnb 
    11 C:\MyTemp\RoniM\New folder\New folder\Bossfloors\Bossfloors\Bossfloors\bin\x86\Debug\Content\dungeon 1.xnb 
    12 C:\MyTemp\RoniM\New folder\New folder\Bossfloors\Bossfloors\Bossfloors\bin\x86\Debug\Content\boss 1.xnb 
    1311C:\MyTemp\RoniM\New folder\New folder\Bossfloors\Bossfloors\Bossfloors\bin\x86\Debug\Content\zzombi.xnb 
  • 2017/31/RoniM/New folder/New folder/Bossfloors/Bossfloors/Bossfloors/obj/x86/Debug/ContentPipeline-{0253B4D2-116D-48F6-AF9A-D0C2B420673F}.xml

    r9351 r9388  
    1818      <Options>None</Options> 
    1919      <Output>C:\MyTemp\RoniM\New folder\New folder\Bossfloors\Bossfloors\Bossfloors\bin\x86\Debug\Content\kentta.xnb</Output> 
    20       <Time>2017-08-02T10:31:40.879871+03:00</Time> 
    21     </Item> 
    22     <Item> 
    23       <Source>dungeon 1.png</Source> 
    24       <Name>dungeon 1</Name> 
    25       <Importer>TextureImporter</Importer> 
    26       <Processor>TextureProcessor</Processor> 
    27       <Options>None</Options> 
    28       <Output>C:\MyTemp\RoniM\New folder\New folder\Bossfloors\Bossfloors\Bossfloors\bin\x86\Debug\Content\dungeon 1.xnb</Output> 
    29       <Time>2017-08-02T13:47:08.1604193+03:00</Time> 
    30     </Item> 
    31     <Item> 
    32       <Source>boss 1.png</Source> 
    33       <Name>boss 1</Name> 
    34       <Importer>TextureImporter</Importer> 
    35       <Processor>TextureProcessor</Processor> 
    36       <Options>None</Options> 
    37       <Output>C:\MyTemp\RoniM\New folder\New folder\Bossfloors\Bossfloors\Bossfloors\bin\x86\Debug\Content\boss 1.xnb</Output> 
    38       <Time>2017-08-02T11:19:19.0443749+03:00</Time> 
     20      <Time>2017-08-03T10:39:22.1351574+03:00</Time> 
    3921    </Item> 
    4022    <Item> 
  • 2017/31/RoniM/New folder/New folder/Bossfloors/Bossfloors/Bossfloors/obj/x86/Debug/cachefile-{0253B4D2-116D-48F6-AF9A-D0C2B420673F}-targetpath.txt

    r9351 r9388  
    11Content\kpelaaja1.xnb 
    22Content\kentta.xnb 
    3 Content\dungeon 1.xnb 
    4 Content\boss 1.xnb 
    53Content\zzombi.xnb 
  • 2017/31/RoniM/New folder/New folder/Bossfloors/Bossfloors/BossfloorsContent/BossfloorsContent.contentproj

    r9351 r9388  
    5353  </ItemGroup> 
    5454  <ItemGroup> 
    55     <Compile Include="kentta.png"> 
    56       <Name>kentta</Name> 
     55    <Compile Include="zzombi.png"> 
     56      <Name>zzombi</Name> 
    5757      <Importer>TextureImporter</Importer> 
    5858      <Processor>TextureProcessor</Processor> 
     
    6060  </ItemGroup> 
    6161  <ItemGroup> 
    62     <Compile Include="dungeon 1.png"> 
    63       <Name>dungeon 1</Name> 
    64       <Importer>TextureImporter</Importer> 
    65       <Processor>TextureProcessor</Processor> 
    66     </Compile> 
    67   </ItemGroup> 
    68   <ItemGroup> 
    69     <Compile Include="boss 1.png"> 
    70       <Name>boss 1</Name> 
    71       <Importer>TextureImporter</Importer> 
    72       <Processor>TextureProcessor</Processor> 
    73     </Compile> 
    74   </ItemGroup> 
    75   <ItemGroup> 
    76     <Compile Include="zzombi.png"> 
    77       <Name>zzombi</Name> 
     62    <Compile Include="kentta.png"> 
     63      <Name>kentta</Name> 
    7864      <Importer>TextureImporter</Importer> 
    7965      <Processor>TextureProcessor</Processor> 
Note: See TracChangeset for help on using the changeset viewer.