Changeset 7613 for 2016/26


Ignore:
Timestamp:
2016-07-01 11:30:06 (7 years ago)
Author:
vekoski
Message:
 
Location:
2016/26/VeetiK/CaveRun/CaveRun
Files:
14 added
15 edited

Legend:

Unmodified
Added
Removed
  • 2016/26/VeetiK/CaveRun/CaveRun/CaveRun/CaveRun/CaveRun.cs

    r7602 r7613  
    3333    Image veri = LoadImage("nimetön"); 
    3434    DoubleMeter pelaajanHP; 
     35    SoundEffect osuma = LoadSoundEffect("osuma"); 
     36    Image logo = LoadImage("Logo"); 
     37    SoundEffect ak = LoadSoundEffect("ak47"); 
     38 
    3539 
    3640    List<PhysicsObject> keys = new List<PhysicsObject>(); 
     
    3842    public override void Begin() 
    3943    { 
     44        MultiSelectWindow alkuValikko = new MultiSelectWindow("CaveRun","start", "exit"); 
     45        Add(alkuValikko); 
     46        alkuValikko.AddItemHandler(0, aloitapeli); 
     47        alkuValikko.AddItemHandler(1, Exit); 
     48        Mouse.IsCursorVisible = false; 
     49        Level.Background.Image = logo; 
     50        Level.Background.FitToLevel(); 
     51        Level.Background.Color = Color.DarkGray; 
     52        Camera.ZoomToLevel(); 
     53        IsFullScreen = true; 
     54 
     55    } 
     56 
     57    void aloitapeli() 
     58    { 
     59        ClearAll(); 
    4060        IsFullScreen = true; 
    4161        SmoothTextures = false; 
     
    4666        MediaPlayer.Play("Taustamusiikki"); 
    4767        MediaPlayer.IsRepeating = true; 
     68 
     69             
     70 
    4871    } 
    4972    void luokentta() 
     
    6487        Level.Background.TileToLevel(); 
    6588        Level.Background.Color = Color.Black; 
     89 
     90 
    6691         
    6792 
     
    125150        AddCollisionHandler(pelaaja, "zombi", delegate(PhysicsObject p, PhysicsObject kohde) { 
    126151            pelaajanHP.Value -= 50.0; ControllerOne.Vibrate(0.5, 0.5, 0.0, 0.0, 0.5); 
     152            osuma.Play(); 
    127153        }); 
    128154 
     
    180206 
    181207        ControllerOne.ListenAnalog(AnalogControl.LeftTrigger, 0.0, Juoksu, null); 
    182         ControllerOne.Listen(Button.Start,0.0, Pause, "Pysäyttää pelin"); 
     208        ControllerOne.Listen(Button.Start, ButtonState.Pressed, ConfirmExit, null); 
     209 
    183210 
    184211 
     
    213240    { 
    214241        Kenttänumero += 1; 
    215         ClearAll(); 
    216         Begin(); 
     242        //ClearAll(); 
     243        //Begin(); 
     244        aloitapeli(); 
    217245    } 
    218246 
     
    260288        Ase.IgnoresCollisionResponse = true; 
    261289        Add(Ase); 
     290       
    262291 
    263292 
     
    281310    { 
    282311        pelaajanAse = new AssaultRifle(30, 10); 
    283         pelaajanAse.InfiniteAmmo = false; 
     312        pelaajanAse.InfiniteAmmo = true; 
    284313        pelaajanAse.ProjectileCollision = AmmusOsui; 
    285         pelaajanAse.Ammo.Value = 10; 
     314       // pelaajanAse.Ammo.Value = 10; 
    286315        pelaaja.Image=Pelaajakuva; 
    287316        pelaaja.Add(pelaajanAse); 
    288317        pelaajanAse.IsVisible = false; 
    289        ammuslaskuri = new IntMeter(0); 
    290  
    291         Label pisteNaytto = new Label(); 
    292         pisteNaytto.X = Screen.Left + 100; 
    293         pisteNaytto.Y = Screen.Top - 100; 
    294         pisteNaytto.TextColor = Color.Black; 
    295         pisteNaytto.Color = Color.White; 
    296  
    297         pisteNaytto.BindTo(pelaajanAse); 
    298         Add(pisteNaytto); 
    299  
     318        pelaajanAse.FireRate = 9.0; 
     319        pelaajanAse.AttackSound.(); 
    300320 
    301321    } 
     
    359379    protected override void Update(Time time) 
    360380    { 
    361         taskulamppu.Position = pelaaja.Position; 
    362         taskulamppu.Angle = pelaaja.Angle; 
     381        if (pelaaja != null) 
     382        { 
     383            taskulamppu.Position = pelaaja.Position; 
     384            taskulamppu.Angle = pelaaja.Angle; 
     385        } 
    363386        base.Update(time); 
    364387    } 
     
    379402            //ammus.Size *= 3; 
    380403            ammus.Image = luodinKuva; 
     404 
    381405            ammus.Size = new Vector(25 / 2.0, 8 / 2.0); 
    382406            AddCollisionHandler(ammus, delegate(PhysicsObject a, PhysicsObject kohde) 
     
    391415                    rajahdys.Image = veri; 
    392416                    pelaaja.IgnoresExplosions = true; 
     417                    rajahdys.Sound = osuma; 
    393418                    Add(rajahdys); 
     419 
    394420                } 
    395421            }); 
  • 2016/26/VeetiK/CaveRun/CaveRun/CaveRun/CaveRun/CaveRun.csproj.Debug.cachefile

    r7602 r7613  
    1616Content\map2.xnb 
    1717Content\Nimetön.xnb 
     18Content\osuma.xnb 
     19Content\Map6.xnb 
     20Content\Map4.xnb 
     21Content\Map5.xnb 
     22Content\Logo.xnb 
     23Content\Map7.xnb 
     24Content\ak47.xnb 
    1825Content\Taustamusiikki.wma 
  • 2016/26/VeetiK/CaveRun/CaveRun/CaveRun/CaveRun/obj/x86/Debug/CaveRun.csproj.FileListAbsolute.txt

    r7602 r7613  
    4949C:\MyTemp\VeetiK\CaveRun\CaveRun\CaveRun\CaveRun\bin\x86\Debug\Content\map2.xnb 
    5050C:\MyTemp\VeetiK\CaveRun\CaveRun\CaveRun\CaveRun\bin\x86\Debug\Content\Nimetön.xnb 
     51C:\MyTemp\VeetiK\CaveRun\CaveRun\CaveRun\CaveRun\bin\x86\Debug\Content\osuma.xnb 
     52C:\MyTemp\VeetiK\CaveRun\CaveRun\CaveRun\CaveRun\bin\x86\Debug\Content\Map6.xnb 
     53C:\MyTemp\VeetiK\CaveRun\CaveRun\CaveRun\CaveRun\bin\x86\Debug\Content\Map4.xnb 
     54C:\MyTemp\VeetiK\CaveRun\CaveRun\CaveRun\CaveRun\bin\x86\Debug\Content\Map5.xnb 
     55C:\MyTemp\VeetiK\CaveRun\CaveRun\CaveRun\CaveRun\bin\x86\Debug\Content\Logo.xnb 
     56C:\MyTemp\VeetiK\CaveRun\CaveRun\CaveRun\CaveRun\bin\x86\Debug\Content\Map7.xnb 
     57C:\MyTemp\VeetiK\CaveRun\CaveRun\CaveRun\CaveRun\bin\x86\Debug\Content\ak47.xnb 
  • 2016/26/VeetiK/CaveRun/CaveRun/CaveRun/CaveRun/obj/x86/Debug/ContentPipeline-{6A862D89-0D3E-4451-B01A-26F629755B8E}.xml

    r7602 r7613  
    136136      <Options>None</Options> 
    137137      <Output>C:\MyTemp\VeetiK\CaveRun\CaveRun\CaveRun\CaveRun\bin\x86\Debug\Content\map3.xnb</Output> 
    138       <Time>2016-06-30T14:38:15.906904+03:00</Time> 
     138      <Time>2016-07-01T11:10:17.3346536+03:00</Time> 
    139139    </Item> 
    140140    <Item> 
     
    145145      <Options>None</Options> 
    146146      <Output>C:\MyTemp\VeetiK\CaveRun\CaveRun\CaveRun\CaveRun\bin\x86\Debug\Content\map2.xnb</Output> 
    147       <Time>2016-06-30T14:38:15.938104+03:00</Time> 
     147      <Time>2016-07-01T10:09:27.4554575+03:00</Time> 
    148148    </Item> 
    149149    <Item> 
     
    155155      <Output>C:\MyTemp\VeetiK\CaveRun\CaveRun\CaveRun\CaveRun\bin\x86\Debug\Content\Nimetön.xnb</Output> 
    156156      <Time>2016-06-30T13:32:36.011338+03:00</Time> 
     157    </Item> 
     158    <Item> 
     159      <Source>osuma.wav</Source> 
     160      <Name>osuma</Name> 
     161      <Importer>WavImporter</Importer> 
     162      <Processor>SoundEffectProcessor</Processor> 
     163      <Options>None</Options> 
     164      <Output>C:\MyTemp\VeetiK\CaveRun\CaveRun\CaveRun\CaveRun\bin\x86\Debug\Content\osuma.xnb</Output> 
     165      <Time>2016-07-01T09:31:09.6873852+03:00</Time> 
     166    </Item> 
     167    <Item> 
     168      <Source>Map6.png</Source> 
     169      <Name>Map6</Name> 
     170      <Importer>TextureImporter</Importer> 
     171      <Processor>TextureProcessor</Processor> 
     172      <Options>None</Options> 
     173      <Output>C:\MyTemp\VeetiK\CaveRun\CaveRun\CaveRun\CaveRun\bin\x86\Debug\Content\Map6.xnb</Output> 
     174      <Time>2016-07-01T09:59:17.5227575+03:00</Time> 
     175    </Item> 
     176    <Item> 
     177      <Source>Map4.png</Source> 
     178      <Name>Map4</Name> 
     179      <Importer>TextureImporter</Importer> 
     180      <Processor>TextureProcessor</Processor> 
     181      <Options>None</Options> 
     182      <Output>C:\MyTemp\VeetiK\CaveRun\CaveRun\CaveRun\CaveRun\bin\x86\Debug\Content\Map4.xnb</Output> 
     183      <Time>2016-07-01T09:53:38.3598156+03:00</Time> 
     184    </Item> 
     185    <Item> 
     186      <Source>Map5.png</Source> 
     187      <Name>Map5</Name> 
     188      <Importer>TextureImporter</Importer> 
     189      <Processor>TextureProcessor</Processor> 
     190      <Options>None</Options> 
     191      <Output>C:\MyTemp\VeetiK\CaveRun\CaveRun\CaveRun\CaveRun\bin\x86\Debug\Content\Map5.xnb</Output> 
     192      <Time>2016-07-01T09:59:49.4825575+03:00</Time> 
     193    </Item> 
     194    <Item> 
     195      <Source>Logo.png</Source> 
     196      <Name>Logo</Name> 
     197      <Importer>TextureImporter</Importer> 
     198      <Processor>TextureProcessor</Processor> 
     199      <Options>None</Options> 
     200      <Output>C:\MyTemp\VeetiK\CaveRun\CaveRun\CaveRun\CaveRun\bin\x86\Debug\Content\Logo.xnb</Output> 
     201      <Time>2016-07-01T10:28:51.3384247+03:00</Time> 
     202    </Item> 
     203    <Item> 
     204      <Source>Map7.png</Source> 
     205      <Name>Map7</Name> 
     206      <Importer>TextureImporter</Importer> 
     207      <Processor>TextureProcessor</Processor> 
     208      <Options>None</Options> 
     209      <Output>C:\MyTemp\VeetiK\CaveRun\CaveRun\CaveRun\CaveRun\bin\x86\Debug\Content\Map7.xnb</Output> 
     210      <Time>2016-07-01T10:59:32.166809+03:00</Time> 
     211    </Item> 
     212    <Item> 
     213      <Source>ak47.wav</Source> 
     214      <Name>ak47</Name> 
     215      <Importer>WavImporter</Importer> 
     216      <Processor>SoundEffectProcessor</Processor> 
     217      <Options>None</Options> 
     218      <Output>C:\MyTemp\VeetiK\CaveRun\CaveRun\CaveRun\CaveRun\bin\x86\Debug\Content\ak47.xnb</Output> 
     219      <Time>2016-07-01T11:18:01.2209653+03:00</Time> 
    157220    </Item> 
    158221    <BuildSuccessful>true</BuildSuccessful> 
  • 2016/26/VeetiK/CaveRun/CaveRun/CaveRun/CaveRun/obj/x86/Debug/cachefile-{6A862D89-0D3E-4451-B01A-26F629755B8E}-targetpath.txt

    r7602 r7613  
    1717Content\map2.xnb 
    1818Content\Nimetön.xnb 
     19Content\osuma.xnb 
     20Content\Map6.xnb 
     21Content\Map4.xnb 
     22Content\Map5.xnb 
     23Content\Logo.xnb 
     24Content\Map7.xnb 
     25Content\ak47.xnb 
  • 2016/26/VeetiK/CaveRun/CaveRun/CaveRun/CaveRunContent/CaveRunContent.contentproj

    r7602 r7613  
    151151  </ItemGroup> 
    152152  <ItemGroup> 
     153    <Compile Include="Map6.png"> 
     154      <Name>Map6</Name> 
     155      <Importer>TextureImporter</Importer> 
     156      <Processor>TextureProcessor</Processor> 
     157    </Compile> 
     158  </ItemGroup> 
     159  <ItemGroup> 
     160    <Compile Include="Nimetön.png"> 
     161      <Name>Nimetön</Name> 
     162      <Importer>TextureImporter</Importer> 
     163      <Processor>TextureProcessor</Processor> 
     164    </Compile> 
     165  </ItemGroup> 
     166  <ItemGroup> 
     167    <Compile Include="osuma.wav"> 
     168      <Name>osuma</Name> 
     169      <Importer>WavImporter</Importer> 
     170      <Processor>SoundEffectProcessor</Processor> 
     171    </Compile> 
     172  </ItemGroup> 
     173  <ItemGroup> 
    153174    <Compile Include="Map3.png"> 
    154175      <Name>Map3</Name> 
     
    158179  </ItemGroup> 
    159180  <ItemGroup> 
    160     <Compile Include="Nimetön.png"> 
    161       <Name>Nimetön</Name> 
    162       <Importer>TextureImporter</Importer> 
    163       <Processor>TextureProcessor</Processor> 
     181    <Compile Include="Map4.png"> 
     182      <Name>Map4</Name> 
     183      <Importer>TextureImporter</Importer> 
     184      <Processor>TextureProcessor</Processor> 
     185    </Compile> 
     186  </ItemGroup> 
     187  <ItemGroup> 
     188    <Compile Include="Map5.png"> 
     189      <Name>Map5</Name> 
     190      <Importer>TextureImporter</Importer> 
     191      <Processor>TextureProcessor</Processor> 
     192    </Compile> 
     193  </ItemGroup> 
     194  <ItemGroup> 
     195    <Compile Include="Logo.png"> 
     196      <Name>Logo</Name> 
     197      <Importer>TextureImporter</Importer> 
     198      <Processor>TextureProcessor</Processor> 
     199    </Compile> 
     200  </ItemGroup> 
     201  <ItemGroup> 
     202    <Compile Include="Map7.png"> 
     203      <Name>Map7</Name> 
     204      <Importer>TextureImporter</Importer> 
     205      <Processor>TextureProcessor</Processor> 
     206    </Compile> 
     207  </ItemGroup> 
     208  <ItemGroup> 
     209    <Compile Include="ak47.wav"> 
     210      <Name>ak47</Name> 
     211      <Importer>WavImporter</Importer> 
     212      <Processor>SoundEffectProcessor</Processor> 
    164213    </Compile> 
    165214  </ItemGroup> 
Note: See TracChangeset for help on using the changeset viewer.