Changeset 8465 for 2017/23


Ignore:
Timestamp:
2017-06-08 15:20:40 (2 years ago)
Author:
nupeohje
Message:

Moi

Location:
2017/23/MatiasH/DungeonGame
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • 2017/23/MatiasH/DungeonGame/DungeonGame/DungeonGame/DungeonGame.cs

    r8448 r8465  
    2020        IsMouseVisible = true; 
    2121        // TODO: Kirjoita ohjelmakoodisi tähän 
    22         Level.Background.Color = Color.LightBlue; 
    23         jatka = new PlatformCharacter(135.0, 135.0); 
     22        Level.Background.Color = Color.Aquamarine; 
     23        jatka = new PlatformCharacter(135.0, 160.0); 
    2424        jatka.Image = tyyppi; 
    2525        Add(jatka); 
     
    3333        jatka.X = -300; 
    3434        pelaajan1Ase = new AssaultRifle(30, 10); 
    35         pelaajan1Ase.Ammo.Value = 150; 
     35        pelaajan1Ase.Ammo.Value = 500; 
    3636        pelaajan1Ase.MaxAmmoLifetime = TimeSpan.FromSeconds(3.0); 
    3737        PhysicsObject lattia = new PhysicsObject(Level.Width, 50); 
     
    4343        jatka.Y = -200.0+ jatka.Height/2.0; 
    4444        pelaajan1Ase.X = 0.0 + jatka.Width / 3.0; 
     45        pelaajan1Ase.Y = 0.0 - 28.0; 
    4546    } 
    4647    void LuoNappaimet(PlatformCharacter jatka) 
     
    5051        Keyboard.Listen(Key.Left, ButtonState.Down, Kavele, "Menee Vasemmalle", -300.0); 
    5152        Keyboard.Listen(Key.Right, ButtonState.Down, Kavele, "Menee Oikealle", +300.0); 
    52         Keyboard.Listen(Key.Up, ButtonState.Down,  Hyppaa, "Menee Ylos",+50.0 ); 
     53        Keyboard.Listen(Key.Up, ButtonState.Down, Hyppaa, "Menee Ylos", +100); 
     54            
    5355    } 
    5456    void LuoAikaLaskuri() 
     
    9193 
    9294    } 
    93  
     95    void PelaajaanOsuu(PhysicsObject ammus, PhysicsObject kohde) 
     96    { 
     97 
     98 
     99    //Pelaajalta menee energiaa. 
     100    } 
    94101 
    95102    void AmmusOsui(PhysicsObject ammus, PhysicsObject kohde) 
     
    157164        vihollinen.X = x; 
    158165        vihollinen.Y = y; 
    159         vihollinen.Tag = "Vihollinen"; 
    160     } 
     166      vihollinen.Tag = "Vihollinen"; 
     167     vihollinen.Weapon =  new AssaultRifle(30, 10); 
     168     vihollinen.Weapon.X = vihollinen.Width / 2.0; 
     169        vihollinen.Weapon.Ammo.Value = 1000; 
     170        Vihollinenampuu(vihollinen); 
     171        vihollinen.Weapon.ProjectileCollision = PelaajaanOsuu; 
     172     
     173    } 
     174 
    161175    void Vihollisajastin() 
    162176    { 
     
    191205 
    192206    } 
     207    void Vihollinenampuu(Vihu vihollinen) 
     208    { 
     209        Timer ampumisajastin = new Timer(); 
     210        ampumisajastin.Interval = 2.5; 
     211        ampumisajastin.Timeout += delegate { vihollinen.Weapon.Angle = (jatka.Position - vihollinen.Weapon.AbsolutePosition).Normalize().Angle; vihollinen.Weapon.Shoot(); }; 
     212        ampumisajastin.Start(); 
     213 
     214 
     215    } 
    193216} 
    194217class Vihu : PlatformCharacter 
  • 2017/23/MatiasH/DungeonGame/DungeonGame/DungeonGame/DungeonGame.csproj

    r8448 r8465  
    111111  </ItemGroup> 
    112112  <ItemGroup> 
     113    <Compile Include="Engine32\Engine32.cs" /> 
    113114    <Compile Include="Ohjelma.cs" /> 
    114115    <Compile Include="DungeonGame.cs" /> 
  • 2017/23/MatiasH/DungeonGame/DungeonGame/DungeonGame/obj/x86/Debug/DungeonGame.csproj.FileListAbsolute.txt

    r8448 r8465  
    99c:\users\peliohjelmointi\documents\visual studio 2013\Projects\DungeonGame\DungeonGame\DungeonGame\bin\x86\Debug\Content\Tyyppi.xnb 
    1010c:\users\peliohjelmointi\documents\visual studio 2013\Projects\DungeonGame\DungeonGame\DungeonGame\bin\x86\Debug\Content\Vihollinen.xnb 
     11C:\Users\Peliohjelmointi\Documents\MatiasH\DungeonGame\DungeonGame\DungeonGame\bin\x86\Debug\Content\Tyyppi.xnb 
     12C:\Users\Peliohjelmointi\Documents\MatiasH\DungeonGame\DungeonGame\DungeonGame\bin\x86\Debug\Content\Vihollinen.xnb 
     13C:\Users\Peliohjelmointi\Documents\MatiasH\DungeonGame\DungeonGame\DungeonGame\bin\x86\Debug\DungeonGame.exe 
     14C:\Users\Peliohjelmointi\Documents\MatiasH\DungeonGame\DungeonGame\DungeonGame\bin\x86\Debug\DungeonGame.pdb 
     15C:\Users\Peliohjelmointi\Documents\MatiasH\DungeonGame\DungeonGame\DungeonGame\bin\x86\Debug\Jypeli.dll 
     16C:\Users\Peliohjelmointi\Documents\MatiasH\DungeonGame\DungeonGame\DungeonGame\bin\x86\Debug\Jypeli.xml 
     17C:\Users\Peliohjelmointi\Documents\MatiasH\DungeonGame\DungeonGame\DungeonGame\obj\x86\Debug\DungeonGame.csprojResolveAssemblyReference.cache 
     18C:\Users\Peliohjelmointi\Documents\MatiasH\DungeonGame\DungeonGame\DungeonGame\obj\x86\Debug\Microsoft.Xna.Framework.RuntimeProfile.txt 
     19C:\Users\Peliohjelmointi\Documents\MatiasH\DungeonGame\DungeonGame\DungeonGame\obj\x86\Debug\DungeonGame.exe 
     20C:\Users\Peliohjelmointi\Documents\MatiasH\DungeonGame\DungeonGame\DungeonGame\obj\x86\Debug\DungeonGame.pdb 
  • 2017/23/MatiasH/DungeonGame/DungeonGame/DungeonGameContent/DungeonGameContent.contentproj

    r8448 r8465  
    4646  </ItemGroup> 
    4747  <ItemGroup> 
     48    <Compile Include="Vihollinen.png"> 
     49      <Name>Vihollinen</Name> 
     50      <Importer>TextureImporter</Importer> 
     51      <Processor>TextureProcessor</Processor> 
     52    </Compile> 
     53  </ItemGroup> 
     54  <ItemGroup> 
    4855    <Compile Include="Tyyppi.png"> 
    4956      <Name>Tyyppi</Name> 
     
    5360  </ItemGroup> 
    5461  <ItemGroup> 
    55     <Compile Include="Vihollinen.png"> 
    56       <Name>Vihollinen</Name> 
    57       <Importer>TextureImporter</Importer> 
    58       <Processor>TextureProcessor</Processor> 
    59     </Compile> 
     62    <Folder Include="Engine32\" /> 
    6063  </ItemGroup> 
    6164  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 
  • 2017/23/MatiasH/DungeonGame/DungeonGame/DungeonGameContent/obj/x86/Debug/ContentPipeline.xml

    r8448 r8465  
    88      <Processor>TextureProcessor</Processor> 
    99      <Options>None</Options> 
    10       <Output>c:\users\peliohjelmointi\documents\visual studio 2013\Projects\DungeonGame\DungeonGame\DungeonGame\bin\x86\Debug\Content\Tyyppi.xnb</Output> 
    11       <Time>2017-06-06T13:20:36.0365109+03:00</Time> 
     10      <Output>C:\Users\Peliohjelmointi\Documents\MatiasH\DungeonGame\DungeonGame\DungeonGame\bin\x86\Debug\Content\Tyyppi.xnb</Output> 
     11      <Time>2017-06-08T13:16:21.3656471+03:00</Time> 
    1212    </Item> 
    1313    <Item> 
     
    1717      <Processor>TextureProcessor</Processor> 
    1818      <Options>None</Options> 
    19       <Output>c:\users\peliohjelmointi\documents\visual studio 2013\Projects\DungeonGame\DungeonGame\DungeonGame\bin\x86\Debug\Content\Vihollinen.xnb</Output> 
     19      <Output>C:\Users\Peliohjelmointi\Documents\MatiasH\DungeonGame\DungeonGame\DungeonGame\bin\x86\Debug\Content\Vihollinen.xnb</Output> 
    2020      <Time>2017-06-07T11:11:24.4446777+03:00</Time> 
    2121    </Item> 
     
    2626      <BuildConfiguration>Debug</BuildConfiguration> 
    2727      <CompressContent>false</CompressContent> 
    28       <RootDirectory>c:\users\peliohjelmointi\documents\visual studio 2013\Projects\DungeonGame\DungeonGame\DungeonGameContent\</RootDirectory> 
    29       <LoggerRootDirectory>c:\users\peliohjelmointi\documents\visual studio 2013\Projects\DungeonGame\DungeonGame\DungeonGame\</LoggerRootDirectory> 
    30       <IntermediateDirectory>c:\users\peliohjelmointi\documents\visual studio 2013\Projects\DungeonGame\DungeonGame\DungeonGameContent\obj\x86\Debug\</IntermediateDirectory> 
    31       <OutputDirectory>c:\users\peliohjelmointi\documents\visual studio 2013\Projects\DungeonGame\DungeonGame\DungeonGame\bin\x86\Debug\Content\</OutputDirectory> 
     28      <RootDirectory>C:\Users\Peliohjelmointi\Documents\MatiasH\DungeonGame\DungeonGame\DungeonGameContent\</RootDirectory> 
     29      <LoggerRootDirectory>C:\Users\Peliohjelmointi\Documents\MatiasH\DungeonGame\DungeonGame\DungeonGame\</LoggerRootDirectory> 
     30      <IntermediateDirectory>C:\Users\Peliohjelmointi\Documents\MatiasH\DungeonGame\DungeonGame\DungeonGameContent\obj\x86\Debug\</IntermediateDirectory> 
     31      <OutputDirectory>C:\Users\Peliohjelmointi\Documents\MatiasH\DungeonGame\DungeonGame\DungeonGame\bin\x86\Debug\Content\</OutputDirectory> 
    3232    </Settings> 
    3333    <Assemblies> 
  • 2017/23/MatiasH/DungeonGame/DungeonGame/DungeonGameContent/obj/x86/Debug/DungeonGameContent.contentproj.FileListAbsolute.txt

    r8448 r8465  
    11c:\users\peliohjelmointi\documents\visual studio 2013\Projects\DungeonGame\DungeonGame\DungeonGameContent\obj\x86\Debug\DungeonGameContent.contentprojResolveAssemblyReference.cache 
     2C:\Users\Peliohjelmointi\Documents\MatiasH\DungeonGame\DungeonGame\DungeonGameContent\obj\x86\Debug\DungeonGameContent.contentprojResolveAssemblyReference.cache 
Note: See TracChangeset for help on using the changeset viewer.