Changeset 3600 for 2012/27


Ignore:
Timestamp:
2012-07-05 14:51:25 (11 years ago)
Author:
jejokiil
Message:

Talletus.

Location:
2012/27/JesseK
Files:
65 added
2 edited

Legend:

Unmodified
Added
Removed
  • 2012/27/JesseK/omapeli/omapeli/omapeli/omapeli.cs

    r3550 r3600  
    2121    PlatformCharacter ukko; 
    2222    // PhysicsObject taso; 
     23    SoundEffect hyppyAani = LoadSoundEffect("smb_jumpsmall1"); 
     24    SoundEffect kolikkoAani = LoadSoundEffect("smb_coin1"); 
     25    SoundEffect huutoAani = LoadSoundEffect("scream"); 
     26 
    2327    public override void Begin() 
    2428    { 
    2529        idleVasen = Image.Mirror(idleOikea); 
    26  
    2730        LuoKentta(); 
    2831        LuoPelaaja(); 
     
    3134        Gravity = new Vector(0, -1100); 
    3235 
    33         Camera.ZoomFactor = 1.3; 
     36        MediaPlayer.Play("taustamusa"); 
     37        MediaPlayer.Volume = 0.2; 
     38        MediaPlayer.IsRepeating = true; 
     39 
     40 
     41        Camera.ZoomFactor = 1; 
    3442        Camera.Follow(ukko); 
    3543        AddCollisionHandler<PlatformCharacter, PhysicsObject>(ukko, KolikkoKeratty); 
    3644        AddCollisionHandler<PlatformCharacter, PhysicsObject>(ukko, SieniOsuma); 
    3745    } 
    38     
     46 
    3947    void LuoPelaaja() 
    4048    { 
     
    6977        koro1.Shape = Shape.Rectangle; 
    7078        Add(koro1); 
     79         
    7180        // Myrkkysienen tekeminen -- Myrkkysienen koko: 25 x 25 
    7281        LuoMyrkkysieni(-150.0, Level.Bottom + 12.5); 
     
    7584        LuoMyrkkysieni(0.0, Level.Bottom + 12.5); 
    7685        LuoMyrkkysieni(100.0, Level.Bottom + 112.0); 
     86        LuoMyrkkysieni(Level.Right - 631.5, Level.Bottom + 325.0); 
     87        LuoMyrkkysieni(Level.Right - 590, Level.Bottom + 285.0); 
     88        LuoMyrkkysieni(Level.Right - 440, Level.Bottom + 555.0); 
     89        LuoMyrkkysieni(Level.Right - 380, Level.Bottom + 555.0); 
     90        LuoMyrkkysieni(Level.Right - 320, Level.Bottom + 555.0); 
    7791        // Tasojen tekeminen -- Tason koko: 23 x 9 
    7892        LuoTaso(-150, Level.Bottom + 40.0); 
     
    93107        LuoLiikkuvaTaso(Level.Right - 530, Level.Bottom + 310.0); 
    94108        LuoTaso(Level.Right - 560, Level.Bottom + 310.0); 
     109        LuoTaso(Level.Right - 590, Level.Bottom + 270.0); 
     110        LuoTaso(Level.Right - 620, Level.Bottom + 310.0); 
     111        LuoTaso(Level.Right - 643, Level.Bottom + 310.0); 
     112        LuoTaso(Level.Right - 666, Level.Bottom + 310.0); 
     113        LuoTaso(Level.Right - 660, Level.Bottom + 240.0); 
     114        LuoTaso(Level.Right - 608.5, Level.Bottom + 200.0); 
     115        LuoTaso(Level.Right - 690, Level.Bottom + 270.0); 
     116        LuoTaso(Level.Right - 750, Level.Bottom + 270.0); 
     117        LuoTaso(Level.Right - 820, Level.Bottom + 300.0); 
     118        LuoTaso(Level.Right - 860, Level.Bottom + 330.0); 
     119        LuoTaso(Level.Right - 883, Level.Bottom + 330.0); 
     120        LuoTaso(Level.Right - 906, Level.Bottom + 330.0); 
     121        LuoTaso(Level.Right - 929, Level.Bottom + 330.0); 
     122        LuoTaso(Level.Right - 952, Level.Bottom + 330.0); 
     123        LuoTaso(Level.Right - 975, Level.Bottom + 330.0); 
     124        LuoTaso(Level.Right - 975, Level.Bottom + 390.0); 
     125        LuoTaso(Level.Right - 952, Level.Bottom + 450.0); 
     126        LuoTaso(Level.Right - 975, Level.Bottom + 510.0); 
     127        LuoTaso(Level.Right - 900, Level.Bottom + 550.0); 
     128        LuoTaso(Level.Right - 850, Level.Bottom + 550.0); 
     129        LuoTaso(Level.Right - 827, Level.Bottom + 541.0); 
     130        LuoTaso(Level.Right - 804, Level.Bottom + 532.0); 
     131        LuoTaso(Level.Right - 782, Level.Bottom + 523.0); 
     132        LuoTaso(Level.Right - 700, Level.Bottom + 523.0); 
     133        LuoTaso(Level.Right - 620, Level.Bottom + 523.0); 
     134        LuoTaso(Level.Right - 550, Level.Bottom + 523.0); 
     135        LuoTaso(Level.Right - 470, Level.Bottom + 540.0); 
     136        LuoTaso(Level.Right - 440, Level.Bottom + 540.0); 
     137        LuoTaso(Level.Right - 410, Level.Bottom + 540.0); 
     138        LuoTaso(Level.Right - 380, Level.Bottom + 540.0); 
     139        LuoTaso(Level.Right - 350, Level.Bottom + 540.0); 
     140        LuoTaso(Level.Right - 320, Level.Bottom + 540.0); 
     141        LuoTaso(Level.Right - 290, Level.Bottom + 540.0); 
     142        LuoTaso(Level.Right - 260, Level.Bottom + 540.0); 
     143        LuoTaso(Level.Right - 237, Level.Bottom + 549.0); 
     144        LuoTaso(Level.Right - 214, Level.Bottom + 558.0); 
     145        LuoTaso(Level.Right - 191, Level.Bottom + 567.0); 
     146        LuoTaso(Level.Right - 168, Level.Bottom + 576.0); 
     147        LuoTaso(Level.Right - 145, Level.Bottom + 576.0); 
     148        LuoTaso(Level.Right - 122, Level.Bottom + 576.0); 
     149        LuoTaso(Level.Right - 99, Level.Bottom + 576.0); 
     150        LuoTaso(Level.Right - 76, Level.Bottom + 576.0); 
     151        LuoTaso(Level.Right - 53, Level.Bottom + 576.0); 
     152        LuoTaso(Level.Right - 30, Level.Bottom + 576.0); 
     153        LuoTaso(Level.Right - 7, Level.Bottom + 576.0); 
    95154        // Kolikon tekeminen -- Kolikon koko: 12 x 12 
    96155        LuoKolikko(-150.0, Level.Bottom + 53.0, "kolikko"); 
     
    102161        LuoKolikko(Level.Right - 219.0, Level.Bottom + 232.5, "kolikko"); 
    103162        LuoKolikko(Level.Right - 262.0, Level.Bottom + 282.5, "kolikko"); 
     163        LuoKolikko(Level.Right - 560.0, Level.Bottom + 322.0, "kolikko"); 
     164        LuoKolikko(Level.Right - 666.0, Level.Bottom + 322.0, "kolikko"); 
     165        LuoKolikko(Level.Right - 608.0, Level.Bottom + 212.0, "kolikko"); 
     166        LuoKolikko(Level.Right - 975, Level.Bottom + 402.0, "kolikko"); 
     167        LuoKolikko(Level.Right - 952, Level.Bottom + 462.0, "kolikko"); 
     168         
    104169        Level.CreateBorders(); 
    105170         
    106  
    107171        PhysicsObject kyltti = PhysicsObject.CreateStaticObject(100, 50); 
    108172        kyltti.X = -350; 
     
    111175        kyltti.Image = LoadImage("hqinfo"); 
    112176        kyltti.CollisionIgnoreGroup = 1; 
    113         Add(kyltti); 
     177        Add(kyltti, -1); 
    114178    } 
    115179 
     
    143207              pistelaskuri.Value += 1; 
    144208              kohde.Destroy(); 
     209              kolikkoAani.Play(); 
    145210          } 
    146211      } 
     
    152217            ukko.X = -500; 
    153218            ukko.Y = Level.Bottom; 
     219            huutoAani.Play(); 
    154220        } 
    155221    } 
     
    164230        Label pisteNaytto = new Label(); 
    165231        pisteNaytto.Title = "Kolikot"; 
    166         pisteNaytto.X = Screen.Left + 100; 
     232        pisteNaytto.X = Screen.Right - 100; 
    167233        pisteNaytto.Y = Screen.Top - 100; 
    168234        pisteNaytto.TextColor = Color.Black; 
     
    180246    { 
    181247        ukko.Jump(hyppy); 
     248        hyppyAani.Play(); 
    182249    } 
    183250 
     
    189256        PhoneBackButton.Listen(ConfirmExit, "Lopeta peli"); 
    190257        Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Lopeta peli"); 
     258        Keyboard.Listen(Key.F1, ButtonState.Pressed, ShowControlHelp, "Näytä ohjeet"); 
    191259    } 
    192260 
  • 2012/27/JesseK/omapeli/omapeli/omapeliContent/omapeliContent.contentproj

    r3550 r3600  
    112112    </Compile> 
    113113  </ItemGroup> 
     114  <ItemGroup> 
     115    <Compile Include="taustaloop.mp3"> 
     116      <Name>taustaloop</Name> 
     117      <Importer>Mp3Importer</Importer> 
     118      <Processor>SongProcessor</Processor> 
     119    </Compile> 
     120  </ItemGroup> 
     121  <ItemGroup> 
     122    <Compile Include="orchestral swing.mp3"> 
     123      <Name>orchestral swing</Name> 
     124      <Importer>Mp3Importer</Importer> 
     125      <Processor>SongProcessor</Processor> 
     126    </Compile> 
     127  </ItemGroup> 
     128  <ItemGroup> 
     129    <Compile Include="huuto.mp3"> 
     130      <Name>huuto</Name> 
     131      <Importer>Mp3Importer</Importer> 
     132      <Processor>SongProcessor</Processor> 
     133    </Compile> 
     134  </ItemGroup> 
     135  <ItemGroup> 
     136    <Compile Include="taustamusa.mp3"> 
     137      <Name>taustamusa</Name> 
     138      <Importer>Mp3Importer</Importer> 
     139      <Processor>SongProcessor</Processor> 
     140    </Compile> 
     141  </ItemGroup> 
     142  <ItemGroup> 
     143    <Compile Include="smb_coin1.wav"> 
     144      <Name>smb_coin1</Name> 
     145      <Importer>WavImporter</Importer> 
     146      <Processor>SoundEffectProcessor</Processor> 
     147    </Compile> 
     148    <Compile Include="smb_jumpsmall1.wav"> 
     149      <Name>smb_jumpsmall1</Name> 
     150      <Importer>WavImporter</Importer> 
     151      <Processor>SoundEffectProcessor</Processor> 
     152    </Compile> 
     153  </ItemGroup> 
     154  <ItemGroup> 
     155    <Compile Include="scream.wav"> 
     156      <Name>scream</Name> 
     157      <Importer>WavImporter</Importer> 
     158      <Processor>SoundEffectProcessor</Processor> 
     159    </Compile> 
     160  </ItemGroup> 
    114161  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 
    115162  <!--  To modify your build process, add your task inside one of the targets below and uncomment it.  
Note: See TracChangeset for help on using the changeset viewer.