Changeset 1691


Ignore:
Timestamp:
2010-08-19 16:33:45 (13 years ago)
Author:
rimapuha
Message:

chj

Location:
2010/31/rimapuha
Files:
134 added
1 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • 2010/31/rimapuha/NorsuPeli/NorsuPeli/Content/Content.contentproj

    r1663 r1691  
    5555  </ItemGroup> 
    5656  <ItemGroup> 
    57     <Compile Include="norsu2.png"> 
    58       <Name>norsu2</Name> 
    59       <Importer>TextureImporter</Importer> 
    60       <Processor>TextureProcessor</Processor> 
    61     </Compile> 
    62   </ItemGroup> 
    63   <ItemGroup> 
    6457    <Compile Include="maali2.png"> 
    6558      <Name>maali2</Name> 
     
    10396    </Compile> 
    10497  </ItemGroup> 
     98  <ItemGroup> 
     99    <Compile Include="karhukopla.png"> 
     100      <Name>karhukopla</Name> 
     101      <Importer>TextureImporter</Importer> 
     102      <Processor>TextureProcessor</Processor> 
     103    </Compile> 
     104  </ItemGroup> 
     105  <ItemGroup> 
     106    <Compile Include="tiili.png"> 
     107      <Name>tiili</Name> 
     108      <Importer>TextureImporter</Importer> 
     109      <Processor>TextureProcessor</Processor> 
     110    </Compile> 
     111  </ItemGroup> 
     112  <ItemGroup> 
     113    <Compile Include="taustagraffiti.png"> 
     114      <Name>taustagraffiti</Name> 
     115      <Importer>TextureImporter</Importer> 
     116      <Processor>TextureProcessor</Processor> 
     117    </Compile> 
     118  </ItemGroup> 
     119  <ItemGroup> 
     120    <Compile Include="lintu-1 kavelee.png"> 
     121      <Name>lintu-1 kavelee</Name> 
     122      <Importer>TextureImporter</Importer> 
     123      <Processor>TextureProcessor</Processor> 
     124    </Compile> 
     125  </ItemGroup> 
     126  <ItemGroup> 
     127    <Compile Include="lintu-1 kavelee2.png"> 
     128      <Name>lintu-1 kavelee2</Name> 
     129      <Importer>TextureImporter</Importer> 
     130      <Processor>TextureProcessor</Processor> 
     131    </Compile> 
     132  </ItemGroup> 
     133  <ItemGroup> 
     134    <Compile Include="lintu-1 hyppaa.png"> 
     135      <Name>lintu-1 hyppaa</Name> 
     136      <Importer>TextureImporter</Importer> 
     137      <Processor>TextureProcessor</Processor> 
     138    </Compile> 
     139  </ItemGroup> 
    105140  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 
    106141  <!-- To modify your build process, add your task inside one of the targets below and uncomment it.  
  • 2010/31/rimapuha/NorsuPeli/NorsuPeli/NorsuPeli.csproj

    r1598 r1691  
    1616    <Thumbnail>GameThumbnail.png</Thumbnail> 
    1717    <IsWebBootstrapper>false</IsWebBootstrapper> 
     18    <ManifestCertificateThumbprint>6D0813EC5EA172F5950BA71A54D20365F0208272</ManifestCertificateThumbprint> 
     19    <ManifestKeyFile>NorsuPeli_TemporaryKey.pfx</ManifestKeyFile> 
     20    <GenerateManifests>true</GenerateManifests> 
     21    <SignManifests>true</SignManifests> 
    1822    <PublishUrl>publish\</PublishUrl> 
    1923    <Install>true</Install> 
     
    2630    <UpdateRequired>false</UpdateRequired> 
    2731    <MapFileExtensions>true</MapFileExtensions> 
    28     <ApplicationRevision>0</ApplicationRevision> 
     32    <ApplicationRevision>1</ApplicationRevision> 
    2933    <ApplicationVersion>1.0.0.%2a</ApplicationVersion> 
    3034    <UseApplicationTrust>false</UseApplicationTrust> 
     
    3640    <Optimize>false</Optimize> 
    3741    <OutputPath>bin\x86\Debug</OutputPath> 
    38     <DefineConstants>DEBUG;TRACE;WINDOWS</DefineConstants> 
     42    <DefineConstants>WINDOWS</DefineConstants> 
    3943    <ErrorReport>prompt</ErrorReport> 
    4044    <WarningLevel>4</WarningLevel> 
     
    9296      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> 
    9397    </None> 
     98    <None Include="NorsuPeli_TemporaryKey.pfx" /> 
    9499  </ItemGroup> 
    95100  <ItemGroup> 
  • 2010/31/rimapuha/NorsuPeli/NorsuPeli/Peli.cs

    r1663 r1691  
    77class Tasohyppely : PhysicsGame 
    88{ 
    9     const double nopeus = 500; 
     9    const double nopeus = 380; 
    1010    const double hyppyVoima = 4000; 
    1111    const int ruudunLeveys = 50; 
     
    3636    void laskuriYlarajassa(int arvo) 
    3737    { 
    38         MessageDisplay.TextColor = Color.White; 
    39         MessageDisplay.Add("Pelaaja 1 voitti pelin."); 
     38        MessageDisplay.TextColor = Color.Black; 
     39        MessageDisplay.Add("Voitit pelin"); 
    4040    } 
    4141 
    4242 
    4343    PlatformCharacter pelaaja1; 
    44     //PlatformCharacter pelaaja2; 
     44   // PlatformCharacter pelaaja2; 
    4545 
    4646    Image tahtiKuva = LoadImage("Untitled");  
     47    //Image taustaKuva = LoadImage("taustagraffiti"); 
    4748 
    4849    List<Label> valikonKohdat; 
     
    5758        valikonKohdat.Add(kohta1); 
    5859 
    59         //Label kohta2 = new Label("High Scores"); 
    60         //kohta2.Position = new Vector(0, 40); 
    61         //valikonKohdat.Add(kohta2); 
    62  
     60        /*Label kohta2 = new Label("High Scores"); 
     61        kohta2.Position = new Vector(0, 40); 
     62        valikonKohdat.Add(kohta2); 
     63        */ 
     64           
    6365        Label kohta2 = new Label("Lopeta"); 
    6466        kohta2.Position = new Vector(0, -40); 
     
    108110        Camera.ZoomFactor = 1.5; 
    109111        Camera.StayInLevel = true; 
     112       // Level.Background.Image = taustaKuva; 
     113 
    110114 
    111115         
     
    118122 
    119123    //HighScoreList dddtopLista; 
     124 
     125 
     126 
    120127    protected override void Begin() 
    121128    { 
     
    125132        topLista.ScreenList.ItemColor = Color.Red; 
    126133        topLista.ScreenList.BackGroundColor = Color.Black; 
    127          * */ 
     134         */ 
    128135        Valikko(); 
    129136 
     
    144151    void LuoKentta() 
    145152    { 
     153        //Image taustaKuva = LoadImage("taustagraffiti"); 
    146154        TileMap ruudut = TileMap.FromFile("kentta.txt"); 
    147155        ruudut['='] = LuoPalikka; 
     
    157165    { 
    158166        PhysicsObject palikka = PhysicsObject.CreateStaticObject(50, 50); 
    159         palikka.Image = LoadImage ("seina"); 
     167        palikka.Image = LoadImage ("tiili"); 
    160168        return palikka; 
    161169    } 
     
    164172    { 
    165173        GameObject valeseina = new GameObject(50, 50); 
    166         valeseina.Image = LoadImage("valeseina"); 
     174        valeseina.Image = LoadImage("tiili"); 
    167175        return valeseina; 
    168176    } 
     
    179187    { 
    180188        PhysicsObject maali = PhysicsObject.CreateStaticObject(50.0, 50.0); 
     189         
    181190        maali.Image = LoadImage("maali2"); 
    182191        AddCollisionHandler(maali, Tormays2); 
     
    190199        if (kohde == pelaaja1) 
    191200 
    192         MessageDisplay.Add("Sait pisteen!!!"); 
     201        //MessageDisplay.Add("Sait pisteen!!!"); 
    193202        pisteLaskuri.Value += 1; 
    194203        tahti.Destroy(); 
     
    196205    void Tormays2(PhysicsObject maali, PhysicsObject kohde) 
    197206    { 
    198         if (kohde == pelaaja1 && pisteLaskuri.Value >= 80) 
     207        if (kohde == pelaaja1 && pisteLaskuri.Value >= 20) 
    199208        { 
    200209            ClearAll(); 
     210            PlaySound("maali"); 
    201211            MessageDisplay.Add("Voitit pelin!!!"); 
    202212            Valikko(); 
     
    207217    PhysicsObject LuoPelaaja1() 
    208218    { 
    209         pelaaja1 = new PlatformCharacter(40, 40); 
    210         pelaaja1.Mass = 4.0; 
    211         pelaaja1.Image = LoadImage("norsu"); 
     219        pelaaja1 = new PlatformCharacter(50, 40); 
     220        pelaaja1.Mass = 5.0; 
     221        pelaaja1.Image = LoadImage("lintu-1 kavelee"); 
     222        //pelaaja1.CanRotate = true; 
     223 
    212224        return (PhysicsObject)pelaaja1; 
    213225    } 
    214226 
    215227 
    216   //PhysicsObject LuoPelaaja2() 
    217   //{ 
    218   //    pelaaja2 = new PlatformCharacter(40, 40); 
    219   //    pelaaja2.Mass = 4.0; 
    220   //    pelaaja2.Image = LoadImage("norsu2"); 
    221   //    return (PhysicsObject)pelaaja2; 
    222   //} 
    223  
     228    /*PhysicsObject LuoPelaaja2() 
     229    { 
     230        pelaaja2 = new PlatformCharacter(40, 40); 
     231        pelaaja2.Mass = 4.0; 
     232        pelaaja2.Image = LoadImage("norsu2"); 
     233        return (PhysicsObject)pelaaja2; 
     234    } 
     235    */ 
    224236 
    225237    void lisaaNappaimet() 
     
    233245        Keyboard.Listen(Key.Up, ButtonState.Pressed, hyppaa, "Hyppää", pelaaja1, hyppyVoima); 
    234246 
    235         Keyboard.Listen(Key.Down, ButtonState.Down, HeitaKranaatti, "Heitä kranaatti", pelaaja1); 
     247        //Keyboard.Listen(Key.Down, ButtonState.Down, HeitaKranaatti, "Heitä kranaatti", pelaaja1); 
    236248 
    237249        //Keyboard.Listen(Key.A, ButtonState.Down, liikuta, "Liikkuu vasemmalle", pelaaja2, -nopeus); 
     
    247259        ControllerOne.Listen(Button.DPadRight, ButtonState.Down, liikuta, "Pelaaja liikkuu oikealle", pelaaja1, nopeus); 
    248260        ControllerOne.Listen(Button.LeftTrigger, ButtonState.Pressed, hyppaa, "Pelaaja hyppää", pelaaja1, hyppyVoima); 
    249         ControllerOne.Listen(Button.RightTrigger, ButtonState.Pressed, HeitaKranaatti, "heittää kranaatin", pelaaja1); 
     261        //ControllerOne.Listen(Button.RightTrigger, ButtonState.Pressed, HeitaKranaatti, "heittää kranaatin", pelaaja1); 
    250262    } 
    251263 
     
    254266    void liikuta(PlatformCharacter hahmo, double nopeus) 
    255267    { 
     268        if (hahmo.FacingDirection == Direction.Left)  
     269        { 
     270            hahmo.Image = LoadImage("lintu-1 kavelee2");  
     271        } 
     272 
     273        else if (hahmo.FacingDirection == Direction.Right) 
     274        { 
     275            hahmo.Image = LoadImage("lintu-1 kavelee"); 
     276        } 
     277 
     278         
    256279        hahmo.Walk(nopeus); 
     280 
     281        
    257282    } 
    258283 
    259284    void hyppaa(PlatformCharacter hahmo, double voima) 
    260285    { 
     286        if (hahmo.FacingDirection == Direction.Up) 
     287        { 
     288            hahmo.Image = LoadImage("lintu-1 hyppaa"); 
     289        } 
    261290        hahmo.Jump(voima); 
    262291    } 
  • 2010/31/rimapuha/NorsuPeli/NorsuPeli/kentta.txt

    r1663 r1691  
    1 =================================================================================== 
    2 =                       *=                                                        = 
    3 =****====****************=**=*********=====*****                                  = 
    4 =====    ====              ==                                                     = 
    5 =            ====    ===========================                                  = 
    6 =                ====                                                             = 
    7 =                                                     *                           = 
     1=======================================================================++++++++++++ 
     2=                       *=                                                        + 
     3=****====****************=**=*********=====*****                                  + 
     4=====++++====              ==                                                     + 
     5=++++++++++++====    ===========================                                  = 
     6=++++++++++++++++====++++++++++++++++=                                            = 
     7=++++++++++++++++++++++++++++++++++++=                *                           = 
    88======================================         ========       **  ===             = 
    9 =+++++++++++++++++++++++++=   ========         =******=       === ***             = 
     9++++++++++++++++++++++++++=   ========         =******=       === ***             = 
    1010=========================== =  ==   ==          ******=       ***                 = 
    1111=*                          ==  = = ==         =============                      = 
    1212===============================   =            =            ======                = 
    13 =+++++++++++++++++++++++++++++========         =                ===               = 
     13+++++++++++++++++++++++++++++++=======         =                ===               = 
    1414======================================         =                 ===              = 
    1515=                                              =                   === **       **= 
    1616=                                      *****   =                      ======== **=+ 
    17 =                               ================                              **==+ 
    18 =                               =++++++++++++===                           ****==++ 
    19 =                               =++++++++=====*=                          ========= 
     17=                               ================                              **=++ 
     18=                               =+++++++++++++==                           ****=+++ 
     19=                               =+++++++++====*=                          ========= 
    2020=                               ==========*    =                        ===       = 
    2121=   0                                        ===                         *        =  
    22 ================================================             **   ===========    == 
    23 =                                                     * =====================   ==+ 
    24 =                        *                        =======               *      ==++ 
    25 =                       =====                 =====+++++=   ======================= 
     22================================================             **   ===========    =+ 
     23=                                                     * =====================   =++ 
     24=                        *                        =======               *      =+++ 
     25=                       =====                 ====++++++=   =====================++ 
    2626=*                                            =+++++++++=                       *=+ 
    27 ==     *            *                =======  =+++++++++=====================  **=+ 
    28 +==    ================                       =++++++++++++==================  *==+ 
    29 ++==                                          =++++++++++++=***    * * * *   **==++ 
    30 +++==                        ====================================================== 
    31 ++++==                                                                       21 * = 
     27+=     *            *                =======  =++++++++++====================  **=+ 
     28++=    ================                       =+++++++++++++=================  *=++ 
     29+++=                                          =++++++++++++=***    * * * *   **=+++ 
     30++++=                        ====================================     ===== ======= 
     31+++++=  21                                                            = *      * = 
    3232+++++============================================================================== 
Note: See TracChangeset for help on using the changeset viewer.