Ignore:
Timestamp:
2015-06-09 12:01:51 (8 years ago)
Author:
sieerinn
Message:
 
Location:
2015/24/OttoK/Grand Theft Norsu II/Grand Theft Norsu II/Grand Theft Norsu II
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • 2015/24/OttoK/Grand Theft Norsu II/Grand Theft Norsu II/Grand Theft Norsu II/Grand Theft Norsu II.csproj.Debug.cachefile

    r5909 r5931  
    44Content\tahti.xnb 
    55Content\kaupunkitausta.xnb 
     6Content\auto1kuva.xnb 
    67Content\kentta1.txt 
  • 2015/24/OttoK/Grand Theft Norsu II/Grand Theft Norsu II/Grand Theft Norsu II/Grand_Theft_Norsu_II.cs

    r5909 r5931  
    99public class Grand_Theft_Norsu_II : PhysicsGame 
    1010{ 
     11     
    1112    Image kaupunkitausta = LoadImage("kaupunkitausta"); 
    1213      
     
    1718    const int RUUDUN_KOKO = 42; 
    1819 
     20    
     21 
    1922    PlatformCharacter pelaaja1; 
    2023 
    2124    Image pelaajanKuva = LoadImage("norsu"); 
    2225    Image tahtiKuva = LoadImage("tahti"); 
     26    Image auto1kuva = LoadImage("auto1kuva"); 
     27    double hyppykerroin = 1.0; 
    2328 
    2429    SoundEffect maaliAani = LoadSoundEffect("maali"); 
     
    2934        SetWindowSize(1024, 768, true);  
    3035        Gravity = new Vector(0, -1000); 
     36 
     37        Mouse.IsCursorVisible = true; 
     38        Vector paikkaRuudulla = Mouse.PositionOnScreen; 
     39        Vector paikkaKentalla = Mouse.PositionOnWorld; 
    3140 
    3241        LuoKentta(); 
     
    4453        kentta.SetTileMethod('*', LisaaTahti); 
    4554        kentta.SetTileMethod('N', LisaaPelaaja); 
     55        kentta.SetTileMethod('A', LuoAuto); 
    4656        kentta.Execute(RUUDUN_KOKO, RUUDUN_KOKO); 
    4757        Level.CreateBorders(); 
     
    8494        Add(pelaaja1); 
    8595 
    86         PhysicsObject auto1 = new PhysicsObject(150 
    87             , 100); 
    88         auto1.Shape = Shape.Rectangle; 
    89         Add(auto1); 
     96         
    9097    } 
     98    void MeneAutoon(PhysicsObject auto) 
     99    { 
     100        pelaaja1.Image = auto1kuva; 
     101        pelaaja1.Shape = Shape.FromImage(auto1kuva); 
     102 
     103        Vector autonPaikka = auto.Position; 
     104         
     105 
     106 
     107 
     108    } 
     109 
     110 
    91111 
    92112 
     
    100120        Keyboard.Listen(Key.W, ButtonState.Pressed, Hyppaa, "Pelaaja hyppää", pelaaja1, hyppyNopeus); 
    101121        Keyboard.Listen(Key.Space, ButtonState.Pressed, Hyppaa, "Pelaaja hyppää", pelaaja1, hyppyNopeus); 
     122        Keyboard.Listen(Key.F2, ButtonState.Down, AvaaKirjoitusIkkuna, "Avaa kirjoitusikkunan"); 
     123        Keyboard.Listen(Key.LeftControl, ButtonState.Pressed, AsetaHyppykerroin, "Korkeampi hyppy", 1.5); 
     124        Keyboard.Listen(Key.LeftControl, ButtonState.Released, AsetaHyppykerroin, null, 1.0); 
     125        Mouse.Listen(MouseButton.Left, ButtonState.Pressed, TarkistaHiirenPainallus, "Objektin kohdalla toiminto"); 
     126      
    102127 
    103128        ControllerOne.Listen(Button.Back, ButtonState.Pressed, Exit, "Poistu pelistä"); 
     
    107132        ControllerOne.Listen(Button.A, ButtonState.Pressed, Hyppaa, "Pelaaja hyppää", pelaaja1, hyppyNopeus); 
    108133        ControllerOne.ListenAnalog(AnalogControl.LeftStick, 2.0, 
    109   LiikutaPelaajaa, "Liikuta pelaajaa tattia pyörittämällä."); 
     134        LiikutaPelaajaa, "Liikuta pelaajaa tattia pyörittämällä."); 
    110135        Vector tatinAsento = ControllerOne.LeftThumbDirection; 
    111136 
     
    120145    void Hyppaa(PlatformCharacter hahmo, double nopeus) 
    121146    { 
    122         hahmo.Jump(nopeus); 
     147        hahmo.Jump(nopeus*hyppykerroin); 
    123148    } 
    124149 
     
    133158        Vector tatinAsento = tatinTila.StateVector; 
    134159    } 
     160    void TarkistaHiirenPainallus() 
     161    {  
     162 
     163    } 
     164    void LuoAuto(Vector paikka, double leveys, double korkeus) 
     165    { 
     166        PhysicsObject auto1 = new PhysicsObject(auto1kuva); 
     167        auto1.Shape = Shape.FromImage(auto1kuva); 
     168        auto1.Position = paikka+ new Vector(0, 40); 
     169        auto1.Image = auto1kuva; 
     170        auto1.Mass = 350; 
     171        Add(auto1); 
     172 
     173    } 
     174    void AvaaKirjoitusIkkuna() 
     175    { 
     176        InputWindow kysymysIkkuna = new InputWindow(""); 
     177        kysymysIkkuna.TextEntered += ProcessInput; 
     178        Add(kysymysIkkuna); 
     179 
     180    } 
     181    void ProcessInput(InputWindow ikkuna) 
     182    { 
     183        string vastaus = ikkuna.InputBox.Text; 
     184        // tehdään jotain vastauksella 
     185    } 
     186    void AsetaHyppykerroin(double haluttukerroin) 
     187    { 
     188        hyppykerroin = haluttukerroin; 
     189    } 
    135190} 
  • 2015/24/OttoK/Grand Theft Norsu II/Grand Theft Norsu II/Grand Theft Norsu II/bin/x86/Debug/Content/kentta1.txt

    r5909 r5931  
    1                                                                                                                            
    2  
    3 #                                                                                                                          # 
    4 #                                                                                                                          # 
    5 #                                                                                                                          # 
    6 #                                                                                                                          # 
    7 #                                                                                                                          # 
    8 #                                                                                                                          # 
    9 #                                     ##########                                                                           # 
    10 #                                                                                                                          # 
    11 #                                                     ###      N                                                      # 
    12 #                                                            #####                                                         # 
    13 #                                                                                                                          # 
    14 #                                                                                                                          # 
    15 #                                                                            ########                                      # 
    16 #                                                                                                                          # 
    17 #                                                                                                                          # 
    18 #                                                                                                                          # 
    19 #                                                                                                                          # 
    20 #                                                                                                                          # 
    21 #                                                                                                                          # 
    22 #                                                                            ###                                           #     
    23 #                                                                        ####                                              # 
     1............................................................................................................................ 
     2#..........................................................................................................................# 
     3#..........................................................................................................................# 
     4#..........................................................................................................................# 
     5#..........................................................................................................................# 
     6#..........................................................................................................................# 
     7#..........................................................................................................................# 
     8#.....................................##########...........................................................................# 
     9#..........................................................................................................................# 
     10#.....................................................###......N...........................................................# 
     11#.........................................................#######..........................................................# 
     12#..........................................................................................................................# 
     13#............................................................................########......................................# 
     14#..........................................................................................................................# 
     15#..........................................................................................................................# 
     16#..........................................................................................................................# 
     17#..........................................................................................................................# 
     18#..........................................................................................................................# 
     19#..........................................................................................................................# 
     20#............................................................................###...........................................# 
     21#..........................................................A.............####..............................................# 
    2422############################################################################################################################# 
  • 2015/24/OttoK/Grand Theft Norsu II/Grand Theft Norsu II/Grand Theft Norsu II/obj/x86/Debug/Grand Theft Norsu II.csproj.FileListAbsolute.txt

    r5909 r5931  
    1313C:\MyTemp\OttoK\Grand Theft Norsu II\Grand Theft Norsu II\Grand Theft Norsu II\bin\x86\Debug\Content\kentta1.txt 
    1414C:\MyTemp\OttoK\Grand Theft Norsu II\Grand Theft Norsu II\Grand Theft Norsu II\bin\x86\Debug\Content\kaupunkitausta.xnb 
     15C:\MyTemp\otoskinn\Grand Theft Norsu II\Grand Theft Norsu II\Grand Theft Norsu II\bin\x86\Debug\Content\kentta1.xnb 
     16C:\MyTemp\otoskinn\Grand Theft Norsu II\Grand Theft Norsu II\Grand Theft Norsu II\bin\x86\Debug\Content\maali.xnb 
     17C:\MyTemp\otoskinn\Grand Theft Norsu II\Grand Theft Norsu II\Grand Theft Norsu II\bin\x86\Debug\Content\norsu.xnb 
     18C:\MyTemp\otoskinn\Grand Theft Norsu II\Grand Theft Norsu II\Grand Theft Norsu II\bin\x86\Debug\Content\tahti.xnb 
     19C:\MyTemp\otoskinn\Grand Theft Norsu II\Grand Theft Norsu II\Grand Theft Norsu II\bin\x86\Debug\Content\kaupunkitausta.xnb 
     20C:\MyTemp\otoskinn\Grand Theft Norsu II\Grand Theft Norsu II\Grand Theft Norsu II\bin\x86\Debug\Content\kentta1.txt 
     21C:\MyTemp\otoskinn\Grand Theft Norsu II\Grand Theft Norsu II\Grand Theft Norsu II\bin\x86\Debug\Grand Theft Norsu II.exe 
     22C:\MyTemp\otoskinn\Grand Theft Norsu II\Grand Theft Norsu II\Grand Theft Norsu II\bin\x86\Debug\Grand Theft Norsu II.pdb 
     23C:\MyTemp\otoskinn\Grand Theft Norsu II\Grand Theft Norsu II\Grand Theft Norsu II\bin\x86\Debug\Jypeli.dll 
     24C:\MyTemp\otoskinn\Grand Theft Norsu II\Grand Theft Norsu II\Grand Theft Norsu II\bin\x86\Debug\Jypeli.xml 
     25C:\MyTemp\otoskinn\Grand Theft Norsu II\Grand Theft Norsu II\Grand Theft Norsu II\obj\x86\Debug\Grand Theft Norsu II.csprojResolveAssemblyReference.cache 
     26C:\MyTemp\otoskinn\Grand Theft Norsu II\Grand Theft Norsu II\Grand Theft Norsu II\obj\x86\Debug\Microsoft.Xna.Framework.RuntimeProfile.txt 
     27C:\MyTemp\otoskinn\Grand Theft Norsu II\Grand Theft Norsu II\Grand Theft Norsu II\obj\x86\Debug\Grand Theft Norsu II.exe 
     28C:\MyTemp\otoskinn\Grand Theft Norsu II\Grand Theft Norsu II\Grand Theft Norsu II\obj\x86\Debug\Grand Theft Norsu II.pdb 
     29C:\MyTemp\otoskinn\Grand Theft Norsu II\Grand Theft Norsu II\Grand Theft Norsu II\bin\x86\Debug\Content\auto1kuva.xnb 
  • 2015/24/OttoK/Grand Theft Norsu II/Grand Theft Norsu II/Grand Theft Norsu II/obj/x86/Debug/cachefile-{FB1067CC-FEED-45F1-8CB8-8F3DD59AB260}-targetpath.txt

    r5909 r5931  
    44Content\tahti.xnb 
    55Content\kaupunkitausta.xnb 
     6Content\auto1kuva.xnb 
    67Content\kentta1.txt 
Note: See TracChangeset for help on using the changeset viewer.