- Timestamp:
- 2015-06-09 12:01:51 (8 years ago)
- 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 4 4 Content\tahti.xnb 5 5 Content\kaupunkitausta.xnb 6 Content\auto1kuva.xnb 6 7 Content\kentta1.txt -
2015/24/OttoK/Grand Theft Norsu II/Grand Theft Norsu II/Grand Theft Norsu II/Grand_Theft_Norsu_II.cs
r5909 r5931 9 9 public class Grand_Theft_Norsu_II : PhysicsGame 10 10 { 11 11 12 Image kaupunkitausta = LoadImage("kaupunkitausta"); 12 13 … … 17 18 const int RUUDUN_KOKO = 42; 18 19 20 21 19 22 PlatformCharacter pelaaja1; 20 23 21 24 Image pelaajanKuva = LoadImage("norsu"); 22 25 Image tahtiKuva = LoadImage("tahti"); 26 Image auto1kuva = LoadImage("auto1kuva"); 27 double hyppykerroin = 1.0; 23 28 24 29 SoundEffect maaliAani = LoadSoundEffect("maali"); … … 29 34 SetWindowSize(1024, 768, true); 30 35 Gravity = new Vector(0, -1000); 36 37 Mouse.IsCursorVisible = true; 38 Vector paikkaRuudulla = Mouse.PositionOnScreen; 39 Vector paikkaKentalla = Mouse.PositionOnWorld; 31 40 32 41 LuoKentta(); … … 44 53 kentta.SetTileMethod('*', LisaaTahti); 45 54 kentta.SetTileMethod('N', LisaaPelaaja); 55 kentta.SetTileMethod('A', LuoAuto); 46 56 kentta.Execute(RUUDUN_KOKO, RUUDUN_KOKO); 47 57 Level.CreateBorders(); … … 84 94 Add(pelaaja1); 85 95 86 PhysicsObject auto1 = new PhysicsObject(150 87 , 100); 88 auto1.Shape = Shape.Rectangle; 89 Add(auto1); 96 90 97 } 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 91 111 92 112 … … 100 120 Keyboard.Listen(Key.W, ButtonState.Pressed, Hyppaa, "Pelaaja hyppää", pelaaja1, hyppyNopeus); 101 121 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 102 127 103 128 ControllerOne.Listen(Button.Back, ButtonState.Pressed, Exit, "Poistu pelistä"); … … 107 132 ControllerOne.Listen(Button.A, ButtonState.Pressed, Hyppaa, "Pelaaja hyppää", pelaaja1, hyppyNopeus); 108 133 ControllerOne.ListenAnalog(AnalogControl.LeftStick, 2.0, 109 LiikutaPelaajaa, "Liikuta pelaajaa tattia pyörittämällä.");134 LiikutaPelaajaa, "Liikuta pelaajaa tattia pyörittämällä."); 110 135 Vector tatinAsento = ControllerOne.LeftThumbDirection; 111 136 … … 120 145 void Hyppaa(PlatformCharacter hahmo, double nopeus) 121 146 { 122 hahmo.Jump(nopeus );147 hahmo.Jump(nopeus*hyppykerroin); 123 148 } 124 149 … … 133 158 Vector tatinAsento = tatinTila.StateVector; 134 159 } 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 } 135 190 } -
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.............####..............................................# 24 22 ############################################################################################################################# -
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 13 13 C:\MyTemp\OttoK\Grand Theft Norsu II\Grand Theft Norsu II\Grand Theft Norsu II\bin\x86\Debug\Content\kentta1.txt 14 14 C:\MyTemp\OttoK\Grand Theft Norsu II\Grand Theft Norsu II\Grand Theft Norsu II\bin\x86\Debug\Content\kaupunkitausta.xnb 15 C:\MyTemp\otoskinn\Grand Theft Norsu II\Grand Theft Norsu II\Grand Theft Norsu II\bin\x86\Debug\Content\kentta1.xnb 16 C:\MyTemp\otoskinn\Grand Theft Norsu II\Grand Theft Norsu II\Grand Theft Norsu II\bin\x86\Debug\Content\maali.xnb 17 C:\MyTemp\otoskinn\Grand Theft Norsu II\Grand Theft Norsu II\Grand Theft Norsu II\bin\x86\Debug\Content\norsu.xnb 18 C:\MyTemp\otoskinn\Grand Theft Norsu II\Grand Theft Norsu II\Grand Theft Norsu II\bin\x86\Debug\Content\tahti.xnb 19 C:\MyTemp\otoskinn\Grand Theft Norsu II\Grand Theft Norsu II\Grand Theft Norsu II\bin\x86\Debug\Content\kaupunkitausta.xnb 20 C:\MyTemp\otoskinn\Grand Theft Norsu II\Grand Theft Norsu II\Grand Theft Norsu II\bin\x86\Debug\Content\kentta1.txt 21 C:\MyTemp\otoskinn\Grand Theft Norsu II\Grand Theft Norsu II\Grand Theft Norsu II\bin\x86\Debug\Grand Theft Norsu II.exe 22 C:\MyTemp\otoskinn\Grand Theft Norsu II\Grand Theft Norsu II\Grand Theft Norsu II\bin\x86\Debug\Grand Theft Norsu II.pdb 23 C:\MyTemp\otoskinn\Grand Theft Norsu II\Grand Theft Norsu II\Grand Theft Norsu II\bin\x86\Debug\Jypeli.dll 24 C:\MyTemp\otoskinn\Grand Theft Norsu II\Grand Theft Norsu II\Grand Theft Norsu II\bin\x86\Debug\Jypeli.xml 25 C:\MyTemp\otoskinn\Grand Theft Norsu II\Grand Theft Norsu II\Grand Theft Norsu II\obj\x86\Debug\Grand Theft Norsu II.csprojResolveAssemblyReference.cache 26 C:\MyTemp\otoskinn\Grand Theft Norsu II\Grand Theft Norsu II\Grand Theft Norsu II\obj\x86\Debug\Microsoft.Xna.Framework.RuntimeProfile.txt 27 C:\MyTemp\otoskinn\Grand Theft Norsu II\Grand Theft Norsu II\Grand Theft Norsu II\obj\x86\Debug\Grand Theft Norsu II.exe 28 C:\MyTemp\otoskinn\Grand Theft Norsu II\Grand Theft Norsu II\Grand Theft Norsu II\obj\x86\Debug\Grand Theft Norsu II.pdb 29 C:\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 4 4 Content\tahti.xnb 5 5 Content\kaupunkitausta.xnb 6 Content\auto1kuva.xnb 6 7 Content\kentta1.txt
Note: See TracChangeset
for help on using the changeset viewer.