Changeset 9824


Ignore:
Timestamp:
2018-07-31 12:01:24 (16 months ago)
Author:
lukrmoil
Message:
 
Location:
2017/30/HugoE/HanniAndHoo
Files:
2 added
15 edited

Legend:

Unmodified
Added
Removed
  • 2017/30/HugoE/HanniAndHoo/HanniAndHoo/HanniAndHoo/HanniAndHoo.cs

    r9822 r9824  
    2828    { 
    2929        AlkuValikko(); 
    30         IsFullScreen = true; 
     30        //IsFullScreen = true; 
    3131         
    3232 
     
    4747        HanninAse = new PlasmaCannon(60, 20);         
    4848        HanninAse.ProjectileCollision = AmmusOsui; 
     49        HanninAse.Power.DefaultValue = 7500; 
     50        HanninAse.Power.Value = HanninAse.Power.DefaultValue; 
    4951        HanninAse.X += 50; 
    5052        HanninAse.CanHitOwner = false; 
     
    6870        HoonAse.Power.Value = HoonAse.Power.DefaultValue; 
    6971        AddCollisionHandler(Hanni, "AlaReuna", ResattaaHyppyLaskuri); 
     72        AddCollisionHandler(Hanni, "taso", ResattaaHyppyLaskuri); 
     73 
    7074        AddCollisionHandler(Hanni, "sivureuna", KimpoaReunasta); 
    7175        AddCollisionHandler(Hoo, "sivureuna", KimpoaReunasta); 
     
    143147        PeliUkko pu = (PeliUkko)Kohde; 
    144148         
    145         pu.Elamalaskuri.AddValue(-8); 
     149        pu.Elamalaskuri.AddValue(-5); 
    146150        if (Ammus.Tag.Equals("PelaajanAmmus")) 
    147151        { 
     
    156160        if (!Kohde2.Tag.Equals("pelaaja")) return; 
    157161        PeliUkko pu = (PeliUkko)Kohde2; 
    158         pu.Elamalaskuri.AddValue(-11); 
    159  
    160  
     162        pu.Elamalaskuri.AddValue(-8); 
    161163    } 
    162164 
    163165    void LuoNappaimet() 
    164166    { 
    165         //Keyboard.Listen(Key.W, ButtonState.Pressed, Hyppy, null, Hanni, 1250.0); 
    166         //Keyboard.Listen(Key.D, ButtonState.Down, Kavely, null, Hanni, 650.0); 
    167         //Keyboard.Listen(Key.A, ButtonState.Down, Kavely, null, Hanni, -650.0); 
    168         //Keyboard.Listen(Key.Up, ButtonState.Pressed, Hyppy, null, Hoo, 1250.0); 
    169         //Keyboard.Listen(Key.Right, ButtonState.Down, Kavely, null, Hoo, 350.0); 
    170         //Keyboard.Listen(Key.Left, ButtonState.Down, Kavely, null, Hoo, -350.0); 
    171         //Keyboard.Listen(Key.S, ButtonState.Pressed, AmmuAseella, "Ammu", HanninAse); 
    172         //Keyboard.Listen(Key.Down, ButtonState.Pressed, AmmuAseella2, "Ammu2", HoonAse); 
     167        Keyboard.Listen(Key.W, ButtonState.Pressed, Hyppy, null, Hanni, 1250.0); 
     168        Keyboard.Listen(Key.D, ButtonState.Down, Kavely, null, Hanni, 650.0); 
     169        Keyboard.Listen(Key.A, ButtonState.Down, Kavely, null, Hanni, -650.0); 
     170         
     171        Keyboard.Listen(Key.Up, ButtonState.Pressed, Hyppy, null, Hoo, 2100.0); 
     172        Keyboard.Listen(Key.Right, ButtonState.Down, Kavely, null, Hoo, 350.0); 
     173        Keyboard.Listen(Key.Left, ButtonState.Down, Kavely, null, Hoo, -350.0); 
     174 
     175        Keyboard.Listen(Key.S, ButtonState.Pressed, AmmuAseella, "Ammu", HanninAse); 
     176        Keyboard.Listen(Key.Down, ButtonState.Pressed, AmmuAseella2, "Ammu2", HoonAse); 
    173177        Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Lopeta peli"); 
    174178     
     
    180184        ControllerOne.Listen(Button.DPadLeft, ButtonState.Down, Kavely, null, Hanni, -650.0); 
    181185 
    182         ControllerTwo.Listen(Button.A, ButtonState.Down, Hyppy, null, Hoo, 1150.0); 
    183         //ControllerTwo.Listen(Button.A, ButtonState.Up, Hyppy, null, Hoo, 1000.0); 
     186        ControllerTwo.Listen(Button.A, ButtonState.Pressed, Hyppy, null, Hoo, 2100.0);       
    184187        ControllerTwo.Listen(Button.DPadRight, ButtonState.Down, Kavely, null, Hoo, 300.0); 
    185188        ControllerTwo.Listen(Button.DPadLeft, ButtonState.Down, Kavely, null, Hoo, -300.0); 
    186189 
    187190    } 
     191    void LuoTaso(double x, double y) 
     192    { 
     193        Image Taso = LoadImage("platform"); 
     194        PhysicsObject taso = PhysicsObject.CreateStaticObject(275, 25); 
     195        taso.X = x; 
     196        taso.Y = y; 
     197        Add(taso); 
     198        taso.Oscillate(new Vector(0, 10), 50, 0.5); 
     199        taso.Image = Taso; 
     200        taso.Tag = "taso"; 
     201 
     202        taso.MakeOneWay(); 
     203 
     204    } 
    188205    void LuoKentta() 
    189206    { 
     207         
    190208        MediaPlayer.Stop(); 
    191209        MediaPlayer.Volume = 0.2; 
     
    195213        Level.Width = Screen.Width; 
    196214        Level.Height = Screen.Height; 
    197         Level.Background.Image = taustis; 
     215        Level.Background.Image = taustis2; 
    198216        Level.Background.ScaleToLevelByWidth(); 
    199217        Gravity = new Vector(0.0, -1750.0);         
     
    201219        AlaReuna.Y += 75; 
    202220        AlaReuna.Tag = "AlaReuna"; 
    203         AlaReuna.Color = Color.Brown; 
     221        AlaReuna.Color = Color.Black; 
    204222        PhysicsObject OikeaReuna = Level.CreateRightBorder(1.0, true); 
    205223        OikeaReuna.Tag = "OikeaReuna"; 
     
    210228        PhysicsObject YlaReuna = Level.CreateTopBorder(0.0, true); 
    211229        YlaReuna.Tag = "YlaReuna"; 
     230        LuoTaso(Level.Left + 400.0, 0); 
     231        LuoTaso(Level.Right - 400.0, 0); 
    212232    } 
    213233 
     
    248268    { 
    249269        if (lattia.Y > tyyppi.Y) 
     270         
    250271        { 
    251272            return; 
     
    283304    class PeliUkko : PlatformCharacter 
    284305    { 
    285         public IntMeter Elamalaskuri = new IntMeter(80, 0, 80); 
     306        public IntMeter Elamalaskuri = new IntMeter(100, 0, 100); 
    286307        public IntMeter HyppyLaskuri = new IntMeter(0, 0, 2); 
    287308        public Controller Ohjain;         
  • 2017/30/HugoE/HanniAndHoo/HanniAndHoo/HanniAndHoo/HanniAndHoo.csproj.Debug.cachefile

    r9822 r9824  
    77Content\taustamusiikki.xnb 
    88Content\jump.xnb 
     9Content\platform.xnb 
    910Content\TaistelumusaEhdokas2.wma 
    1011Content\taustamusiikki.wma 
  • 2017/30/HugoE/HanniAndHoo/HanniAndHoo/HanniAndHoo/Ohjelma.cs

    r9098 r9824  
    1313            game.Run(); 
    1414        } 
    15     } 
     15    }        
    1616#endif 
    1717} 
  • 2017/30/HugoE/HanniAndHoo/HanniAndHoo/HanniAndHoo/obj/x86/Debug/ContentPipeline-{C15B7F9E-AA60-42F1-A06A-82A8BC818B5D}.xml

    r9822 r9824  
    7676      <Time>2018-07-30T10:28:18.1600543+03:00</Time> 
    7777    </Item> 
     78    <Item> 
     79      <Source>platform.png</Source> 
     80      <Name>platform</Name> 
     81      <Importer>TextureImporter</Importer> 
     82      <Processor>TextureProcessor</Processor> 
     83      <Options>None</Options> 
     84      <Output>C:\MyTemp\lukrmoil\HanniAndHoo\HanniAndHoo\HanniAndHoo\bin\x86\Debug\Content\platform.xnb</Output> 
     85      <Time>2018-07-31T10:06:55.3027816+03:00</Time> 
     86    </Item> 
    7887    <BuildSuccessful>true</BuildSuccessful> 
    7988    <Settings> 
  • 2017/30/HugoE/HanniAndHoo/HanniAndHoo/HanniAndHoo/obj/x86/Debug/HanniAndHoo.csproj.CoreCompileInputs.cache

    r9822 r9824  
    1 048634ac2e04bae41eee5524765e413bc857e1e7 
     19f1556272ec2005f01e131fa12eed989fa25a1ec 
  • 2017/30/HugoE/HanniAndHoo/HanniAndHoo/HanniAndHoo/obj/x86/Debug/HanniAndHoo.csproj.FileListAbsolute.txt

    r9822 r9824  
    3636C:\MyTemp\lukrmoil\HanniAndHoo\HanniAndHoo\HanniAndHoo\obj\x86\Debug\HanniAndHoo.pdb 
    3737C:\MyTemp\lukrmoil\HanniAndHoo\HanniAndHoo\HanniAndHoo\obj\x86\Debug\HanniAndHoo.csproj.CoreCompileInputs.cache 
     38C:\MyTemp\lukrmoil\HanniAndHoo\HanniAndHoo\HanniAndHoo\bin\x86\Debug\Content\platform.xnb 
  • 2017/30/HugoE/HanniAndHoo/HanniAndHoo/HanniAndHoo/obj/x86/Debug/cachefile-{C15B7F9E-AA60-42F1-A06A-82A8BC818B5D}-targetpath.txt

    r9822 r9824  
    99Content\taustamusiikki.wma 
    1010Content\jump.xnb 
     11Content\platform.xnb 
  • 2017/30/HugoE/HanniAndHoo/HanniAndHoo/HanniAndHooContent/HanniAndHooContent.contentproj

    r9206 r9824  
    9999    </Compile> 
    100100  </ItemGroup> 
     101  <ItemGroup> 
     102    <Compile Include="platform.png"> 
     103      <Name>platform</Name> 
     104      <Importer>TextureImporter</Importer> 
     105      <Processor>TextureProcessor</Processor> 
     106    </Compile> 
     107  </ItemGroup> 
    101108  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 
    102109  <!--  To modify your build process, add your task inside one of the targets below and uncomment it.  
  • 2017/30/HugoE/HanniAndHoo/HanniAndHoo/HanniAndHooContent/obj/x86/Debug/HanniAndHooContent.contentproj.CoreCompileInputs.cache

    r9822 r9824  
    1 eab0ac898df6e0fed11df1a0023ea15288eca52b 
     1d38883debcf53222e9b9a4d86f6cdb74be1a0549 
Note: See TracChangeset for help on using the changeset viewer.