Changeset 7591 for 2016/26/ViiviV


Ignore:
Timestamp:
2016-06-30 11:30:44 (3 years ago)
Author:
vivivaur
Message:

loin juttuja

Location:
2016/26/ViiviV
Files:
10 added
4 deleted
13 edited

Legend:

Unmodified
Added
Removed
  • 2016/26/ViiviV/AlpacaJump2/AlpacaJump2/AlpacaJump2/AlpacaJump2.cs

    r7573 r7591  
    88 
    99public class AlpacaJump2 : PhysicsGame 
    10     
     10 
    1111{ 
    12     const double nopeus = 200; 
    13     const double hyppyNopeus = 750; 
    14     const int RUUDUN_KOKO = 70; 
     12 
     13    const double nopeus = 300; 
     14    const double hyppyNopeus = 1500; 
     15    const int RUUDUN_KOKO = 50; 
    1516 
    1617    PlatformCharacter pelaaja1; 
    1718 
    1819    Image pelaajanKuva = LoadImage("alpaca"); 
    19     Image kolikeKuva = LoadImage("tahti"); 
    20      
     20    Image kolikeKuva = LoadImage("kolike"); 
     21    Image vihuKuva = LoadImage("vihu"); 
     22    Image pyssykyparaKuva = LoadImage("pyssykypara"); 
    2123 
    22     SoundEffect maaliAani = LoadSoundEffect("maali"); 
    2324 
    2425    public override void Begin() 
     
    2930        LisaaNappaimet(); 
    3031 
    31    
    32         Camera.ZoomFactor = 1.2; 
     32 
     33        Camera.Follow(pelaaja1); 
     34        Camera.Zoom(1.1); 
     35 
    3336        Camera.StayInLevel = true; 
    3437    } 
     
    3639    void LuoKentta() 
    3740    { 
     41        Level.Background.Color = Color.RosePink; 
     42 
    3843        ColorTileMap kentta = ColorTileMap.FromLevelAsset("Untitled"); 
    3944        kentta.SetTileMethod(Color.Black, LisaaTaso); 
    40         kentta.SetTileMethod(Color.Yellow, LisaaTahti); 
     45        kentta.SetTileMethod(Color.FromHexCode("FFD800"), Lisaakolike); 
    4146        kentta.SetTileMethod(Color.FromHexCode("FF00DC"), LisaaPelaaja); 
     47        kentta.SetTileMethod(Color.FromHexCode("00FF21"), Lisaavihu); 
     48        kentta.SetTileMethod(Color.FromHexCode("FF0000"), Lisaapyssykypara); 
    4249        kentta.Execute(RUUDUN_KOKO, RUUDUN_KOKO); 
    4350        Level.CreateBorders(); 
    44         Level.Background.CreateGradient(Color.White, Color.SkyBlue); 
     51 
    4552    } 
    4653 
     
    5360    } 
    5461 
    55     void LisaaTahti(Vector paikka, double leveys, double korkeus) 
     62    void Lisaakolike(Vector paikka, double leveys, double korkeus) 
    5663    { 
    57         PhysicsObject kolike = PhysicsObject.CreateStaticObject(leveys, korkeus); 
     64        PhysicsObject kolike = PhysicsObject.CreateStaticObject(80, 70); 
    5865        kolike.IgnoresCollisionResponse = true; 
    5966        kolike.Position = paikka; 
    60         kolike.Image = ; 
     67        kolike.Image = kolikeKuva; 
    6168        kolike.Tag = "kolike"; 
    62         Add(tahti); 
     69        Add(kolike); 
    6370    } 
    6471 
     
    6976        pelaaja1.Mass = 4.0; 
    7077        pelaaja1.Image = pelaajanKuva; 
    71         AddCollisionHandler(pelaaja1, "kolike", TormaaTahteen); 
     78        AddCollisionHandler(pelaaja1, "kolike", Tormaakolikeen); 
    7279        Add(pelaaja1); 
    7380    } 
     
    101108    } 
    102109 
    103     void TormaaTahteen(PhysicsObject hahmo, PhysicsObject tahti) 
     110    void Tormaakolikeen(PhysicsObject hahmo, PhysicsObject kolike) 
    104111    { 
    105         
     112 
    106113        MessageDisplay.Add("keräsit koliken"); 
    107         tahti.Destroy(); 
     114        kolike.Destroy(); 
    108115    } 
    109 } 
     116    void Lisaavihu(Vector paikka, double leveys, double korkeus) 
     117    { 
     118        PhysicsObject vihu = new PhysicsObject(100, 80); 
     119        vihu.Shape = Shape.Circle; 
     120        vihu.Position = paikka; 
     121        vihu.Image = vihuKuva; 
     122        Add(vihu); 
     123 
     124 
     125 
     126    } 
     127    void Lisaapyssykypara(Vector paikka, double leveys, double korkeus) 
     128    { 
     129        PhysicsObject pyssykypara = new PhysicsObject(leveys*0.5, 0.5*korkeus); 
     130        pyssykypara.Shape = Shape.Rectangle; 
     131        pyssykypara.Position = paikka; 
     132        pyssykypara.Image = pyssykyparaKuva; 
     133        Add(pyssykypara); 
     134    } 
     135}  
  • 2016/26/ViiviV/AlpacaJump2/AlpacaJump2/AlpacaJump2/AlpacaJump2.csproj.Debug.cachefile

    r7573 r7591  
    11Content\maali.xnb 
    2 Content\norsu.xnb 
    3 Content\tahti.xnb 
    42Content\alpaca.xnb 
    53Content\kentta1.xnb 
    64Content\Untitled.xnb 
     5Content\vihu.xnb 
     6Content\kolike.xnb 
     7Content\pyssykypara.xnb 
  • 2016/26/ViiviV/AlpacaJump2/AlpacaJump2/AlpacaJump2/obj/x86/Debug/AlpacaJump2.csproj.FileListAbsolute.txt

    r7573 r7591  
    11C:\MyTemp\ViiviV\AlpacaJump2\AlpacaJump2\AlpacaJump2\bin\x86\Debug\Content\maali.xnb 
    2 C:\MyTemp\ViiviV\AlpacaJump2\AlpacaJump2\AlpacaJump2\bin\x86\Debug\Content\norsu.xnb 
    3 C:\MyTemp\ViiviV\AlpacaJump2\AlpacaJump2\AlpacaJump2\bin\x86\Debug\Content\tahti.xnb 
    42C:\MyTemp\ViiviV\AlpacaJump2\AlpacaJump2\AlpacaJump2\bin\x86\Debug\Content\alpaca.xnb 
    53C:\MyTemp\ViiviV\AlpacaJump2\AlpacaJump2\AlpacaJump2\bin\x86\Debug\Content\kentta1.xnb 
     
    1311C:\MyTemp\ViiviV\AlpacaJump2\AlpacaJump2\AlpacaJump2\bin\x86\Debug\Content\Untitled.xnb 
    1412C:\MyTemp\ViiviV\AlpacaJump2\AlpacaJump2\AlpacaJump2\obj\x86\Debug\AlpacaJump2.csprojResolveAssemblyReference.cache 
     13C:\MyTemp\ViiviV\AlpacaJump2\AlpacaJump2\AlpacaJump2\bin\x86\Debug\Content\vihu.xnb 
     14C:\MyTemp\ViiviV\AlpacaJump2\AlpacaJump2\AlpacaJump2\bin\x86\Debug\Content\kolike.xnb 
     15C:\MyTemp\ViiviV\AlpacaJump2\AlpacaJump2\AlpacaJump2\bin\x86\Debug\Content\pyssykypara.xnb 
  • 2016/26/ViiviV/AlpacaJump2/AlpacaJump2/AlpacaJump2/obj/x86/Debug/ContentPipeline-{FB1067CC-FEED-45F1-8CB8-8F3DD59AB260}.xml

    r7573 r7591  
    1010      <Output>C:\MyTemp\ViiviV\AlpacaJump2\AlpacaJump2\AlpacaJump2\bin\x86\Debug\Content\maali.xnb</Output> 
    1111      <Time>2016-06-29T13:20:17.0066347+03:00</Time> 
    12     </Item> 
    13     <Item> 
    14       <Source>norsu.png</Source> 
    15       <Name>norsu</Name> 
    16       <Importer>TextureImporter</Importer> 
    17       <Processor>TextureProcessor</Processor> 
    18       <Options>None</Options> 
    19       <Output>C:\MyTemp\ViiviV\AlpacaJump2\AlpacaJump2\AlpacaJump2\bin\x86\Debug\Content\norsu.xnb</Output> 
    20       <Time>2016-06-29T13:20:17.0076348+03:00</Time> 
    21     </Item> 
    22     <Item> 
    23       <Source>tahti.png</Source> 
    24       <Name>tahti</Name> 
    25       <Importer>TextureImporter</Importer> 
    26       <Processor>TextureProcessor</Processor> 
    27       <Options>None</Options> 
    28       <Output>C:\MyTemp\ViiviV\AlpacaJump2\AlpacaJump2\AlpacaJump2\bin\x86\Debug\Content\tahti.xnb</Output> 
    29       <Time>2016-06-29T13:20:17.009635+03:00</Time> 
    3012    </Item> 
    3113    <Item> 
     
    5436      <Options>None</Options> 
    5537      <Output>C:\MyTemp\ViiviV\AlpacaJump2\AlpacaJump2\AlpacaJump2\bin\x86\Debug\Content\Untitled.xnb</Output> 
    56       <Time>2016-06-29T14:36:15.7604645+03:00</Time> 
     38      <Time>2016-06-30T10:19:53.0011078+03:00</Time> 
     39    </Item> 
     40    <Item> 
     41      <Source>vihu.png</Source> 
     42      <Name>vihu</Name> 
     43      <Importer>TextureImporter</Importer> 
     44      <Processor>TextureProcessor</Processor> 
     45      <Options>None</Options> 
     46      <Output>C:\MyTemp\ViiviV\AlpacaJump2\AlpacaJump2\AlpacaJump2\bin\x86\Debug\Content\vihu.xnb</Output> 
     47      <Time>2016-06-30T10:28:44.0538337+03:00</Time> 
     48    </Item> 
     49    <Item> 
     50      <Source>kolike.png</Source> 
     51      <Name>kolike</Name> 
     52      <Importer>TextureImporter</Importer> 
     53      <Processor>TextureProcessor</Processor> 
     54      <Options>None</Options> 
     55      <Output>C:\MyTemp\ViiviV\AlpacaJump2\AlpacaJump2\AlpacaJump2\bin\x86\Debug\Content\kolike.xnb</Output> 
     56      <Time>2016-06-30T11:02:10.5825354+03:00</Time> 
     57    </Item> 
     58    <Item> 
     59      <Source>pyssykypara.png</Source> 
     60      <Name>pyssykypara</Name> 
     61      <Importer>TextureImporter</Importer> 
     62      <Processor>TextureProcessor</Processor> 
     63      <Options>None</Options> 
     64      <Output>C:\MyTemp\ViiviV\AlpacaJump2\AlpacaJump2\AlpacaJump2\bin\x86\Debug\Content\pyssykypara.xnb</Output> 
     65      <Time>2016-06-30T11:27:09.0485629+03:00</Time> 
    5766    </Item> 
    5867    <BuildSuccessful>true</BuildSuccessful> 
  • 2016/26/ViiviV/AlpacaJump2/AlpacaJump2/AlpacaJump2/obj/x86/Debug/cachefile-{FB1067CC-FEED-45F1-8CB8-8F3DD59AB260}-targetpath.txt

    r7573 r7591  
    11Content\maali.xnb 
    2 Content\norsu.xnb 
    3 Content\tahti.xnb 
    42Content\alpaca.xnb 
    53Content\kentta1.xnb 
    64Content\Untitled.xnb 
     5Content\vihu.xnb 
     6Content\kolike.xnb 
     7Content\pyssykypara.xnb 
  • 2016/26/ViiviV/AlpacaJump2/AlpacaJump2/AlpacaJump2Content/AlpacaJump2Content.contentproj

    r7573 r7591  
    5151      <Processor>SoundEffectProcessor</Processor> 
    5252    </Compile> 
    53     <Compile Include="norsu.png"> 
    54       <Name>norsu</Name> 
    55       <Importer>TextureImporter</Importer> 
    56       <Processor>TextureProcessor</Processor> 
    57     </Compile> 
    58     <Compile Include="tahti.png"> 
    59       <Name>tahti</Name> 
    60       <Importer>TextureImporter</Importer> 
    61       <Processor>TextureProcessor</Processor> 
    62     </Compile> 
    6353    <Compile Include="kentta1.txt"> 
    6454      <Name>kentta1</Name> 
     
    8171    </Compile> 
    8272  </ItemGroup> 
     73  <ItemGroup> 
     74    <Compile Include="vihu.png"> 
     75      <Name>vihu</Name> 
     76      <Importer>TextureImporter</Importer> 
     77      <Processor>TextureProcessor</Processor> 
     78    </Compile> 
     79  </ItemGroup> 
     80  <ItemGroup> 
     81    <Compile Include="kolike.png"> 
     82      <Name>kolike</Name> 
     83      <Importer>TextureImporter</Importer> 
     84      <Processor>TextureProcessor</Processor> 
     85    </Compile> 
     86  </ItemGroup> 
     87  <ItemGroup> 
     88    <Compile Include="pyssykypara.png"> 
     89      <Name>pyssykypara</Name> 
     90      <Importer>TextureImporter</Importer> 
     91      <Processor>TextureProcessor</Processor> 
     92    </Compile> 
     93  </ItemGroup> 
    8394  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 
    8495  <!--  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.