- Timestamp:
- 2011-06-15 15:00:36 (12 years ago)
- Location:
- 2011/24/AkiR/Fight the Rambo/Fight the Rambo/Fight the Rambo
- Files:
-
- 4 added
- 5 deleted
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
2011/24/AkiR/Fight the Rambo/Fight the Rambo/Fight the Rambo/Fight the Rambo.csproj.Debug.cachefile
r2015 r2027 1 1 Content\maali.xnb 2 Content\norsu.xnb3 Content\tahti.xnb4 Content\rambo.xnb5 2 Content\rambo1.xnb 6 Content\NuHa warrior.xnb 3 Content\Nuhasotilas.xnb 4 Content\shit.xnb 5 Content\shit.wma 7 6 kentta1.txt -
2011/24/AkiR/Fight the Rambo/Fight the Rambo/Fight the Rambo/Peli.cs
r2015 r2027 14 14 15 15 PlatformCharacter pelaaja1; 16 16 PlatformCharacter vihollinen; 17 17 Image pelaajanKuva = LoadImage("rambo1"); 18 Image tahtiKuva = LoadImage("NuHa warrior");18 Image vihollisenkuva = LoadImage("Nuhasotilas"); 19 19 20 20 SoundEffect maaliAani = LoadSoundEffect("maali"); 21 Image paikallaanVasemmalle = LoadImage("rambo1"); 22 Image paikallaanOikealle; 23 24 Image[] kavelyVasemmalle = LoadImages("rambo1"); 25 Image[] kavelyOikealle; 21 26 22 27 23 28 public override void Begin() 24 29 { 30 ClearAll(); 31 32 paikallaanOikealle = Image.Mirror(paikallaanVasemmalle); 33 kavelyOikealle = Image.Mirror(kavelyVasemmalle); 34 25 35 Gravity = new Vector(0, -1000); 26 36 … … 37 47 { 38 48 TileMap kentta = TileMap.FromFile("kentta1.txt"); 49 kentta['E'] = lisaaVihollinen; 39 50 kentta['#'] = lisaaTaso; 40 kentta['*'] = lisaaTahti;41 51 kentta['N'] = lisaaPelaaja; 42 52 kentta.Insert(RUUDUN_KOKO, RUUDUN_KOKO); … … 48 58 { 49 59 PhysicsObject taso = PhysicsObject.CreateStaticObject(RUUDUN_KOKO, RUUDUN_KOKO); 50 taso.Color = Color.B lack;60 taso.Color = Color.Beige; 51 61 return taso; 52 }53 54 PhysicsObject lisaaTahti()55 {56 PhysicsObject tahti = PhysicsObject.CreateStaticObject(RUUDUN_KOKO, RUUDUN_KOKO);57 tahti.Image = tahtiKuva;58 tahti.Tag = "tahti";59 return tahti;60 62 } 61 63 … … 65 67 pelaaja1.Mass = 4.0; 66 68 pelaaja1.Image = pelaajanKuva; 67 AddCollisionHandler(pelaaja1, osuTahteen); 69 pelaaja1.Weapon = new AssaultRifle(40, 15); 70 pelaaja1.Weapon.ProjectileCollision = AmmusOsui; 71 pelaaja1.Weapon.Y = -10; 72 pelaaja1.Weapon.X = 0; 73 pelaaja1.RightIdleAnimation = new Animation(paikallaanVasemmalle); 74 pelaaja1.LeftIdleAnimation = new Animation(paikallaanOikealle); 75 76 pelaaja1.RightWalkingAnimation = new Animation(kavelyVasemmalle); 77 pelaaja1.LeftWalkingAnimation = new Animation(kavelyOikealle); 78 79 80 81 82 68 83 return pelaaja1; 69 84 } … … 77 92 Keyboard.Listen(Key.Right, ButtonState.Down, liikuta, "Liikkuu vasemmalle", pelaaja1, nopeus); 78 93 Keyboard.Listen(Key.Up, ButtonState.Pressed, hyppaa, "Pelaaja hyppää", pelaaja1, hyppyNopeus); 94 Keyboard.Listen(Key.Space, ButtonState.Down, AmmuAseella, "Ammu"); 79 95 80 96 ControllerOne.Listen(Button.Back, ButtonState.Pressed, Exit, "Poistu pelistä"); … … 95 111 } 96 112 97 void osuTahteen(PhysicsObject hahmo, PhysicsObject kohde) 113 114 115 void AmmuAseella() 98 116 { 99 if (kohde.Tag.ToString() == "tahti") 117 PhysicsObject Ammus = pelaaja1.Weapon.Shoot(); 118 if (Ammus != null) 100 119 { 101 maaliAani.Play();102 MessageDisplay.Add("Tuhosit vihollisen!");103 kohde.Destroy(); 120 Ammus.Size *= 4; 121 Ammus.MaximumLifetime = TimeSpan.FromSeconds(1.1); 122 104 123 } 105 124 } 125 void AmmusOsui(PhysicsObject Ammus, PhysicsObject Kohde) 126 { 127 Ammus.Destroy(); 128 Explosion rajahdys = new Explosion(10); 129 rajahdys.Position = Ammus.Position; 130 131 132 } 133 134 135 PlatformCharacter lisaaVihollinen() 136 { 137 vihollinen = new PlatformCharacter(70, 70); 138 vihollinen.Mass = 4.0; 139 vihollinen.Image = vihollisenkuva; 140 141 142 FollowerBrain seuraajanAivot = new FollowerBrain(); 143 vihollinen.Brain = seuraajanAivot; 144 seuraajanAivot.Target = pelaaja1; 145 seuraajanAivot.Speed = 100; 146 seuraajanAivot.TargetFollowDistance = 600; 147 seuraajanAivot.FollowAlways = true; 148 AddCollisionHandler(vihollinen, VihollinenOsui); 149 150 return vihollinen; 151 } 152 void VihollinenOsui(PhysicsObject vihollinen, PhysicsObject kohde) 153 { 154 if (kohde == pelaaja1) 155 { 156 MediaPlayer.Play("shit"); 157 pelaaja1.Destroy(); 158 Begin(); 159 } 160 } 106 161 } 162 163 164 165 166 167 -
2011/24/AkiR/Fight the Rambo/Fight the Rambo/Fight the Rambo/bin/x86/Debug/kentta1.txt
r2015 r2027 2 2 3 3 4 N * 5 ###################### 4 5 6 7 N E ############# 8 ##################################### -
2011/24/AkiR/Fight the Rambo/Fight the Rambo/Fight the Rambo/kentta1.txt
r2015 r2027 2 2 3 3 4 N * 5 ###################### 4 5 6 7 N E ############# 8 ##################################### -
2011/24/AkiR/Fight the Rambo/Fight the Rambo/Fight the Rambo/obj/x86/Debug/Fight the Rambo.csproj.FileListAbsolute.txt
r2015 r2027 1 C:\MyTemp\Fight the Rambo\Fight the Rambo\Fight the Rambo\obj\x86\Debug\ResolveAssemblyReference.cache 2 C:\MyTemp\Fight the Rambo\Fight the Rambo\Fight the Rambo\obj\x86\Debug\Microsoft.Xna.Framework.RuntimeProfile.txt 3 C:\MyTemp\Fight the Rambo\Fight the Rambo\Fight the Rambo\bin\x86\Debug\kentta1.txt 4 C:\MyTemp\Fight the Rambo\Fight the Rambo\Fight the Rambo\bin\x86\Debug\Content\maali.xnb 5 C:\MyTemp\Fight the Rambo\Fight the Rambo\Fight the Rambo\bin\x86\Debug\Content\norsu.xnb 6 C:\MyTemp\Fight the Rambo\Fight the Rambo\Fight the Rambo\bin\x86\Debug\Content\tahti.xnb 7 C:\MyTemp\Fight the Rambo\Fight the Rambo\Fight the Rambo\bin\x86\Debug\Content\rambo.xnb 8 C:\MyTemp\Fight the Rambo\Fight the Rambo\Fight the Rambo\bin\x86\Debug\Fight the Rambo.exe 9 C:\MyTemp\Fight the Rambo\Fight the Rambo\Fight the Rambo\bin\x86\Debug\Fight the Rambo.pdb 10 C:\MyTemp\Fight the Rambo\Fight the Rambo\Fight the Rambo\bin\x86\Debug\Jypeli4.dll 11 C:\MyTemp\Fight the Rambo\Fight the Rambo\Fight the Rambo\bin\x86\Debug\Jypeli4.xml 12 C:\MyTemp\Fight the Rambo\Fight the Rambo\Fight the Rambo\obj\x86\Debug\Fight the Rambo.exe 13 C:\MyTemp\Fight the Rambo\Fight the Rambo\Fight the Rambo\obj\x86\Debug\Fight the Rambo.pdb 14 C:\MyTemp\Fight the Rambo\Fight the Rambo\Fight the Rambo\bin\x86\Debug\Content\rambo1.xnb 15 C:\MyTemp\Fight the Rambo\Fight the Rambo\Fight the Rambo\bin\x86\Debug\Content\NuHa warrior.xnb 1 C:\MyTemp\AkiR\Fight the Rambo\Fight the Rambo\Fight the Rambo\bin\x86\Debug\kentta1.txt 2 C:\MyTemp\AkiR\Fight the Rambo\Fight the Rambo\Fight the Rambo\bin\x86\Debug\Fight the Rambo.exe 3 C:\MyTemp\AkiR\Fight the Rambo\Fight the Rambo\Fight the Rambo\bin\x86\Debug\Fight the Rambo.pdb 4 C:\MyTemp\AkiR\Fight the Rambo\Fight the Rambo\Fight the Rambo\bin\x86\Debug\Jypeli4.dll 5 C:\MyTemp\AkiR\Fight the Rambo\Fight the Rambo\Fight the Rambo\bin\x86\Debug\Jypeli4.xml 6 C:\MyTemp\AkiR\Fight the Rambo\Fight the Rambo\Fight the Rambo\obj\x86\Debug\ResolveAssemblyReference.cache 7 C:\MyTemp\AkiR\Fight the Rambo\Fight the Rambo\Fight the Rambo\obj\x86\Debug\Microsoft.Xna.Framework.RuntimeProfile.txt 8 C:\MyTemp\AkiR\Fight the Rambo\Fight the Rambo\Fight the Rambo\obj\x86\Debug\Fight the Rambo.exe 9 C:\MyTemp\AkiR\Fight the Rambo\Fight the Rambo\Fight the Rambo\obj\x86\Debug\Fight the Rambo.pdb 10 C:\MyTemp\AkiR\Fight the Rambo\Fight the Rambo\Fight the Rambo\bin\x86\Debug\Content\maali.xnb 11 C:\MyTemp\AkiR\Fight the Rambo\Fight the Rambo\Fight the Rambo\bin\x86\Debug\Content\rambo1.xnb 12 C:\MyTemp\AkiR\Fight the Rambo\Fight the Rambo\Fight the Rambo\bin\x86\Debug\Content\Nuhasotilas.xnb 13 C:\MyTemp\AkiR\Fight the Rambo\Fight the Rambo\Fight the Rambo\bin\x86\Debug\Content\shit.xnb 14 C:\MyTemp\AkiR\Fight the Rambo\Fight the Rambo\Fight the Rambo\bin\x86\Debug\Content\shit.wma -
2011/24/AkiR/Fight the Rambo/Fight the Rambo/Fight the Rambo/obj/x86/Debug/cachefile-{B0E0BEF2-BE44-4A05-9208-56A1391AC4FE}-targetpath.txt
r2015 r2027 1 1 Content\maali.xnb 2 Content\norsu.xnb3 Content\tahti.xnb4 Content\rambo.xnb5 2 Content\rambo1.xnb 6 Content\NuHa warrior.xnb 3 Content\Nuhasotilas.xnb 4 Content\shit.xnb 5 Content\shit.wma
Note: See TracChangeset
for help on using the changeset viewer.