Changeset 7494 for 2016/25


Ignore:
Timestamp:
2016-06-23 12:41:13 (7 years ago)
Author:
koannak
Message:
 
Location:
2016/25/SaanaR
Files:
98 added
15 edited

Legend:

Unmodified
Added
Removed
  • 2016/25/SaanaR/Tasohyppelypeli1/Tasohyppelypeli1/Tasohyppelypeli1/Tasohyppelypeli1.cs

    r7488 r7494  
    2626    public override void Begin() 
    2727    { 
     28        IsFullScreen = true; 
    2829        LuoAlkuvalikko(); 
     30         
    2931    } 
    3032    void LuoAlkuvalikko () 
     
    3941    void AloitaPeli () 
    4042    { 
     43        kolikoidenMaara = 0; 
    4144        Gravity = new Vector(0, -1000); 
     45        pisteLaskuri.Value = 0; 
    4246 
    4347        LuoKentta(); 
    4448        LisaaNappaimet(); 
     49        LuoPistelaskuri(); 
    4550 
    4651        Camera.Follow(pelaaja1); 
    4752        Camera.ZoomFactor = 1.2; 
    4853        Camera.StayInLevel = true; 
     54    } 
     55    IntMeter pisteLaskuri = new IntMeter(0); 
     56 
     57    void LuoPistelaskuri() 
     58    { 
     59         
     60        Label pisteNaytto = new Label(); 
     61        pisteNaytto.X = Screen.Right - 100; 
     62        pisteNaytto.Y = Screen.Bottom + 100; 
     63        pisteNaytto.TextColor = Color.Black; 
     64        pisteNaytto.Color = Color.White; 
     65 
     66        pisteNaytto.BindTo(pisteLaskuri); 
     67        Add(pisteNaytto); 
    4968    } 
    5069    void LisaaAse (Vector paikka, double leveys, double korkeus) 
     
    5473        ase.Tag = "ase"; 
    5574        ase.Image = LoadImage("ase"); 
     75        ase.CollisionIgnoreGroup = 1; 
    5676        Add(ase); 
    5777    } 
     
    80100        ampiainen.Brain = aivot; 
    81101        ampiainen.Tag = "ampiainen"; 
     102        ampiainen.CollisionIgnoreGroup = 1; 
    82103        aivot.Loop = true; 
    83104    } 
     
    105126        kolikko.Tag = "Piste"; 
    106127        kolikoidenMaara++; 
     128        pisteLaskuri.Value++; 
    107129        Add(kolikko); 
    108130    } 
     
    203225        tahti.Destroy(); 
    204226        kolikoidenMaara--; 
     227        pisteLaskuri.Value--; 
    205228 
    206229        if (kolikoidenMaara <= 00) SiirrySeuraavaanKenttaan(); 
     
    210233        ClearAll(); 
    211234        kenttaMenossa++; 
    212         if (kenttaMenossa >= kentat.Length) LuoAlkuvalikko(); 
    213         AloitaPeli(); 
     235        if (kenttaMenossa >= kentat.Length) VoititPelin(); 
     236        else AloitaPeli(); 
     237    } 
     238    void VoititPelin () 
     239    { 
     240        Label tekstikentta = new Label("Voitit pelin"); 
     241        GameObject hymynaama = new GameObject(100, 100); 
     242        hymynaama.Image = LoadImage("Hymynaama"); 
     243        tekstikentta.Y += 100; 
     244        Add(hymynaama); 
     245        //hymynaama.Y -= 100; 
     246        Add(tekstikentta); 
     247        tekstikentta.Size = new Vector(50, 200); 
     248        tekstikentta.TextureFillsShape = true; 
     249        tekstikentta.TextScale = new Vector(3, 3); 
     250 
     251        GameObject alusta = new GameObject(150, 60); 
     252        alusta.Image = LoadImage("alusta"); 
     253        Add(alusta); 
     254        alusta.Y -= 100; 
     255        GameObject lopeta = new GameObject(150, 60); 
     256        lopeta.Image = LoadImage("lopeta"); 
     257        Add(lopeta); 
     258        lopeta.Y -= 175; 
     259        IsMouseVisible = true; 
     260        Mouse.Listen(MouseButton.Left, ButtonState.Pressed, delegate { 
     261            if (Mouse.IsCursorOn(alusta)) { ClearAll(); kenttaMenossa = 0; AloitaPeli(); } 
     262            else if (Mouse.IsCursorOn(lopeta)) ConfirmExit(); 
     263        },null 
     264                 
     265        ); 
    214266    } 
    215267 
  • 2016/25/SaanaR/Tasohyppelypeli1/Tasohyppelypeli1/Tasohyppelypeli1/Tasohyppelypeli1.csproj

    r7472 r7494  
    1919    <ApplicationIcon>Game.ico</ApplicationIcon> 
    2020    <Thumbnail>GameThumbnail.png</Thumbnail> 
    21     <PublishUrl>publish\</PublishUrl> 
     21    <IsWebBootstrapper>false</IsWebBootstrapper> 
     22    <ReferencePath>$(registry:HKEY_LOCAL_MACHINE\Software\Jypeli@Install_Dir)\lib\x86</ReferencePath> 
     23    <PublishUrl>C:\Users\ohjelmointi\Documents\SaanaR\Attackofthebee-teamInstall\</PublishUrl> 
    2224    <Install>true</Install> 
    2325    <InstallFrom>Disk</InstallFrom> 
     
    3133    <ApplicationRevision>0</ApplicationRevision> 
    3234    <ApplicationVersion>1.0.0.%2a</ApplicationVersion> 
    33     <IsWebBootstrapper>false</IsWebBootstrapper> 
    3435    <UseApplicationTrust>false</UseApplicationTrust> 
     36    <PublishWizardCompleted>true</PublishWizardCompleted> 
    3537    <BootstrapperEnabled>true</BootstrapperEnabled> 
    36     <ReferencePath>$(registry:HKEY_LOCAL_MACHINE\Software\Jypeli@Install_Dir)\lib\x86</ReferencePath> 
    3738  </PropertyGroup> 
    3839  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> 
     
    6061    <PlatformTarget>x86</PlatformTarget> 
    6162    <XnaCompressContent>true</XnaCompressContent> 
     63  </PropertyGroup> 
     64  <PropertyGroup> 
     65    <ManifestCertificateThumbprint>2C4CFF26EDFB8BD946970D9E0C3B6B1562026137</ManifestCertificateThumbprint> 
     66  </PropertyGroup> 
     67  <PropertyGroup> 
     68    <ManifestKeyFile>Tasohyppelypeli1_TemporaryKey.pfx</ManifestKeyFile> 
     69  </PropertyGroup> 
     70  <PropertyGroup> 
     71    <GenerateManifests>true</GenerateManifests> 
     72  </PropertyGroup> 
     73  <PropertyGroup> 
     74    <SignManifests>true</SignManifests> 
    6275  </PropertyGroup> 
    6376  <ItemGroup> 
     
    152165    </BootstrapperPackage> 
    153166  </ItemGroup> 
     167  <ItemGroup> 
     168    <None Include="Tasohyppelypeli1_TemporaryKey.pfx" /> 
     169  </ItemGroup> 
    154170  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> 
    155171  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\Microsoft.Xna.GameStudio.targets" /> 
  • 2016/25/SaanaR/Tasohyppelypeli1/Tasohyppelypeli1/Tasohyppelypeli1/Tasohyppelypeli1.csproj.Debug.cachefile

    r7487 r7494  
    1515Content\kentta5.xnb 
    1616Content\ase.xnb 
     17Content\Hymynaama.xnb 
     18Content\alusta.xnb 
     19Content\lopeta.xnb 
  • 2016/25/SaanaR/Tasohyppelypeli1/Tasohyppelypeli1/Tasohyppelypeli1/obj/x86/Debug/ContentPipeline-{FB1067CC-FEED-45F1-8CB8-8F3DD59AB260}.xml

    r7487 r7494  
    9999      <Options>None</Options> 
    100100      <Output>C:\Users\ohjelmointi\Documents\SaanaR\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\kentta2.xnb</Output> 
    101       <Time>2016-06-22T14:40:50.8741176+03:00</Time> 
     101      <Time>2016-06-23T09:57:28.7963375+03:00</Time> 
    102102    </Item> 
    103103    <Item> 
     
    145145      <Output>C:\Users\ohjelmointi\Documents\SaanaR\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\ase.xnb</Output> 
    146146      <Time>2016-06-22T15:32:44.421579+03:00</Time> 
     147    </Item> 
     148    <Item> 
     149      <Source>Hymynaama.png</Source> 
     150      <Name>Hymynaama</Name> 
     151      <Importer>TextureImporter</Importer> 
     152      <Processor>TextureProcessor</Processor> 
     153      <Options>None</Options> 
     154      <Output>C:\Users\ohjelmointi\Documents\SaanaR\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\Hymynaama.xnb</Output> 
     155      <Time>2016-06-23T11:21:35.4174337+03:00</Time> 
     156    </Item> 
     157    <Item> 
     158      <Source>alusta.png</Source> 
     159      <Name>alusta</Name> 
     160      <Importer>TextureImporter</Importer> 
     161      <Processor>TextureProcessor</Processor> 
     162      <Options>None</Options> 
     163      <Output>C:\Users\ohjelmointi\Documents\SaanaR\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\alusta.xnb</Output> 
     164      <Time>2016-06-23T11:33:30.3650134+03:00</Time> 
     165    </Item> 
     166    <Item> 
     167      <Source>lopeta.png</Source> 
     168      <Name>lopeta</Name> 
     169      <Importer>TextureImporter</Importer> 
     170      <Processor>TextureProcessor</Processor> 
     171      <Options>None</Options> 
     172      <Output>C:\Users\ohjelmointi\Documents\SaanaR\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\lopeta.xnb</Output> 
     173      <Time>2016-06-23T11:35:12.9703338+03:00</Time> 
    147174    </Item> 
    148175    <BuildSuccessful>true</BuildSuccessful> 
  • 2016/25/SaanaR/Tasohyppelypeli1/Tasohyppelypeli1/Tasohyppelypeli1/obj/x86/Debug/Tasohyppelypeli1.csproj.FileListAbsolute.txt

    r7487 r7494  
    2323C:\Users\ohjelmointi\Documents\SaanaR\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\kentta5.xnb 
    2424C:\Users\ohjelmointi\Documents\SaanaR\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\ase.xnb 
     25C:\Users\ohjelmointi\Documents\SaanaR\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\Hymynaama.xnb 
     26C:\Users\ohjelmointi\Documents\SaanaR\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\alusta.xnb 
     27C:\Users\ohjelmointi\Documents\SaanaR\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\lopeta.xnb 
  • 2016/25/SaanaR/Tasohyppelypeli1/Tasohyppelypeli1/Tasohyppelypeli1/obj/x86/Debug/cachefile-{FB1067CC-FEED-45F1-8CB8-8F3DD59AB260}-targetpath.txt

    r7487 r7494  
    1515Content\kentta5.xnb 
    1616Content\ase.xnb 
     17Content\Hymynaama.xnb 
     18Content\alusta.xnb 
     19Content\lopeta.xnb 
  • 2016/25/SaanaR/Tasohyppelypeli1/Tasohyppelypeli1/Tasohyppelypeli1Content/Tasohyppelypeli1Content.contentproj

    r7487 r7494  
    151151    </Compile> 
    152152  </ItemGroup> 
     153  <ItemGroup> 
     154    <Compile Include="Hymynaama.png"> 
     155      <Name>Hymynaama</Name> 
     156      <Importer>TextureImporter</Importer> 
     157      <Processor>TextureProcessor</Processor> 
     158    </Compile> 
     159  </ItemGroup> 
     160  <ItemGroup> 
     161    <Compile Include="alusta.png"> 
     162      <Name>alusta</Name> 
     163      <Importer>TextureImporter</Importer> 
     164      <Processor>TextureProcessor</Processor> 
     165    </Compile> 
     166  </ItemGroup> 
     167  <ItemGroup> 
     168    <Compile Include="lopeta.png"> 
     169      <Name>lopeta</Name> 
     170      <Importer>TextureImporter</Importer> 
     171      <Processor>TextureProcessor</Processor> 
     172    </Compile> 
     173  </ItemGroup> 
    153174  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 
    154175  <!--  To modify your build process, add your task inside one of the targets below and uncomment it.  
  • 2016/25/SaanaR/Tasohyppelypeli1/Tasohyppelypeli1/Tasohyppelypeli1Content/kentta2.txt

    r7487 r7494  
    88###################   # 
    99 
    10 *    *     *     *  A   
     10**   *     *     *  A   
    1111# #  #  #  #  #  #  #  
    1212 
    13 **   *   *   *  *      
     13**   *   *   *  *   ** 
    1414##  ##  ##  ##  ##  ## 
    1515 
    16 *  *    *       *  *A 
     16*  *    *  **   *  *A 
    1717#  ##  ##  ##  ##  ##  
    1818 
Note: See TracChangeset for help on using the changeset viewer.