Changeset 7956
- Timestamp:
- 2016-07-07 14:56:38 (3 years ago)
- Location:
- 2016/27/RuhanAnjanK
- Files:
-
- 49 added
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
2016/27/RuhanAnjanK/Noname/Noname/Noname/Noname.cs
r7945 r7956 9 9 public class Noname : PhysicsGame 10 10 { 11 const double speed = 2000;11 const double speed = 30000; 12 12 const double jumpspeed = 750; 13 13 const int TILE_SIZE = 40; … … 18 18 Image treeimage = LoadImage("tree2"); 19 19 Image grassimage = LoadImage("grass2"); 20 Image[] charecterimages = LoadImages("CJ1", "CJ2", "CJ3", "CJ4", "CJ5", "CJ6", "CJ7", "CJ8"); 21 Image[] charecterrunimages = LoadImages("CR1", "CR2", "CR3", "CR4", "CR5", "CR6"); 22 Boolean rotation = true; 23 Image startimage = LoadImage("CR4"); 24 Image cacphonicimage = LoadImage("orange2"); 20 25 21 26 SoundEffect collectsound = LoadSoundEffect("maali"); … … 44 49 level.SetTileMethod('&', AddBarrier); 45 50 level.SetTileMethod('D', AddGrass); 51 level.SetTileMethod('O', AddOrange); 46 52 level.Execute(TILE_SIZE, TILE_SIZE); 47 53 48 54 Level.CreateBorders(); 49 Level.Background.CreateGradient(Color.Brown, Color.Brown); 55 Level.Background.Image = grassimage; 56 Level.Background.FitToLevel(); 50 57 } 51 58 … … 56 63 soil.Color = Color.Brown; 57 64 Add(soil); 65 } 66 67 void AddOrange(Vector place, double width, double hieght) 68 { 69 GameObject orange = new GameObject(width, hieght); 70 orange.Position = place; 71 orange.Image = cacphonicimage; 72 orange.Tag = orange; 73 orange.Color = Color.Orange; 74 Add(orange); 75 58 76 } 59 77 … … 123 141 player1.Position = place; 124 142 player1.Mass = 4.0; 125 player1.Image = playerimage;126 143 AddCollisionHandler(player1, "apple", HitApple); 127 144 player1.CollisionIgnoreGroup = 5; 145 player1.Image = startimage; 128 146 Add(player1); 129 147 player1.CanRotate = false; … … 135 153 Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "end game"); 136 154 137 Keyboard.Listen(Key.Left, ButtonState.Down, move, "move right", player1, new Vector(-speed, 0)); 138 Keyboard.Listen(Key.Left, ButtonState.Released, player1.Stop, ""); 139 Keyboard.Listen(Key.Right, ButtonState.Down,move, "move left", player1, new Vector(speed, 0)); 140 Keyboard.Listen(Key.Right, ButtonState.Released, player1.Stop, ""); 141 Keyboard.Listen(Key.Up, ButtonState.Down, move, "player jumps", player1, new Vector(0, speed)); 142 Keyboard.Listen(Key.Up, ButtonState.Released, player1.Stop, ""); 143 Keyboard.Listen(Key.Down, ButtonState.Down, move, "player jumps", player1, new Vector(0, -speed)); 144 Keyboard.Listen(Key.Down, ButtonState.Released, player1.Stop, ""); 155 Keyboard.Listen(Key.Left, ButtonState.Pressed, move, "move right", player1, new Vector(-speed, 0)); 156 // Keyboard.Listen(Key.Left, ButtonState.Released, , ""); 157 Keyboard.Listen(Key.Right, ButtonState.Pressed,moveright, "move left", player1, new Vector(speed, 0)); 158 //Keyboard.Listen(Key.Right, ButtonState.Released, player1.Stop, ""); 159 Keyboard.Listen(Key.Up, ButtonState.Pressed, move, "player jumps", player1, new Vector(0, speed)); 160 //Keyboard.Listen(Key.Up, ButtonState.Released, player1.Stop, ""); 161 Keyboard.Listen(Key.Down, ButtonState.Pressed, move, "player jumps", player1, new Vector(0, -speed)); 162 //Keyboard.Listen(Key.Down, ButtonState.Released, player1.Stop, ""); 163 Keyboard.Listen(Key.Left, ButtonState.Released, animation, "", player1); 164 Keyboard.Listen(Key.Right, ButtonState.Released, animation, "", player1); 165 Keyboard.Listen(Key.Up, ButtonState.Released, animation, "", player1); 166 Keyboard.Listen(Key.Down, ButtonState.Released, animation, "", player1); 145 167 /*ControllerOne.Listen(Button.Back, ButtonState.Pressed, Exit, "exit game"); 146 168 … … 155 177 void move(PhysicsObject charecter, Vector speed) 156 178 { 179 player1.Animation = new Animation(charecterrunimages); 180 if (speed.X <= 0.0) 181 { 182 player1.MirrorImage(); 183 rotation = false; 184 } 185 player1.Animation.Start(); 157 186 charecter.Push(speed); 187 188 189 } 190 void moveright(PhysicsObject charecter, Vector speed) 191 { 192 player1.Animation = new Animation(charecterrunimages); 193 if (rotation == false) 194 { 195 player1.MirrorImage(); 196 rotation = true; 197 } 198 player1.Animation.Start(); 199 charecter.Push(speed); 200 201 202 } 203 204 void animation(PhysicsObject charecter) 205 206 { 207 player1.Animation.Stop(); 208 player1.Stop(); 158 209 } 159 210 -
2016/27/RuhanAnjanK/Noname/Noname/Noname/Noname.csproj.Debug.cachefile
r7945 r7956 11 11 Content\appleimage4.xnb 12 12 Content\grass2.xnb 13 Content\CJ1.xnb 14 Content\CJ2.xnb 15 Content\CJ3.xnb 16 Content\CJ4.xnb 17 Content\CJ5.xnb 18 Content\CJ6.xnb 19 Content\CJ7.xnb 20 Content\CJ8.xnb 21 Content\CR1.xnb 22 Content\CR2.xnb 23 Content\CR3.xnb 24 Content\CR4.xnb 25 Content\CR5.xnb 26 Content\CR6.xnb 27 Content\orange.xnb 28 Content\orange2.xnb -
2016/27/RuhanAnjanK/Noname/Noname/Noname/obj/x86/Debug/ContentPipeline-{FB1067CC-FEED-45F1-8CB8-8F3DD59AB260}.xml
r7945 r7956 36 36 <Options>None</Options> 37 37 <Output>C:\MyTemp\ruhank\Noname\Noname\Noname\bin\x86\Debug\Content\kentta1.xnb</Output> 38 <Time>2016-07-07T1 2:20:29.7415405+03:00</Time>38 <Time>2016-07-07T14:46:24.8915405+03:00</Time> 39 39 </Item> 40 40 <Item> … … 109 109 <Output>C:\MyTemp\ruhank\Noname\Noname\Noname\bin\x86\Debug\Content\grass2.xnb</Output> 110 110 <Time>2016-07-07T12:09:17.7375405+03:00</Time> 111 </Item> 112 <Item> 113 <Source>CJ1.png</Source> 114 <Name>CJ1</Name> 115 <Importer>TextureImporter</Importer> 116 <Processor>TextureProcessor</Processor> 117 <Options>None</Options> 118 <Output>C:\MyTemp\ruhank\Noname\Noname\Noname\bin\x86\Debug\Content\CJ1.xnb</Output> 119 <Time>2016-07-07T13:09:52.5285405+03:00</Time> 120 </Item> 121 <Item> 122 <Source>CJ2.png</Source> 123 <Name>CJ2</Name> 124 <Importer>TextureImporter</Importer> 125 <Processor>TextureProcessor</Processor> 126 <Options>None</Options> 127 <Output>C:\MyTemp\ruhank\Noname\Noname\Noname\bin\x86\Debug\Content\CJ2.xnb</Output> 128 <Time>2016-07-07T13:09:52.5305405+03:00</Time> 129 </Item> 130 <Item> 131 <Source>CJ3.png</Source> 132 <Name>CJ3</Name> 133 <Importer>TextureImporter</Importer> 134 <Processor>TextureProcessor</Processor> 135 <Options>None</Options> 136 <Output>C:\MyTemp\ruhank\Noname\Noname\Noname\bin\x86\Debug\Content\CJ3.xnb</Output> 137 <Time>2016-07-07T13:09:52.5315405+03:00</Time> 138 </Item> 139 <Item> 140 <Source>CJ4.png</Source> 141 <Name>CJ4</Name> 142 <Importer>TextureImporter</Importer> 143 <Processor>TextureProcessor</Processor> 144 <Options>None</Options> 145 <Output>C:\MyTemp\ruhank\Noname\Noname\Noname\bin\x86\Debug\Content\CJ4.xnb</Output> 146 <Time>2016-07-07T13:09:52.5335405+03:00</Time> 147 </Item> 148 <Item> 149 <Source>CJ5.png</Source> 150 <Name>CJ5</Name> 151 <Importer>TextureImporter</Importer> 152 <Processor>TextureProcessor</Processor> 153 <Options>None</Options> 154 <Output>C:\MyTemp\ruhank\Noname\Noname\Noname\bin\x86\Debug\Content\CJ5.xnb</Output> 155 <Time>2016-07-07T13:09:52.5345405+03:00</Time> 156 </Item> 157 <Item> 158 <Source>CJ6.png</Source> 159 <Name>CJ6</Name> 160 <Importer>TextureImporter</Importer> 161 <Processor>TextureProcessor</Processor> 162 <Options>None</Options> 163 <Output>C:\MyTemp\ruhank\Noname\Noname\Noname\bin\x86\Debug\Content\CJ6.xnb</Output> 164 <Time>2016-07-07T13:09:52.5355405+03:00</Time> 165 </Item> 166 <Item> 167 <Source>CJ7.png</Source> 168 <Name>CJ7</Name> 169 <Importer>TextureImporter</Importer> 170 <Processor>TextureProcessor</Processor> 171 <Options>None</Options> 172 <Output>C:\MyTemp\ruhank\Noname\Noname\Noname\bin\x86\Debug\Content\CJ7.xnb</Output> 173 <Time>2016-07-07T13:09:52.5375405+03:00</Time> 174 </Item> 175 <Item> 176 <Source>CJ8.png</Source> 177 <Name>CJ8</Name> 178 <Importer>TextureImporter</Importer> 179 <Processor>TextureProcessor</Processor> 180 <Options>None</Options> 181 <Output>C:\MyTemp\ruhank\Noname\Noname\Noname\bin\x86\Debug\Content\CJ8.xnb</Output> 182 <Time>2016-07-07T13:09:52.5385405+03:00</Time> 183 </Item> 184 <Item> 185 <Source>CR1.png</Source> 186 <Name>CR1</Name> 187 <Importer>TextureImporter</Importer> 188 <Processor>TextureProcessor</Processor> 189 <Options>None</Options> 190 <Output>C:\MyTemp\ruhank\Noname\Noname\Noname\bin\x86\Debug\Content\CR1.xnb</Output> 191 <Time>2016-07-07T13:10:13.6505405+03:00</Time> 192 </Item> 193 <Item> 194 <Source>CR2.png</Source> 195 <Name>CR2</Name> 196 <Importer>TextureImporter</Importer> 197 <Processor>TextureProcessor</Processor> 198 <Options>None</Options> 199 <Output>C:\MyTemp\ruhank\Noname\Noname\Noname\bin\x86\Debug\Content\CR2.xnb</Output> 200 <Time>2016-07-07T13:10:13.6525405+03:00</Time> 201 </Item> 202 <Item> 203 <Source>CR3.png</Source> 204 <Name>CR3</Name> 205 <Importer>TextureImporter</Importer> 206 <Processor>TextureProcessor</Processor> 207 <Options>None</Options> 208 <Output>C:\MyTemp\ruhank\Noname\Noname\Noname\bin\x86\Debug\Content\CR3.xnb</Output> 209 <Time>2016-07-07T13:10:13.6535405+03:00</Time> 210 </Item> 211 <Item> 212 <Source>CR4.png</Source> 213 <Name>CR4</Name> 214 <Importer>TextureImporter</Importer> 215 <Processor>TextureProcessor</Processor> 216 <Options>None</Options> 217 <Output>C:\MyTemp\ruhank\Noname\Noname\Noname\bin\x86\Debug\Content\CR4.xnb</Output> 218 <Time>2016-07-07T13:10:13.6555405+03:00</Time> 219 </Item> 220 <Item> 221 <Source>CR5.png</Source> 222 <Name>CR5</Name> 223 <Importer>TextureImporter</Importer> 224 <Processor>TextureProcessor</Processor> 225 <Options>None</Options> 226 <Output>C:\MyTemp\ruhank\Noname\Noname\Noname\bin\x86\Debug\Content\CR5.xnb</Output> 227 <Time>2016-07-07T13:10:13.6565405+03:00</Time> 228 </Item> 229 <Item> 230 <Source>CR6.png</Source> 231 <Name>CR6</Name> 232 <Importer>TextureImporter</Importer> 233 <Processor>TextureProcessor</Processor> 234 <Options>None</Options> 235 <Output>C:\MyTemp\ruhank\Noname\Noname\Noname\bin\x86\Debug\Content\CR6.xnb</Output> 236 <Time>2016-07-07T13:10:13.6585405+03:00</Time> 237 </Item> 238 <Item> 239 <Source>orange.jpg</Source> 240 <Name>orange</Name> 241 <Importer>TextureImporter</Importer> 242 <Processor>TextureProcessor</Processor> 243 <Options>None</Options> 244 <Output>C:\MyTemp\ruhank\Noname\Noname\Noname\bin\x86\Debug\Content\orange.xnb</Output> 245 <Time>2016-07-07T14:27:04.5605405+03:00</Time> 246 </Item> 247 <Item> 248 <Source>orange2.png</Source> 249 <Name>orange2</Name> 250 <Importer>TextureImporter</Importer> 251 <Processor>TextureProcessor</Processor> 252 <Options>None</Options> 253 <Output>C:\MyTemp\ruhank\Noname\Noname\Noname\bin\x86\Debug\Content\orange2.xnb</Output> 254 <Time>2016-07-07T14:53:35.1245405+03:00</Time> 111 255 </Item> 112 256 <BuildSuccessful>true</BuildSuccessful> -
2016/27/RuhanAnjanK/Noname/Noname/Noname/obj/x86/Debug/Noname.csproj.FileListAbsolute.txt
r7945 r7956 19 19 C:\MyTemp\ruhank\Noname\Noname\Noname\bin\x86\Debug\Content\appleimage4.xnb 20 20 C:\MyTemp\ruhank\Noname\Noname\Noname\bin\x86\Debug\Content\grass2.xnb 21 C:\MyTemp\ruhank\Noname\Noname\Noname\bin\x86\Debug\Content\CJ1.xnb 22 C:\MyTemp\ruhank\Noname\Noname\Noname\bin\x86\Debug\Content\CJ2.xnb 23 C:\MyTemp\ruhank\Noname\Noname\Noname\bin\x86\Debug\Content\CJ3.xnb 24 C:\MyTemp\ruhank\Noname\Noname\Noname\bin\x86\Debug\Content\CJ4.xnb 25 C:\MyTemp\ruhank\Noname\Noname\Noname\bin\x86\Debug\Content\CJ5.xnb 26 C:\MyTemp\ruhank\Noname\Noname\Noname\bin\x86\Debug\Content\CJ6.xnb 27 C:\MyTemp\ruhank\Noname\Noname\Noname\bin\x86\Debug\Content\CJ7.xnb 28 C:\MyTemp\ruhank\Noname\Noname\Noname\bin\x86\Debug\Content\CJ8.xnb 29 C:\MyTemp\ruhank\Noname\Noname\Noname\bin\x86\Debug\Content\CR1.xnb 30 C:\MyTemp\ruhank\Noname\Noname\Noname\bin\x86\Debug\Content\CR2.xnb 31 C:\MyTemp\ruhank\Noname\Noname\Noname\bin\x86\Debug\Content\CR3.xnb 32 C:\MyTemp\ruhank\Noname\Noname\Noname\bin\x86\Debug\Content\CR4.xnb 33 C:\MyTemp\ruhank\Noname\Noname\Noname\bin\x86\Debug\Content\CR5.xnb 34 C:\MyTemp\ruhank\Noname\Noname\Noname\bin\x86\Debug\Content\CR6.xnb 35 C:\MyTemp\ruhank\Noname\Noname\Noname\bin\x86\Debug\Content\orange.xnb 36 C:\MyTemp\ruhank\Noname\Noname\Noname\bin\x86\Debug\Content\orange2.xnb -
2016/27/RuhanAnjanK/Noname/Noname/Noname/obj/x86/Debug/cachefile-{FB1067CC-FEED-45F1-8CB8-8F3DD59AB260}-targetpath.txt
r7945 r7956 11 11 Content\appleimage4.xnb 12 12 Content\grass2.xnb 13 Content\CJ1.xnb 14 Content\CJ2.xnb 15 Content\CJ3.xnb 16 Content\CJ4.xnb 17 Content\CJ5.xnb 18 Content\CJ6.xnb 19 Content\CJ7.xnb 20 Content\CJ8.xnb 21 Content\CR1.xnb 22 Content\CR2.xnb 23 Content\CR3.xnb 24 Content\CR4.xnb 25 Content\CR5.xnb 26 Content\CR6.xnb 27 Content\orange.xnb 28 Content\orange2.xnb -
2016/27/RuhanAnjanK/Noname/Noname/NonameContent/NonameContent.contentproj
r7945 r7956 123 123 </Compile> 124 124 </ItemGroup> 125 <ItemGroup> 126 <Compile Include="CJ1.png"> 127 <Name>CJ1</Name> 128 <Importer>TextureImporter</Importer> 129 <Processor>TextureProcessor</Processor> 130 </Compile> 131 <Compile Include="CJ2.png"> 132 <Name>CJ2</Name> 133 <Importer>TextureImporter</Importer> 134 <Processor>TextureProcessor</Processor> 135 </Compile> 136 <Compile Include="CJ3.png"> 137 <Name>CJ3</Name> 138 <Importer>TextureImporter</Importer> 139 <Processor>TextureProcessor</Processor> 140 </Compile> 141 <Compile Include="CJ4.png"> 142 <Name>CJ4</Name> 143 <Importer>TextureImporter</Importer> 144 <Processor>TextureProcessor</Processor> 145 </Compile> 146 <Compile Include="CJ5.png"> 147 <Name>CJ5</Name> 148 <Importer>TextureImporter</Importer> 149 <Processor>TextureProcessor</Processor> 150 </Compile> 151 <Compile Include="CJ6.png"> 152 <Name>CJ6</Name> 153 <Importer>TextureImporter</Importer> 154 <Processor>TextureProcessor</Processor> 155 </Compile> 156 <Compile Include="CJ7.png"> 157 <Name>CJ7</Name> 158 <Importer>TextureImporter</Importer> 159 <Processor>TextureProcessor</Processor> 160 </Compile> 161 <Compile Include="CJ8.png"> 162 <Name>CJ8</Name> 163 <Importer>TextureImporter</Importer> 164 <Processor>TextureProcessor</Processor> 165 </Compile> 166 </ItemGroup> 167 <ItemGroup> 168 <Compile Include="CR1.png"> 169 <Name>CR1</Name> 170 <Importer>TextureImporter</Importer> 171 <Processor>TextureProcessor</Processor> 172 </Compile> 173 <Compile Include="CR2.png"> 174 <Name>CR2</Name> 175 <Importer>TextureImporter</Importer> 176 <Processor>TextureProcessor</Processor> 177 </Compile> 178 <Compile Include="CR3.png"> 179 <Name>CR3</Name> 180 <Importer>TextureImporter</Importer> 181 <Processor>TextureProcessor</Processor> 182 </Compile> 183 <Compile Include="CR4.png"> 184 <Name>CR4</Name> 185 <Importer>TextureImporter</Importer> 186 <Processor>TextureProcessor</Processor> 187 </Compile> 188 <Compile Include="CR5.png"> 189 <Name>CR5</Name> 190 <Importer>TextureImporter</Importer> 191 <Processor>TextureProcessor</Processor> 192 </Compile> 193 <Compile Include="CR6.png"> 194 <Name>CR6</Name> 195 <Importer>TextureImporter</Importer> 196 <Processor>TextureProcessor</Processor> 197 </Compile> 198 </ItemGroup> 199 <ItemGroup> 200 <Compile Include="orange.jpg"> 201 <Name>orange</Name> 202 <Importer>TextureImporter</Importer> 203 <Processor>TextureProcessor</Processor> 204 </Compile> 205 </ItemGroup> 206 <ItemGroup> 207 <Compile Include="orange2.png"> 208 <Name>orange2</Name> 209 <Importer>TextureImporter</Importer> 210 <Processor>TextureProcessor</Processor> 211 </Compile> 212 </ItemGroup> 125 213 <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 126 214 <!-- To modify your build process, add your task inside one of the targets below and uncomment it. -
2016/27/RuhanAnjanK/Noname/Noname/NonameContent/kentta1.txt
r7945 r7956 6 6 ############# 7 7 8 DDDDDDDDNDDDDD 8 OOOOOOOON 9 OOOOOOOOOOOO 9 10 10 11 #
Note: See TracChangeset
for help on using the changeset viewer.